[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1716: Save the state of the "Show this window on startup" checkbox (in trunk: . src/gui)
Author: edmanm
Date: 2007-04-17 15:51:05 -0400 (Tue, 17 Apr 2007)
New Revision: 1716
Modified:
trunk/
trunk/src/gui/mainwindow.cpp
trunk/src/gui/mainwindow.h
trunk/src/gui/mainwindow.ui
Log:
r1808@adrastea: edmanm | 2007-04-17 15:44:53 -0400
Save the state of the "Show this window on startup" checkbox when it is
toggled, instead of when the application is closing. arma's wasn't getting
saved then, for some reason.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r1808] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/gui/mainwindow.cpp
===================================================================
--- trunk/src/gui/mainwindow.cpp 2007-04-16 13:24:58 UTC (rev 1715)
+++ trunk/src/gui/mainwindow.cpp 2007-04-17 19:51:05 UTC (rev 1716)
@@ -158,9 +158,6 @@
/** Destructor. */
MainWindow::~MainWindow()
{
- VidaliaSettings settings;
- settings.setShowMainWindowAtStart(ui.chkShowOnStartup->isChecked());
-
_trayIcon.hide();
delete _messageLog;
delete _netViewer;
@@ -428,6 +425,14 @@
}
#endif
+/** Called when the "show on startup" checkbox is toggled. */
+void
+MainWindow::toggleShowOnStartup(bool checked)
+{
+ VidaliaSettings settings;
+ settings.setShowMainWindowAtStart(checked);
+}
+
/** Starts Tor if it is not currently running, or stops Tor if it is already
* running. */
void
Modified: trunk/src/gui/mainwindow.h
===================================================================
--- trunk/src/gui/mainwindow.h 2007-04-16 13:24:58 UTC (rev 1715)
+++ trunk/src/gui/mainwindow.h 2007-04-17 19:51:05 UTC (rev 1716)
@@ -99,7 +99,9 @@
void showConfigDialog(ConfigDialog::Page page = ConfigDialog::General);
/** Displays the Configuration dialog, set to the Server page. */
void showServerConfigDialog();
-
+ /** Called when the "show on startup" checkbox is toggled. */
+ void toggleShowOnStartup(bool checked);
+
#if defined(USE_QSYSTEMTRAYICON)
/** Displays the main window if <b>reason</b> is DoubleClick. */
void trayActivated(QSystemTrayIcon::ActivationReason reason);
Modified: trunk/src/gui/mainwindow.ui
===================================================================
--- trunk/src/gui/mainwindow.ui 2007-04-16 13:24:58 UTC (rev 1715)
+++ trunk/src/gui/mainwindow.ui 2007-04-17 19:51:05 UTC (rev 1716)
@@ -843,6 +843,12 @@
<slot>close()</slot>
</connection>
<connection>
+ <sender>chkShowOnStartup</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>MainWindow</receiver>
+ <slot>toggleShowOnStartup(bool)</slot>
+ </connection>
+ <connection>
<sender>btnHide</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>