[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [vidalia/alpha] Remove proxy settings handling
commit eee5de818256bd387cc4cedbfc81b7d20a9a774e
Author: Tomás Touceda <chiiph@xxxxxxxxxxxxxx>
Date: Sat Mar 17 17:25:01 2012 -0300
Remove proxy settings handling
---
changes/bug5386 | 2 +
src/vidalia/config/GeneralPage.cpp | 25 ---------
src/vidalia/config/GeneralPage.h | 2 -
src/vidalia/config/GeneralPage.ui | 91 +++----------------------------
src/vidalia/config/VidaliaSettings.cpp | 53 ------------------
src/vidalia/config/VidaliaSettings.h | 19 -------
6 files changed, 11 insertions(+), 181 deletions(-)
diff --git a/changes/bug5386 b/changes/bug5386
new file mode 100644
index 0000000..67c81b9
--- /dev/null
+++ b/changes/bug5386
@@ -0,0 +1,2 @@
+ o Remove the proxy settings handling since we do not use it
+ anymore. Fix bug 5386.
\ No newline at end of file
diff --git a/src/vidalia/config/GeneralPage.cpp b/src/vidalia/config/GeneralPage.cpp
index b6db202..1450cf3 100644
--- a/src/vidalia/config/GeneralPage.cpp
+++ b/src/vidalia/config/GeneralPage.cpp
@@ -35,8 +35,6 @@ GeneralPage::GeneralPage(QWidget *parent)
/* Bind event to actions */
connect(ui.btnBrowseTorExecutable, SIGNAL(clicked()),
this, SLOT(browseTorExecutable()));
- connect(ui.btnBrowseProxyExecutable, SIGNAL(clicked()),
- this, SLOT(browseProxyExecutable()));
connect(ui.btnUpdateNow, SIGNAL(clicked()), this, SLOT(updateNow()));
#if !defined(Q_OS_WIN32)
@@ -90,17 +88,6 @@ GeneralPage::browseTorExecutable()
ui.lineTorExecutable->setText(filePath);
}
-/** Open a QFileDialog to browse for a proxy executable file. */
-void
-GeneralPage::browseProxyExecutable()
-{
- QString filePath = browseExecutable(tr("Select Proxy Executable"),
- ui.lineProxyExecutable->text());
-
- if (! filePath.isEmpty())
- ui.lineProxyExecutable->setText(filePath);
-}
-
/** Saves all settings for this page */
bool
GeneralPage::save(QString &errmsg)
@@ -110,18 +97,11 @@ GeneralPage::save(QString &errmsg)
errmsg = tr("You must specify the name of your Tor executable.");
return false;
}
- if (ui.chkRunProxyAtTorStartup->isChecked()) {
- _vidaliaSettings->setProxyExecutable(ui.lineProxyExecutable->text());
- _vidaliaSettings->setProxyExecutableArguments(
- ui.lineProxyExecutableArguments->text());
- }
_torSettings->setExecutable(torExecutable);
_vidaliaSettings->setRunTorAtStart(ui.chkRunTorAtVidaliaStartup->isChecked());
_vidaliaSettings->setRunVidaliaOnBoot(
ui.chkRunVidaliaAtSystemStartup->isChecked());
- _vidaliaSettings->setRunProxyAtStart(
- ui.chkRunProxyAtTorStartup->isChecked());
return true;
}
@@ -134,11 +114,6 @@ GeneralPage::load()
ui.lineTorExecutable->setText(_torSettings->getExecutable());
ui.chkRunTorAtVidaliaStartup->setChecked(_vidaliaSettings->runTorAtStart());
-
- ui.lineProxyExecutable->setText(_vidaliaSettings->getProxyExecutable());
- ui.lineProxyExecutableArguments->setText(
- _vidaliaSettings->getProxyExecutableArguments());
- ui.chkRunProxyAtTorStartup->setChecked(_vidaliaSettings->runProxyAtStart());
}
void
diff --git a/src/vidalia/config/GeneralPage.h b/src/vidalia/config/GeneralPage.h
index e7bdbff..7809f1b 100644
--- a/src/vidalia/config/GeneralPage.h
+++ b/src/vidalia/config/GeneralPage.h
@@ -47,8 +47,6 @@ signals:
private slots:
/** Open a QFileDialog to browse for a Tor executable file. */
void browseTorExecutable();
- /** Open a QFileDialog to browse for a proxy executable file. */
- void browseProxyExecutable();
/** Initiate an immediate check for software updates. */
void updateNow();
diff --git a/src/vidalia/config/GeneralPage.ui b/src/vidalia/config/GeneralPage.ui
index 8aa494b..af26eb7 100644
--- a/src/vidalia/config/GeneralPage.ui
+++ b/src/vidalia/config/GeneralPage.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>492</width>
+ <width>494</width>
<height>402</height>
</rect>
</property>
@@ -77,79 +77,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="grpProxyExecutable">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="title">
- <string>Proxy Application (optional)</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="chkRunProxyAtTorStartup">
- <property name="text">
- <string>Start a proxy application when Tor starts</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QLineEdit" name="lineProxyExecutable">
- <property name="enabled">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnBrowseProxyExecutable">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Browse</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout">
- <item>
- <widget class="QLabel" name="lblProxyExecutableArguments">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="text">
- <string>Proxy Application Arguments:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QLineEdit" name="lineProxyExecutableArguments">
- <property name="enabled">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<widget class="QGroupBox" name="grpSoftwareUpdates">
<property name="title">
<string>Software Updates</string>
@@ -167,7 +94,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -176,11 +103,11 @@
</spacer>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -199,11 +126,11 @@
</widget>
</item>
<item>
- <spacer name="verticalSpacer" >
- <property name="orientation" >
+ <spacer name="verticalSpacer">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -214,7 +141,7 @@
</layout>
</widget>
<resources>
- <include location="../res/vidalia.qrc" />
+ <include location="../res/vidalia.qrc"/>
</resources>
<connections/>
</ui>
diff --git a/src/vidalia/config/VidaliaSettings.cpp b/src/vidalia/config/VidaliaSettings.cpp
index e99e484..c848358 100644
--- a/src/vidalia/config/VidaliaSettings.cpp
+++ b/src/vidalia/config/VidaliaSettings.cpp
@@ -32,9 +32,6 @@
#define SETTING_BROWSER_EXECUTABLE "BrowserExecutable"
#define SETTING_BROWSER_DIRECTORY "BrowserDirectory"
#define SETTING_IM_EXECUTABLE "IMExecutable"
-#define SETTING_RUN_PROXY_AT_START "RunProxyAtStart"
-#define SETTING_PROXY_EXECUTABLE "ProxyExecutable"
-#define SETTING_PROXY_EXECUTABLE_ARGUMENTS "ProxyExecutableArguments"
#define SETTING_CHECK_FOR_UPDATES "CheckForUpdates"
#define SETTING_LAST_UPDATE_CHECK "LastUpdateCheck"
#define SETTING_USE_LOCAL_GEOIP_DATABASE "UseLocalGeoIpDatabase"
@@ -74,9 +71,6 @@ VidaliaSettings::VidaliaSettings()
setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
setDefault(SETTING_BROWSER_EXECUTABLE, "");
setDefault(SETTING_IM_EXECUTABLE, "");
- setDefault(SETTING_RUN_PROXY_AT_START, false);
- setDefault(SETTING_PROXY_EXECUTABLE, "");
- setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QString());
#if defined(Q_WS_WIN)
setDefault(SETTING_CHECK_FOR_UPDATES, true);
#else
@@ -234,53 +228,6 @@ VidaliaSettings::setIMExecutable(const QString &IMExecutable)
setValue(SETTING_IM_EXECUTABLE, IMExecutable);
}
-/** Returns true if Vidalia should start a proxy application when it
- * starts. */
-bool
-VidaliaSettings::runProxyAtStart()
-{
- return value(SETTING_RUN_PROXY_AT_START).toBool();
-}
-
-/** Set whether to run a proxy application when Vidalia starts. */
-void
-VidaliaSettings::setRunProxyAtStart(bool run)
-{
- setValue(SETTING_RUN_PROXY_AT_START, run);
-}
-
-/** Returns a fully-qualified path to the proxy server, including the
- * executable name. */
-QString
-VidaliaSettings::getProxyExecutable() const
-{
- return QDir::convertSeparators(value(SETTING_PROXY_EXECUTABLE).toString());
-}
-
-/** Sets the location and name of the proxy server executable to the given
- * string. If set to the empty string, the proxy will not be started. */
-void
-VidaliaSettings::setProxyExecutable(const QString &proxyExecutable)
-{
- setValue(SETTING_PROXY_EXECUTABLE, proxyExecutable);
-}
-
-/** Returns a string containing additional command line arguments to be passed
- * to ProxyExecutable */
-QString
-VidaliaSettings::getProxyExecutableArguments() const
-{
- return value(SETTING_PROXY_EXECUTABLE_ARGUMENTS).toString();
-}
-
-/** Sets the additional arguments to be passed to Proxy Executable */
-void
-VidaliaSettings::setProxyExecutableArguments(const QString
- &proxyExecutableArguments)
-{
- setValue(SETTING_PROXY_EXECUTABLE_ARGUMENTS, proxyExecutableArguments);
-}
-
bool
VidaliaSettings::isAutoUpdateEnabled() const
{
diff --git a/src/vidalia/config/VidaliaSettings.h b/src/vidalia/config/VidaliaSettings.h
index c6b8f02..d1c83a2 100644
--- a/src/vidalia/config/VidaliaSettings.h
+++ b/src/vidalia/config/VidaliaSettings.h
@@ -91,25 +91,6 @@ public:
* string. If set to the empty string, the client will not be started. */
void setIMExecutable(const QString &IMExecutable);
- /** Returns true if Vidalia should start a proxy application when it
- * starts. */
- bool runProxyAtStart();
- /** Set whether to run a proxy application when Vidalia starts. */
- void setRunProxyAtStart(bool run);
-
- /** Returns a fully-qualified path to the proxy server, including the
- * executable name. */
- QString getProxyExecutable() const;
- /** Sets the location and name of the proxy server executable to the given
- * string. If set to the empty string, the proxy will not be started. */
- void setProxyExecutable(const QString &proxyExecutable);
-
- /** Returns a list containing additional command line arguments to be
- * passed to ProxyExecutable */
- QString getProxyExecutableArguments() const;
- /** Sets the additional arguments to be passed to Proxy Executable */
- void setProxyExecutableArguments(const QString &proxyExecutableArguments);
-
/** Returns true if Vidalia should automatically check for software updates.
*/
bool isAutoUpdateEnabled() const;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits