[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r3230: Blow away the auto-update stuff from trunk. (in vidalia/trunk/src/vidalia: . config)
Author: edmanm
Date: 2008-10-14 18:04:00 -0400 (Tue, 14 Oct 2008)
New Revision: 3230
Removed:
vidalia/trunk/src/vidalia/updateprocess.cpp
vidalia/trunk/src/vidalia/updateprocess.h
Modified:
vidalia/trunk/src/vidalia/CMakeLists.txt
vidalia/trunk/src/vidalia/config/generalpage.cpp
vidalia/trunk/src/vidalia/config/generalpage.h
vidalia/trunk/src/vidalia/config/generalpage.ui
vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
vidalia/trunk/src/vidalia/config/vidaliasettings.h
vidalia/trunk/src/vidalia/mainwindow.cpp
vidalia/trunk/src/vidalia/mainwindow.h
Log:
Blow away the auto-update stuff from trunk.
Modified: vidalia/trunk/src/vidalia/CMakeLists.txt
===================================================================
--- vidalia/trunk/src/vidalia/CMakeLists.txt 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/CMakeLists.txt 2008-10-14 22:04:00 UTC (rev 3230)
@@ -186,7 +186,6 @@
vmessagebox.cpp
helperprocess.cpp
controlpasswordinputdialog.cpp
- updateprocess.cpp
)
qt4_wrap_cpp(vidalia_SRCS
vidalia.h
@@ -195,7 +194,6 @@
vidaliawindow.h
vmessagebox.h
helperprocess.h
- updateprocess.h
controlpasswordinputdialog.h
)
Modified: vidalia/trunk/src/vidalia/config/generalpage.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/generalpage.cpp 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/config/generalpage.cpp 2008-10-14 22:04:00 UTC (rev 3230)
@@ -35,15 +35,6 @@
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);
-#endif
}
/** Destructor */
@@ -125,8 +116,6 @@
ui.chkRunVidaliaAtSystemStartup->isChecked());
_vidaliaSettings->setRunProxyAtStart(
ui.chkRunProxyAtTorStartup->isChecked());
- _vidaliaSettings->setAutoUpdateEnabled(
- ui.chkAutoUpdates->isChecked());
return true;
}
@@ -144,19 +133,5 @@
ui.lineProxyExecutableArguments->setText(
string_format_arguments(_vidaliaSettings->getProxyExecutableArguments()));
ui.chkRunProxyAtTorStartup->setChecked(_vidaliaSettings->runProxyAtStart());
- ui.chkAutoUpdates->setChecked(_vidaliaSettings->isAutoUpdateEnabled());
}
-void
-GeneralPage::checkForUpdates()
-{
- /* TODO: Check for software updates. Ideally this will have a foreground
- * window that tells the user "Hey, your stuff is current!" or not.
- */
-
- /* Remember the last time we checked for updates */
- QDateTime lastCheckedAt = QDateTime::currentDateTime().toUTC();
- _vidaliaSettings->setLastCheckedForUpdates(lastCheckedAt);
-}
-
-
Modified: vidalia/trunk/src/vidalia/config/generalpage.h
===================================================================
--- vidalia/trunk/src/vidalia/config/generalpage.h 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/config/generalpage.h 2008-10-14 22:04:00 UTC (rev 3230)
@@ -45,8 +45,6 @@
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
Modified: vidalia/trunk/src/vidalia/config/generalpage.ui
===================================================================
--- vidalia/trunk/src/vidalia/config/generalpage.ui 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/config/generalpage.ui 2008-10-14 22:04:00 UTC (rev 3230)
@@ -149,55 +149,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="grpSoftwareUpdates" >
- <property name="title" >
- <string>Software Updates</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QCheckBox" name="chkAutoUpdates" >
- <property name="text" >
- <string>Check for new software updates automatically</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnUpdateNow" >
- <property name="text" >
- <string>Check Now</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.cpp
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.cpp 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.cpp 2008-10-14 22:04:00 UTC (rev 3230)
@@ -254,27 +254,3 @@
setValue(SETTING_PROXY_EXECUTABLE_ARGUMENTS, proxyExecutableArguments);
}
-bool
-VidaliaSettings::isAutoUpdateEnabled() const
-{
- return value(SETTING_CHECK_FOR_UPDATES).toBool();
-}
-
-void
-VidaliaSettings::setAutoUpdateEnabled(bool enabled)
-{
- setValue(SETTING_CHECK_FOR_UPDATES, enabled);
-}
-
-QDateTime
-VidaliaSettings::lastCheckedForUpdates() const
-{
- return value(SETTING_LAST_UPDATE_CHECK).toDateTime();
-}
-
-void
-VidaliaSettings::setLastCheckedForUpdates(const QDateTime &checkedAt)
-{
- setValue(SETTING_LAST_UPDATE_CHECK, checkedAt);
-}
-
Modified: vidalia/trunk/src/vidalia/config/vidaliasettings.h
===================================================================
--- vidalia/trunk/src/vidalia/config/vidaliasettings.h 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/config/vidaliasettings.h 2008-10-14 22:04:00 UTC (rev 3230)
@@ -17,7 +17,6 @@
#ifndef _VIDALIASETTINGS_H
#define _VIDALIASETTINGS_H
-#include <QDateTime>
#include "vsettings.h"
@@ -94,19 +93,6 @@
QStringList getProxyExecutableArguments() const;
/** Sets the additional arguments to be passed to Proxy Executable */
void setProxyExecutableArguments(const QStringList &proxyExecutableArguments);
-
- /** Returns true if Vidalia should automatically check for software updates.
- */
- bool isAutoUpdateEnabled() const;
- /** Sets to <b>enabled</b> whether Vidalia should automatically check for
- * software updates or not. */
- void setAutoUpdateEnabled(bool enabled);
-
- /** Returns the time at which Vidalia last checked for software updates. */
- QDateTime lastCheckedForUpdates() const;
- /** Sets to <b>checkedAt</b> the time at which Vidalia last checked for
- * available software updates. */
- void setLastCheckedForUpdates(const QDateTime &checkedAt);
};
#endif
Modified: vidalia/trunk/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.cpp 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/mainwindow.cpp 2008-10-14 22:04:00 UTC (rev 3230)
@@ -162,9 +162,6 @@
connect(vApp, SIGNAL(running()), this, SLOT(running()));
connect(vApp, SIGNAL(shutdown()), this, SLOT(shutdown()));
- /* Create a timer used to remind us to check for software updates */
- connect(&_updateTimer, SIGNAL(timeout()), this, SLOT(checkForUpdates()));
-
#if defined(USE_MINIUPNPC)
/* Catch UPnP-related signals */
connect(UPNPControl::instance(), SIGNAL(error(UPNPControl::UPNPError)),
@@ -274,19 +271,6 @@
/* Start the proxy server, if configured */
if (settings.runProxyAtStart())
startProxy();
-
- if (settings.isAutoUpdateEnabled()) {
- QDateTime lastCheckedAt = settings.lastCheckedForUpdates();
- if (UpdateProcess::shouldCheckForUpdates(lastCheckedAt)) {
- /* Initiate a background check for updates */
- checkForUpdates();
- } else {
- /* Schedule the next time to check for updates */
- QDateTime nextCheckAt = UpdateProcess::nextCheckForUpdates(lastCheckedAt);
- QDateTime now = QDateTime::currentDateTime().toUTC();
- _updateTimer.start((nextCheckAt.toTime_t() - now.toTime_t()) * 1000);
- }
- }
}
/** Terminate the Tor process if it is being run under Vidalia, disconnect all
@@ -1490,23 +1474,3 @@
}
#endif
-void
-MainWindow::checkForUpdates()
-{
- /* 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.
- */
- _updateProcess.checkForUpdates("takemeforarideonyourmagicglider.exe",
- QStringList() << "plztohasnewtor");
-
- /* 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());
-
- /* Restart the "Check for Updates" timer */
- _updateTimer.start(UpdateProcess::checkForUpdatesInterval() * 1000);
-}
-
Modified: vidalia/trunk/src/vidalia/mainwindow.h
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.h 2008-10-14 21:54:51 UTC (rev 3229)
+++ vidalia/trunk/src/vidalia/mainwindow.h 2008-10-14 22:04:00 UTC (rev 3230)
@@ -33,7 +33,6 @@
#include "ui_mainwindow.h"
#include "helperprocess.h"
#include "config.h"
-#include "updateprocess.h"
#if defined(USE_MINIUPNPC)
#include "config/upnpcontrol.h"
@@ -114,9 +113,6 @@
void onIMFailed(QString errmsg);
/** Called when the proxy server fails to start */
void onProxyFailed(QString errmsg);
- /** Called when the update interval timer expires, notifying Vidalia that
- * we should check for updates again. */
- void checkForUpdates();
#if defined(USE_MINIUPNPC)
/** Called when a UPnP error occurs. */
@@ -210,10 +206,6 @@
bool _useSavedPassword;
/** The Vidalia icon that sits in the tray. */
TrayIcon _trayIcon;
- /** Timer used to remind us to check for software updates. */
- QTimer _updateTimer;
- /** The auto-update process used to check for and download updates. */
- UpdateProcess _updateProcess;
/** The menubar (Mac OS X only). */
QMenuBar *_menuBar;
Deleted: vidalia/trunk/src/vidalia/updateprocess.cpp
Deleted: vidalia/trunk/src/vidalia/updateprocess.h