diff --git a/retroshare-gui/src/gui/NetworkDialog.cpp b/retroshare-gui/src/gui/NetworkDialog.cpp index 854bc81b8..b3129516c 100644 --- a/retroshare-gui/src/gui/NetworkDialog.cpp +++ b/retroshare-gui/src/gui/NetworkDialog.cpp @@ -76,6 +76,9 @@ NetworkDialog::NetworkDialog(QWidget *parent) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); + + /* Create RshareSettings object */ + _settings = new RshareSettings(); connect( ui.connecttreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( connecttreeWidgetCostumPopupMenu( QPoint ) ) ); @@ -160,6 +163,7 @@ NetworkDialog::NetworkDialog(QWidget *parent) getNetworkStatus(); updateNetworkStatus(); //load(); + loadtabsettings(); /* Hide platform specific features */ @@ -864,24 +868,44 @@ void NetworkDialog::updateNetworkStatus() ui.radio_netServer->setEnabled(false); }*/ -void NetworkDialog::on_actionTabsright_activated() -{ - ui.networkTab->setTabPosition(QTabWidget::East); -} - void NetworkDialog::on_actionTabsnorth_activated() { + _settings->beginGroup("NetworkDialog"); + ui.networkTab->setTabPosition(QTabWidget::North); + + _settings->setValue("TabWidget_Position",ui.networkTab->tabPosition()); + _settings->endGroup(); } void NetworkDialog::on_actionTabssouth_activated() { + _settings->beginGroup("NetworkDialog"); + ui.networkTab->setTabPosition(QTabWidget::South); + + _settings->setValue("TabWidget_Position",ui.networkTab->tabPosition()); + _settings->endGroup(); } void NetworkDialog::on_actionTabswest_activated() { + _settings->beginGroup("NetworkDialog"); + ui.networkTab->setTabPosition(QTabWidget::West); + + _settings->setValue("TabWidget_Position",ui.networkTab->tabPosition()); + _settings->endGroup(); +} + +void NetworkDialog::on_actionTabsright_activated() +{ + _settings->beginGroup("NetworkDialog"); + + ui.networkTab->setTabPosition(QTabWidget::East); + + _settings->setValue("TabWidget_Position",ui.networkTab->tabPosition()); + _settings->endGroup(); } void NetworkDialog::on_actionTabsTriangular_activated() @@ -895,3 +919,34 @@ void NetworkDialog::on_actionTabsRounded_activated() ui.networkTab->setTabShape(QTabWidget::Rounded); ui.tabBottom->setTabShape(QTabWidget::Rounded); } + +void NetworkDialog::loadtabsettings() +{ +_settings->beginGroup("NetworkDialog"); + +if(_settings->value("TabWidget_Position","0").toInt() == 0) +{ +qDebug() << "Tab North"; +ui.networkTab->setTabPosition(QTabWidget::North); +} + +else if (_settings->value("TabWidget_Position","1").toInt() == 1) +{ +qDebug() << "Tab South"; +ui.networkTab->setTabPosition(QTabWidget::South); +} + +else if (_settings->value("TabWidget_Position","2").toInt() ==2) +{ +qDebug() << "Tab West"; +ui.networkTab->setTabPosition(QTabWidget::West); +} + +else if(_settings->value("TabWidget_Position","3").toInt() ==3) +{ +qDebug() << "Tab East"; +ui.networkTab->setTabPosition(QTabWidget::East); +} + +_settings->endGroup(); +} diff --git a/retroshare-gui/src/gui/NetworkDialog.h b/retroshare-gui/src/gui/NetworkDialog.h index df0530714..7378b963b 100644 --- a/retroshare-gui/src/gui/NetworkDialog.h +++ b/retroshare-gui/src/gui/NetworkDialog.h @@ -26,8 +26,7 @@ #include #include - -//#include +#include "Preferences/rsharesettings.h" #include "mainpage.h" #include "ui_NetworkDialog.h" @@ -76,6 +75,8 @@ private slots: void getNetworkStatus(); void updateNetworkStatus(); + void loadtabsettings(); + void on_actionTabsright_activated(); void on_actionTabsnorth_activated(); void on_actionTabssouth_activated(); @@ -86,9 +87,10 @@ private slots: private: + /** A RetroShare Settings object used for saving/loading settings */ + RshareSettings *_settings; - -QTreeWidgetItem *getCurrentNeighbour(); + QTreeWidgetItem *getCurrentNeighbour(); /** Define the popup menus for the Context menu */ QMenu* contextMnu; diff --git a/retroshare-gui/src/gui/SharedFilesDialog.cpp b/retroshare-gui/src/gui/SharedFilesDialog.cpp index ed7514f55..58108f3a1 100644 --- a/retroshare-gui/src/gui/SharedFilesDialog.cpp +++ b/retroshare-gui/src/gui/SharedFilesDialog.cpp @@ -59,7 +59,7 @@ #define IMAGE_DOWNLOAD ":/images/download16.png" #define IMAGE_PLAY ":/images/start.png" #define IMAGE_HASH_BUSY ":/images/settings.png" -#define IMAGE_HASH_DONE ":/images/friendsfolder24.png" +#define IMAGE_HASH_DONE ":/images/accepted16.png" #define IMAGE_MSG ":/images/message-mail.png" #define IMAGE_ATTACHMENT ":/images/attachment.png" #define IMAGE_FRIEND ":/images/peers_16x16.png" @@ -170,7 +170,7 @@ void SharedFilesDialog::checkUpdate() /* update */ if (rsFiles->InDirectoryCheck()) { - //ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_BUSY)); + ui.checkButton->setText(tr("Checking...")); QMovie *movie = new QMovie(":/images/loader/16-loader.gif"); ui.hashLabel->setMovie(movie); movie->start(); @@ -178,7 +178,7 @@ void SharedFilesDialog::checkUpdate() } else { - //movie->stop(); + ui.checkButton->setText(tr("Check files")); ui.hashLabel->setPixmap(QPixmap(IMAGE_HASH_DONE)); ui.hashLabel->setToolTip("") ; }