From f713def6a420414d12a7823a1d3c2edc6ed02dc6 Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 11 Sep 2014 11:40:16 +0000 Subject: [PATCH] Removed Turtle/Router Stats from settings page, its visible via Statistics Window git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7526 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/settings/ServerPage.cpp | 25 ------------------- retroshare-gui/src/gui/settings/ServerPage.h | 4 +-- retroshare-gui/src/gui/settings/ServerPage.ui | 22 ++++++++++------ 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index 39e0f9c0e..660e11d77 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -20,9 +20,6 @@ ****************************************************************/ #include "ServerPage.h" -#include -#include -#include #include "rshare.h" #include "rsharesettings.h" @@ -46,13 +43,11 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags 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(); @@ -75,17 +70,6 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags) for(std::list::const_iterator it(ip_servers.begin());it!=ip_servers.end();++it) ui.IPServersLV->addItem(QString::fromStdString(*it)) ; - 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) ; - ui.tabWidget->widget(2)->layout()->addItem( new QSpacerItem(0,0,QSizePolicy::Expanding, QSizePolicy::Minimum)) ; - ui.tabWidget->widget(2)->layout()->update() ; - - GlobalRouterStatistics *grs = new GlobalRouterStatistics ; - grs->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding)) ; - ui.tabWidget->addTab(grs,tr("Global routing")) ; - ui.torpage_incoming->setVisible(false); /* Hide platform specific features */ @@ -97,14 +81,6 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags) std::cerr << std::endl; } -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) ; @@ -251,7 +227,6 @@ void ServerPage::load() 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 6a4a4f836..256d11f1c 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.h +++ b/retroshare-gui/src/gui/settings/ServerPage.h @@ -24,8 +24,8 @@ #include #include "ui_ServerPage.h" +#include "RsAutoUpdatePage.h" -class TurtleRouterDialog ; class ServerPage: public ConfigPage { @@ -50,7 +50,6 @@ public slots: private slots: void saveAddresses(); void toggleUPnP(); - void showRoutingInfo(); void toggleIpDetermination(bool) ; void toggleTunnelConnection(bool) ; void updateMaxTRUpRate(int) ; @@ -66,7 +65,6 @@ private: Ui::ServerPage ui; - TurtleRouterDialog *_routing_info_page ; bool mIsHiddenNode; }; diff --git a/retroshare-gui/src/gui/settings/ServerPage.ui b/retroshare-gui/src/gui/settings/ServerPage.ui index fee302468..93faeb24d 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.ui +++ b/retroshare-gui/src/gui/settings/ServerPage.ui @@ -17,7 +17,7 @@ - 2 + 0 @@ -540,15 +540,21 @@ The default value is 20. - - - - Show routing info - - - + + + + Qt::Vertical + + + + 20 + 40 + + + +