Merge pull request #715 from PhenomRetroShare/Fix_NatDisplayOptionSaving

Fix NAT Display setting saving.
This commit is contained in:
csoler 2017-03-03 22:26:32 +01:00 committed by GitHub
commit 9716b9298c
5 changed files with 32 additions and 32 deletions

View File

@ -1500,9 +1500,9 @@ void MainWindow::switchVisibilityStatus(StatusElement e,bool b)
case StatusGrpStatus : getInstance()->statusBar() ->setVisible(b); break ; case StatusGrpStatus : getInstance()->statusBar() ->setVisible(b); break ;
case StatusCompactMode : getInstance()->setCompactStatusMode(b) ; break ; case StatusCompactMode : getInstance()->setCompactStatusMode(b) ; break ;
case StatusShowToolTip : getInstance()->toggleStatusToolTip(b) ; break ; case StatusShowToolTip : getInstance()->toggleStatusToolTip(b) ; break ;
case StatusShowCBox : getInstance()->statusComboBoxInstance() ->setVisible(b); break ; case StatusShowStatus : getInstance()->statusComboBoxInstance() ->setVisible(b); break ;
case StatusShowStatus : getInstance()->peerstatusInstance() ->setVisible(b); break ; case StatusShowPeer : getInstance()->peerstatusInstance() ->setVisible(b); break ;
case StatusShowPeer : getInstance()->natstatusInstance() ->setVisible(b); break ; case StatusShowNAT : getInstance()->natstatusInstance() ->setVisible(b); break ;
case StatusShowDHT : getInstance()->dhtstatusInstance() ->setVisible(b); break ; case StatusShowDHT : getInstance()->dhtstatusInstance() ->setVisible(b); break ;
case StatusShowHashing : getInstance()->hashingstatusInstance() ->setVisible(b); break ; case StatusShowHashing : getInstance()->hashingstatusInstance() ->setVisible(b); break ;
case StatusShowDisc : getInstance()->discstatusInstance() ->setVisible(b); break ; case StatusShowDisc : getInstance()->discstatusInstance() ->setVisible(b); break ;

View File

@ -116,15 +116,15 @@ public:
StatusShowToolTip = 0x03, StatusShowToolTip = 0x03,
StatusShowStatus = 0x04, StatusShowStatus = 0x04,
StatusShowPeer = 0x05, StatusShowPeer = 0x05,
StatusShowDHT = 0x06, StatusShowNAT = 0x06,
StatusShowHashing = 0x07, StatusShowDHT = 0x07,
StatusShowDisc = 0x08, StatusShowHashing = 0x08,
StatusShowRate = 0x09, StatusShowDisc = 0x09,
StatusShowOpMode = 0x0a, StatusShowRate = 0x0a,
StatusShowSound = 0x0b, StatusShowOpMode = 0x0b,
StatusShowToaster = 0x0c, StatusShowSound = 0x0c,
StatusShowSystray = 0x0d, StatusShowToaster = 0x0d,
StatusShowCBox = 0x0e StatusShowSystray = 0x0e,
}; };
/** Create main window */ /** Create main window */

View File

