diff --git a/retroshare-gui/src/gui/TransfersDialog.cpp b/retroshare-gui/src/gui/TransfersDialog.cpp index 77b2c6ea6..ff538c63e 100644 --- a/retroshare-gui/src/gui/TransfersDialog.cpp +++ b/retroshare-gui/src/gui/TransfersDialog.cpp @@ -42,8 +42,6 @@ #include "DLListDelegate.h" #include "ULListDelegate.h" #include "FileTransferInfoWidget.h" -#include "TurtleRouterDialog.h" -//#include "TurtleRouterStatistics.h" #include "SearchDialog.h" #include "xprogressbar.h" #include "settings/rsharesettings.h" @@ -306,9 +304,9 @@ TransfersDialog::TransfersDialog(QWidget *parent) QObject::connect(ui.downloadList->selectionModel(),SIGNAL(selectionChanged (const QItemSelection&, const QItemSelection&)),this,SLOT(showFileDetails())) ; ui.tabWidget->insertTab(0,searchDialog = new SearchDialog(), QIcon(IMAGE_SEARCH), tr("Search")) ; - //ui.tabWidget->addTab( new TurtleRouterStatistics(), tr("Router Statistics")) ; - ui.tabWidget->addTab( new TurtleRouterDialog(), tr("Router Requests")) ; + //ui.tabWidget->addTab( new TurtleRouterStatistics(), tr("Router Statistics")) ; + //ui.tabWidget->addTab( new TurtleRouterDialog(), tr("Router Requests")) ; for(int i=0;inbPlugins();++i) if(rsPlugins->plugin(i) != NULL && rsPlugins->plugin(i)->qt_transfers_tab() != NULL) diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index 521fd1486..126ef77f4 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -45,11 +45,14 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags) connect( ui.allowTunnelConnectionCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTunnelConnection(bool) ) ); connect( ui._max_tr_up_per_sec_SB, SIGNAL( valueChanged( int ) ), this, SLOT( updateMaxTRUpRate(int) ) ); connect( ui._turtle_enabled_CB, SIGNAL( toggled( bool ) ), this, SLOT( toggleTurtleRouting(bool) ) ); + connect( ui._routing_info_PB, SIGNAL( clicked() ), this, SLOT( showRoutingInfo() ) ); QTimer *timer = new QTimer(this); timer->connect(timer, SIGNAL(timeout()), this, SLOT(updateStatus())); timer->start(1000); + _routing_info_page = NULL ; + //load(); updateStatus(); @@ -74,6 +77,11 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags) TurtleRouterStatistics *trs = new TurtleRouterStatistics ; trs->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding)) ; ui.tabWidget->widget(2)->layout()->addWidget(trs) ; + ui.tabWidget->widget(2)->layout()->setContentsMargins(0,5,0,0) ; + + QSpacerItem *verticalSpacer = new QSpacerItem(0,0,QSizePolicy::Expanding, QSizePolicy::Minimum); + + ui.tabWidget->widget(2)->layout()->addItem(verticalSpacer) ; ui.tabWidget->widget(2)->layout()->update() ; /* Hide platform specific features */ @@ -82,6 +90,14 @@ ServerPage::ServerPage(QWidget * parent, Qt::WFlags flags) #endif } +void ServerPage::showRoutingInfo() +{ + if(_routing_info_page == NULL) + _routing_info_page = new TurtleRouterDialog ; + + _routing_info_page->show() ; +} + void ServerPage::updateMaxTRUpRate(int b) { rsTurtle->setMaxTRForwardRate(b) ; @@ -198,12 +214,14 @@ void ServerPage::load() ui.showDiscStatusBar->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC); ui._max_tr_up_per_sec_SB->setValue(rsTurtle->getMaxTRForwardRate()) ; - ui._turtle_enabled_CB->setChecked(rsTurtle->enabled()) ; } void ServerPage::toggleTurtleRouting(bool b) { + ui._max_tr_up_per_sec_SB->setEnabled(b) ; + ui._routing_info_PB->setEnabled(true) ; // always enabled! + rsTurtle->setEnabled(b) ; } diff --git a/retroshare-gui/src/gui/settings/ServerPage.h b/retroshare-gui/src/gui/settings/ServerPage.h index baeb57bfd..df474e251 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.h +++ b/retroshare-gui/src/gui/settings/ServerPage.h @@ -25,6 +25,8 @@ #include #include "ui_ServerPage.h" +class TurtleRouterDialog ; + class ServerPage: public ConfigPage { Q_OBJECT @@ -47,6 +49,7 @@ public slots: private slots: void saveAddresses(); void toggleUPnP(); + void showRoutingInfo(); void toggleIpDetermination(bool) ; void toggleTunnelConnection(bool) ; void updateMaxTRUpRate(int) ; @@ -54,6 +57,8 @@ private slots: private: Ui::ServerPage ui; + + TurtleRouterDialog *_routing_info_page ; }; #endif // !SERVERPAGE_H diff --git a/retroshare-gui/src/gui/settings/ServerPage.ui b/retroshare-gui/src/gui/settings/ServerPage.ui index 83c6e6d2a..92c722356 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.ui +++ b/retroshare-gui/src/gui/settings/ServerPage.ui @@ -6,7 +6,7 @@ 0 0 - 573 + 632 683 @@ -112,7 +112,7 @@ peers still need to trust each other to allow connection. - 2 + 0 @@ -373,6 +373,23 @@ behind a firewall or a VPN. + + + + <html><head/><body><p align="justify">Unchecking this disables all anonymous routing activity, except cache cleaning. Incoming tunnel requests are discarded, and no tunnel requests are sent to anyone.</p></body></html> + + + Enabled + + + + + + + Show routing info + + + @@ -405,31 +422,8 @@ The default value is 20. - - - - Unchecking this disables all anonymous routing activity, except cache cleaning. Incoming tunnel requests are discarded, and no tunnel requests are sent to anyone. - - - Enable anonymous data routing - - - - - - - Qt::Vertical - - - - 20 - 40 - - - -