[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r3160: Connect the auto-update UI bits to the actual config setting (vidalia/trunk/src/vidalia/config)



Author: edmanm
Date: 2008-09-29 20:48:15 -0400 (Mon, 29 Sep 2008)
New Revision: 3160

Modified:
   vidalia/trunk/src/vidalia/config/generalpage.cpp
   vidalia/trunk/src/vidalia/config/generalpage.h
Log:
Connect the auto-update UI bits to the actual config settings. Also remember
the last time we pretended to check for updates.


Modified: vidalia/trunk/src/vidalia/config/generalpage.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/generalpage.cpp	2008-09-30 00:41:41 UTC (rev 3159)
+++ vidalia/trunk/src/vidalia/config/generalpage.cpp	2008-09-30 00:48:15 UTC (rev 3160)
@@ -14,6 +14,7 @@
 ** \brief General Tor and Vidalia configuration options
 */
 
+#include <QDateTime>
 #include <stringutil.h>
 #include "generalpage.h"
 
@@ -34,12 +35,14 @@
           this, SLOT(browseTorExecutable()));
   connect(ui.btnBrowseProxyExecutable, SIGNAL(clicked()), 
           this, SLOT(browseProxyExecutable()));
+  connect(ui.btnUpdateNow, SIGNAL(clicked()),
+          this, SLOT(checkForUpdates()));
 
   /* Hide platform specific features */
 #ifndef Q_WS_WIN
   ui.chkRunVidaliaAtSystemStartup->setVisible(false);
   ui.lineHorizontalSeparator->setVisible(false);
-  ui.grpSoftwareUpdates->setVisible(false);
+  //ui.grpSoftwareUpdates->setVisible(false);
 #endif
 }
 
@@ -115,7 +118,8 @@
     ui.chkRunVidaliaAtSystemStartup->isChecked());
   _vidaliaSettings->setRunProxyAtStart(
     ui.chkRunProxyAtTorStartup->isChecked());
-
+  _vidaliaSettings->setAutoUpdateEnabled(
+    ui.chkAutoUpdates->isChecked());
   return true;
 }
 
@@ -133,5 +137,13 @@
   ui.lineProxyExecutableArguments->setText(
     string_format_arguments(_vidaliaSettings->getProxyExecutableArguments()));
   ui.chkRunProxyAtTorStartup->setChecked(_vidaliaSettings->runProxyAtStart());
+  ui.chkAutoUpdates->setChecked(_vidaliaSettings->isAutoUpdateEnabled());
 }
 
+void
+GeneralPage::checkForUpdates()
+{
+  _vidaliaSettings->setLastCheckedForUpdates(QDateTime::currentDateTime());
+}
+
+

Modified: vidalia/trunk/src/vidalia/config/generalpage.h
===================================================================
--- vidalia/trunk/src/vidalia/config/generalpage.h	2008-09-30 00:41:41 UTC (rev 3159)
+++ vidalia/trunk/src/vidalia/config/generalpage.h	2008-09-30 00:48:15 UTC (rev 3160)
@@ -43,7 +43,9 @@
   void browseTorExecutable();
   /** Open a QFileDialog to browse for a proxy executable file. */
   void browseProxyExecutable();
-  
+  /** Initiate an immediate check for software updates. */
+  void checkForUpdates();
+
 private:
   /** Displays a file dialog allowing the user to browse for an executable
    * file. <b>caption</b> will be displayed in the dialog's title bar and <b>