@ -56,9 +56,9 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
connect(ui.grpStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusBar(), */, SLOT(switch_status_grpStatus(bool))); connect(ui.grpStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusBar(), */, SLOT(switch_status_grpStatus(bool)));
connect(ui.checkBoxStatusCompactMode, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_compactMode(bool))); connect(ui.checkBoxStatusCompactMode, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_compactMode(bool)));
connect(ui.checkBoxDisableSysTrayToolTip, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_showToolTip(bool))); connect(ui.checkBoxDisableSysTrayToolTip, SIGNAL(toggled(bool)), this /* pMainWindow, */, SLOT(switch_status_showToolTip(bool)));
connect(ui.checkBoxShowStatusStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusComboBoxInstance(), */, SLOT(switch_status_ShowCBox(bool))); connect(ui.checkBoxShowStatusStatus, SIGNAL(toggled(bool)), this /* pMainWindow->statusComboBoxInstance(), */, SLOT(switch_status_ShowStatus(bool)));
connect(ui.checkBoxShowPeerStatus, SIGNAL(toggled(bool)), this /* pMainWindow->peerstatusInstance(), */, SLOT(switch_status_ShowStatus(bool))); connect(ui.checkBoxShowPeerStatus, SIGNAL(toggled(bool)), this /* pMainWindow->peerstatusInstance(), */, SLOT(switch_status_ShowPeer(bool)));
connect(ui.checkBoxShowNATStatus, SIGNAL(toggled(bool)), this /* pMainWindow->natstatusInstance(), */, SLOT(switch_status_ShowPeer(bool))); connect(ui.checkBoxShowNATStatus, SIGNAL(toggled(bool)), this /* pMainWindow->natstatusInstance(), */, SLOT(switch_status_ShowNAT(bool)));
connect(ui.checkBoxShowDHTStatus, SIGNAL(toggled(bool)), this /* pMainWindow->dhtstatusInstance(), */, SLOT(switch_status_ShowDHT(bool))); connect(ui.checkBoxShowDHTStatus, SIGNAL(toggled(bool)), this /* pMainWindow->dhtstatusInstance(), */, SLOT(switch_status_ShowDHT(bool)));
connect(ui.checkBoxShowHashingStatus, SIGNAL(toggled(bool)), this /* pMainWindow->hashingstatusInstance(), */, SLOT(switch_status_ShowHashing(bool))); connect(ui.checkBoxShowHashingStatus, SIGNAL(toggled(bool)), this /* pMainWindow->hashingstatusInstance(), */, SLOT(switch_status_ShowHashing(bool)));
connect(ui.checkBoxShowDiscStatus, SIGNAL(toggled(bool)), this /* pMainWindow->discstatusInstance(), */, SLOT(switch_status_ShowDisc(bool))); connect(ui.checkBoxShowDiscStatus, SIGNAL(toggled(bool)), this /* pMainWindow->discstatusInstance(), */, SLOT(switch_status_ShowDisc(bool)));
@ -103,6 +103,7 @@ void AppearancePage::switch_status_compactMode(bool b) { switch_status(Main
void AppearancePage::switch_status_showToolTip(bool b) { switch_status(MainWindow::StatusShowToolTip,"DisableSysTrayToolTip", b) ; } void AppearancePage::switch_status_showToolTip(bool b) { switch_status(MainWindow::StatusShowToolTip,"DisableSysTrayToolTip", b) ; }
void AppearancePage::switch_status_ShowStatus(bool b) { switch_status(MainWindow::StatusShowStatus ,"ShowStatus", b) ; } void AppearancePage::switch_status_ShowStatus(bool b) { switch_status(MainWindow::StatusShowStatus ,"ShowStatus", b) ; }
void AppearancePage::switch_status_ShowPeer(bool b) { switch_status(MainWindow::StatusShowPeer ,"ShowPeer", b) ; } void AppearancePage::switch_status_ShowPeer(bool b) { switch_status(MainWindow::StatusShowPeer ,"ShowPeer", b) ; }
void AppearancePage::switch_status_ShowNAT(bool b) { switch_status(MainWindow::StatusShowNAT ,"ShowNAT", b) ; }
void AppearancePage::switch_status_ShowDHT(bool b) { switch_status(MainWindow::StatusShowDHT ,"ShowDHT", b) ; } void AppearancePage::switch_status_ShowDHT(bool b) { switch_status(MainWindow::StatusShowDHT ,"ShowDHT", b) ; }
void AppearancePage::switch_status_ShowHashing(bool b) { switch_status(MainWindow::StatusShowHashing,"ShowHashing", b) ; } void AppearancePage::switch_status_ShowHashing(bool b) { switch_status(MainWindow::StatusShowHashing,"ShowHashing", b) ; }
void AppearancePage::switch_status_ShowDisc(bool b) { switch_status(MainWindow::StatusShowDisc ,"ShowDisc", b) ; } void AppearancePage::switch_status_ShowDisc(bool b) { switch_status(MainWindow::StatusShowDisc ,"ShowDisc", b) ; }
@ -111,7 +112,6 @@ void AppearancePage::switch_status_ShowOpMode(bool b) { switch_status(Main
void AppearancePage::switch_status_ShowSound(bool b) { switch_status(MainWindow::StatusShowSound ,"ShowSound", b) ; } void AppearancePage::switch_status_ShowSound(bool b) { switch_status(MainWindow::StatusShowSound ,"ShowSound", b) ; }
void AppearancePage::switch_status_ShowToaster(bool b) { switch_status(MainWindow::StatusShowToaster,"ShowToaster", b) ; } void AppearancePage::switch_status_ShowToaster(bool b) { switch_status(MainWindow::StatusShowToaster,"ShowToaster", b) ; }
void AppearancePage::switch_status_ShowSystray(bool b) { switch_status(MainWindow::StatusShowSystray,"ShowSysTrayOnStatusBar",b) ; } void AppearancePage::switch_status_ShowSystray(bool b) { switch_status(MainWindow::StatusShowSystray,"ShowSysTrayOnStatusBar",b) ; }
void AppearancePage::switch_status_ShowCBox(bool b) { switch_status(MainWindow::StatusShowCBox, "ShowStatusCBox" ,b) ; }
void AppearancePage::switch_status(MainWindow::StatusElement s,const QString& key, bool b) void AppearancePage::switch_status(MainWindow::StatusElement s,const QString& key, bool b)
{ {
@ -304,7 +304,7 @@ void AppearancePage::load()
whileBlocking(ui.checkBoxShowNATStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowNAT", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowNATStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowNAT", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowDHTStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowDHT", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowDHTStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowDHT", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowHashingStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowHashing", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowHashingStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowHashing", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowDiscStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "Show eDisc", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowDiscStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowDisc", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowRateStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowRate", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowRateStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowRate", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowOpModeStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowOpMode", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowOpModeStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowOpMode", QVariant(true)).toBool());
whileBlocking(ui.checkBoxShowSoundStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowSound", QVariant(true)).toBool()); whileBlocking(ui.checkBoxShowSoundStatus)-> setChecked(Settings->valueFromGroup("StatusBar", "ShowSound", QVariant(true)).toBool());

View File

@ -49,6 +49,7 @@ private slots:
void switch_status_showToolTip(bool b) ; void switch_status_showToolTip(bool b) ;
void switch_status_ShowStatus(bool) ; void switch_status_ShowStatus(bool) ;
void switch_status_ShowPeer(bool) ; void switch_status_ShowPeer(bool) ;
void switch_status_ShowNAT(bool) ;
void switch_status_ShowDHT(bool) ; void switch_status_ShowDHT(bool) ;
void switch_status_ShowHashing(bool) ; void switch_status_ShowHashing(bool) ;
void switch_status_ShowDisc(bool) ; void switch_status_ShowDisc(bool) ;
@ -57,7 +58,6 @@ private slots:
void switch_status_ShowSound(bool) ; void switch_status_ShowSound(bool) ;
void switch_status_ShowToaster(bool) ; void switch_status_ShowToaster(bool) ;
void switch_status_ShowSystray(bool) ; void switch_status_ShowSystray(bool) ;
void switch_status_ShowCBox(bool) ;
void updateLanguageCode() ; void updateLanguageCode() ;
void updateInterfaceStyle() ; void updateInterfaceStyle() ;

View File

@ -418,17 +418,17 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="2"> <item row="4" column="2">
<widget class="QCheckBox" name="checkBoxShowOpModeStatus"> <widget class="QCheckBox" name="checkBoxShowSystrayOnStatus">
<property name="text"> <property name="text">
<string>Show Operating Mode Status</string> <string>Show SysTray on Status Bar</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="3" column="2">
<widget class="QCheckBox" name="checkBoxShowSystrayOnStatus"> <widget class="QCheckBox" name="checkBoxShowOpModeStatus">
<property name="text"> <property name="text">
<string>Show SysTray on Status Bar</string> <string>Show Operating Mode Status</string>
</property> </property>
</widget> </widget>
</item> </item>