[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3168: Add a GliderProcess method to call to launch a check for upd (vidalia/trunk/src/vidalia)
Author: edmanm
Date: 2008-09-29 22:29:17 -0400 (Mon, 29 Sep 2008)
New Revision: 3168
Modified:
vidalia/trunk/src/vidalia/gliderprocess.cpp
vidalia/trunk/src/vidalia/gliderprocess.h
vidalia/trunk/src/vidalia/mainwindow.cpp
vidalia/trunk/src/vidalia/mainwindow.h
Log:
Add a GliderProcess method to call to launch a check for updates using the
specified Glider executable. I made this one up. Could you tell?
Modified: vidalia/trunk/src/vidalia/gliderprocess.cpp
===================================================================
--- vidalia/trunk/src/vidalia/gliderprocess.cpp 2008-09-30 02:22:57 UTC (rev 3167)
+++ vidalia/trunk/src/vidalia/gliderprocess.cpp 2008-09-30 02:29:17 UTC (rev 3168)
@@ -16,6 +16,12 @@
{
}
+void
+GliderProcess::checkForUpdates(const QString &gliderExecutable)
+{
+ start(gliderExecutable);
+}
+
int
GliderProcess::checkForUpdatesInterval()
{
Modified: vidalia/trunk/src/vidalia/gliderprocess.h
===================================================================
--- vidalia/trunk/src/vidalia/gliderprocess.h 2008-09-30 02:22:57 UTC (rev 3167)
+++ vidalia/trunk/src/vidalia/gliderprocess.h 2008-09-30 02:29:17 UTC (rev 3168)
@@ -24,6 +24,11 @@
*/
GliderProcess(QObject *parent = 0);
+ /** Begin a check for software updates using the Glider binary specified
+ * by <b>gliderExecutable</b>.
+ */
+ void checkForUpdates(const QString &gliderExecutable);
+
/** Return the time at which we should next check for available updates,
* given the last we checked was at <b>lastCheckedAt</b>.
*/
Modified: vidalia/trunk/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.cpp 2008-09-30 02:22:57 UTC (rev 3167)
+++ vidalia/trunk/src/vidalia/mainwindow.cpp 2008-09-30 02:29:17 UTC (rev 3168)
@@ -1466,11 +1466,15 @@
void
MainWindow::checkForUpdates()
{
- /* TODO: Initiate a check for available software updates. This check will
- * be done in the background, notifying the user only if there are
- * updates to be installed.
+ /* Initiate a check for available software updates. This check will
+ * be done in the background, notifying the user only if there are
+ * updates to be installed.
*/
+ _gliderProcess.checkForUpdates("takemeforarideonyourmagicglider.exe");
+ /* XXX: The stuff below should be moved to another method that gets called
+ * when the glider check is complete.
+ */
VidaliaSettings settings;
settings.setLastCheckedForUpdates(QDateTime::currentDateTime().toUTC());
Modified: vidalia/trunk/src/vidalia/mainwindow.h
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.h 2008-09-30 02:22:57 UTC (rev 3167)
+++ vidalia/trunk/src/vidalia/mainwindow.h 2008-09-30 02:29:17 UTC (rev 3168)
@@ -210,6 +210,8 @@
TrayIcon _trayIcon;
/** Timer used to remind us to check for software updates. */
QTimer _updateTimer;
+ /** The Glider process used to check for and download updates. */
+ GliderProcess _gliderProcess;
/** Defines the actions for the tray menu */
QAction* _controlPanelAct;