diff --git a/retroshare-gui/src/gui/settings/AppearancePage.cpp b/retroshare-gui/src/gui/settings/AppearancePage.cpp index f3157fb05..92747816b 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.cpp +++ b/retroshare-gui/src/gui/settings/AppearancePage.cpp @@ -31,6 +31,7 @@ #include "AppearancePage.h" #include "rsharesettings.h" #include "gui/MainWindow.h" +#include "gui/notifyqt.h" #include "gui/statusbar/peerstatus.h" #include "gui/statusbar/natstatus.h" #include "gui/statusbar/dhtstatus.h" @@ -90,9 +91,10 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags) connect(ui.cmboLanguage, SIGNAL(currentIndexChanged(int)), this, SLOT(updateLanguageCode() )); connect(ui.cmboStyle, SIGNAL(currentIndexChanged(int)), this, SLOT(updateInterfaceStyle() )); connect(ui.cmboStyleSheet, SIGNAL(currentIndexChanged(int)), this, SLOT(updateSheetName() )); - connect(ui.rbtPageOnToolBar, SIGNAL(toggled(bool)), this, SLOT(updateRbtPageOnToolBar() )); - connect(ui.rbtActionOnToolBar, SIGNAL(toggled(bool)), this, SLOT(updateActionButtonLoc() )); connect(ui.checkBoxDisableSysTrayToolTip, SIGNAL(toggled(bool)), this, SLOT(updateStatusToolTip() )); + + connect(ui.mainPageButtonType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(updateRbtPageOnToolBar() )); + connect(ui.menuItemsButtonType_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(updateActionButtonLoc() )); } void AppearancePage::switch_status_grpStatus(bool b) { switch_status(MainWindow::StatusGrpStatus ,"ShowStatusBar", b) ; } @@ -128,8 +130,16 @@ void AppearancePage::updateInterfaceStyle() Settings->setInterfaceStyle(ui.cmboStyle->currentText()); } void AppearancePage::updateSheetName() { Settings->setSheetName(ui.cmboStyleSheet->itemData(ui.cmboStyleSheet->currentIndex()).toString()); } -void AppearancePage::updateRbtPageOnToolBar() { Settings->setPageButtonLoc(ui.rbtPageOnToolBar->isChecked());} -void AppearancePage::updateActionButtonLoc() { Settings->setActionButtonLoc(ui.rbtActionOnToolBar->isChecked()); } +void AppearancePage::updateRbtPageOnToolBar() +{ + Settings->setPageButtonLoc(!ui.mainPageButtonType_CB->currentIndex()); + NotifyQt::getInstance()->notifySettingsChanged(); +} +void AppearancePage::updateActionButtonLoc() +{ + Settings->setActionButtonLoc(!ui.menuItemsButtonType_CB->currentIndex()); + NotifyQt::getInstance()->notifySettingsChanged(); +} void AppearancePage::updateStatusToolTip() { MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked()); } void AppearancePage::updateCmboToolButtonStyle() @@ -149,6 +159,7 @@ void AppearancePage::updateCmboToolButtonStyle() default: Settings->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); } + NotifyQt::getInstance()->notifySettingsChanged(); } void AppearancePage::updateCmboToolButtonSize() @@ -174,6 +185,7 @@ void AppearancePage::updateCmboToolButtonSize() case 5: Settings->setToolButtonSize(128); } + NotifyQt::getInstance()->notifySettingsChanged(); } void AppearancePage::updateCmboListItemSize() { @@ -198,6 +210,7 @@ void AppearancePage::updateCmboListItemSize() case 5: Settings->setListItemIconSize(128); } + NotifyQt::getInstance()->notifySettingsChanged(); } void AppearancePage::updateStyle() { Rshare::setStyle(ui.cmboStyle->currentText()); } @@ -218,10 +231,9 @@ void AppearancePage::load() } ui.cmboStyleSheet->setCurrentIndex(index); - ui.rbtPageOnToolBar->setChecked(Settings->getPageButtonLoc()); - ui.rbtPageOnListItem->setChecked(!Settings->getPageButtonLoc()); - ui.rbtActionOnToolBar->setChecked(Settings->getActionButtonLoc()); - ui.rbtActionOnListItem->setChecked(!Settings->getActionButtonLoc()); + ui.mainPageButtonType_CB->setCurrentIndex(!Settings->getPageButtonLoc()); + ui.menuItemsButtonType_CB->setCurrentIndex(!Settings->getActionButtonLoc()); + switch (Settings->getToolButtonStyle()) { case Qt::ToolButtonIconOnly: diff --git a/retroshare-gui/src/gui/settings/AppearancePage.ui b/retroshare-gui/src/gui/settings/AppearancePage.ui index dface3903..f05634f8f 100755 --- a/retroshare-gui/src/gui/settings/AppearancePage.ui +++ b/retroshare-gui/src/gui/settings/AppearancePage.ui @@ -7,7 +7,7 @@ 0 0 1160 - 608 + 897 @@ -44,13 +44,6 @@ Language - - - - Changes to language will only take effect after restarting RetroShare! - - - @@ -70,7 +63,7 @@ - + Qt::Horizontal @@ -83,6 +76,13 @@ + + + + (Needs restart) + + + @@ -198,124 +198,84 @@ Tool Bar - - - - - QFrame::StyledPanel - - - QFrame::Plain - - - - 2 - - - 2 - - - 2 - - - 2 - - - + + + + + + + Main page items: + + + + + + - On Tool Bar + Buttons - - - - + + - On List Ite&m + Item list - - - - - - Qt::Horizontal - - - - 300 - 16 - - - - - - + + + + + + + Qt::Horizontal + + + + 300 + 16 + + + + + - - - - Where do you want to have the buttons for menu? - - - - - - - QFrame::StyledPanel - - - QFrame::Plain - - - - 2 - - - 2 - - - 2 - - - 2 - - - + + + + + + Menu items: + + + + + + - On Tool Bar + Buttons - - - - + + - On List Item + Item list - - - - - - Qt::Horizontal - - - - 300 - 16 - - - - - - + + + + + + + Qt::Horizontal + + + + 300 + 16 + + + + + - - - - Where do you want to have the buttons for the page? - - - - + diff --git a/retroshare-gui/src/gui/settings/ChannelPage.cpp b/retroshare-gui/src/gui/settings/ChannelPage.cpp index c0de1ac60..b58035a01 100644 --- a/retroshare-gui/src/gui/settings/ChannelPage.cpp +++ b/retroshare-gui/src/gui/settings/ChannelPage.cpp @@ -30,10 +30,9 @@ ChannelPage::ChannelPage(QWidget * parent, Qt::WindowFlags flags) /* Initialize GroupFrameSettingsWidget */ ui.groupFrameSettingsWidget->setOpenAllInNewTabText(tr("Open each channel in a new tab")); + ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Channel) ; connect(ui.loadThreadCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateLoadThread)) ; - - ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Channel) ; } void ChannelPage::updateLoadThread() { Settings->setChannelLoadThread(ui.loadThreadCheckBox->isChecked()); } diff --git a/retroshare-gui/src/gui/settings/MessagePage.cpp b/retroshare-gui/src/gui/settings/MessagePage.cpp index 14ab9791d..1aa4509f0 100644 --- a/retroshare-gui/src/gui/settings/MessagePage.cpp +++ b/retroshare-gui/src/gui/settings/MessagePage.cpp @@ -53,10 +53,7 @@ MessagePage::MessagePage(QWidget * parent, Qt::WindowFlags flags) connect(ui.setMsgToReadOnActivate,SIGNAL(toggled(bool)), this,SLOT(updateMsgToReadOnActivate())); connect(ui.loadEmbeddedImages, SIGNAL(toggled(bool)), this,SLOT(updateLoadEmbededImages() )); - connect(ui.openComboBox, SIGNAL(currentItemChanged(int)),this,SLOT(updateMsgOpen() )); - connect(ui.comboBox, SIGNAL(currebtItemChanged(int)),this,SLOT(updateDistantMsgs() )); - - connect(ui.comboBox, SIGNAL(currebtItemChanged(int)),this,SLOT(updateMsgTags() )); + connect(ui.openComboBox, SIGNAL(currentIndexChanged(int)),this,SLOT(updateMsgOpen() )); } MessagePage::~MessagePage() diff --git a/retroshare-gui/src/gui/settings/ServicePermissionsPage.cpp b/retroshare-gui/src/gui/settings/ServicePermissionsPage.cpp index 5ded8fb80..d608c24af 100644 --- a/retroshare-gui/src/gui/settings/ServicePermissionsPage.cpp +++ b/retroshare-gui/src/gui/settings/ServicePermissionsPage.cpp @@ -31,16 +31,18 @@ ServicePermissionsPage::ServicePermissionsPage(QWidget * parent, Qt::WindowFlags flags) : ConfigPage(parent, flags) { - /* Invoke the Qt Designer generated object setup routine */ - ui.setupUi(this); + /* Invoke the Qt Designer generated object setup routine */ + ui.setupUi(this); - connect(ui.cb_hideOffline, SIGNAL(toggled(bool)), ui.frame, SLOT(setHideOffline(bool))); - //QObject::connect(ui.tableWidget,SIGNAL(itemChanged(QTableWidgetItem *)), this, SLOT(tableItemChanged(QTableWidgetItem *))); + ui.cb_hideOffline->setChecked(true); - ui.frame->setHideOffline(ui.cb_hideOffline->isChecked()); + connect(ui.cb_hideOffline, SIGNAL(toggled(bool)), ui.frame, SLOT(setHideOffline(bool))); + //QObject::connect(ui.tableWidget,SIGNAL(itemChanged(QTableWidgetItem *)), this, SLOT(tableItemChanged(QTableWidgetItem *))); - // Not implemented? - ui.pushButton->hide(); + ui.frame->setHideOffline(ui.cb_hideOffline->isChecked()); + + // Not implemented? + ui.pushButton->hide(); } QString ServicePermissionsPage::helpText() const diff --git a/retroshare-gui/src/gui/settings/WebuiPage.cpp b/retroshare-gui/src/gui/settings/WebuiPage.cpp index dc168057b..4afad5968 100644 --- a/retroshare-gui/src/gui/settings/WebuiPage.cpp +++ b/retroshare-gui/src/gui/settings/WebuiPage.cpp @@ -148,6 +148,9 @@ void WebuiPage::onEnableCBClicked(bool checked) ui.params_GB->setEnabled(false); ui.applyStartBrowser_PB->setEnabled(false); } + + QString S; + updateParams(S); } void WebuiPage::onApplyClicked()