[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1982: Make TorSettings inherit from VSettings. At some point, it m (in trunk: . src/config)
Author: edmanm
Date: 2007-10-09 23:38:22 -0400 (Tue, 09 Oct 2007)
New Revision: 1982
Modified:
trunk/
trunk/src/config/torsettings.cpp
trunk/src/config/torsettings.h
Log:
r2014@lysithea: edmanm | 2007-10-09 23:17:38 -0400
Make TorSettings inherit from VSettings. At some point, it may be smart to
make this inherit from AbstractTorSettings, both for naming sanity (hah!) and
so we GETCONF things on the Advanced settings page, like DataDirectory.
(Clearly this matters less for something like ControlPort, which we would have
to know before we can GETCONF anything anyway.)
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2014] on dc66be73-d13e-47ba-a267-8dc7cda68c65
Modified: trunk/src/config/torsettings.cpp
===================================================================
--- trunk/src/config/torsettings.cpp 2007-10-10 03:38:15 UTC (rev 1981)
+++ trunk/src/config/torsettings.cpp 2007-10-10 03:38:22 UTC (rev 1982)
@@ -31,27 +31,26 @@
#include <util/crypto.h>
#include <vidalia.h>
-#include "torsettings.h"
-
-/* Tor Settings */
-#define SETTING_TOR_EXECUTABLE "Tor/TorExecutable"
-#define SETTING_TORRC "Tor/Torrc"
-#define SETTING_CONTROL_ADDR "Tor/ControlAddr"
-#define SETTING_CONTROL_PORT "Tor/ControlPort"
-#define SETTING_AUTH_TOKEN "Tor/AuthToken"
-#define SETTING_TOR_USER "Tor/User"
-#define SETTING_TOR_GROUP "Tor/Group"
-#define SETTING_DATA_DIRECTORY "Tor/DataDirectory"
-#define SETTING_AUTH_METHOD "Tor/AuthenticationMethod"
-#define SETTING_CONTROL_PASSWORD "Tor/ControlPassword"
-#define SETTING_USE_RANDOM_PASSWORD "Tor/UseRandomPassword"
-
-/* On win32, we need to add the .exe onto Tor's filename */
#if defined(Q_OS_WIN32)
#include <QFileInfo>
#include <util/win32.h>
#endif
+#include "torsettings.h"
+
+/* Tor Settings */
+#define SETTING_TOR_EXECUTABLE "TorExecutable"
+#define SETTING_TORRC "Torrc"
+#define SETTING_CONTROL_ADDR "ControlAddr"
+#define SETTING_CONTROL_PORT "ControlPort"
+#define SETTING_AUTH_TOKEN "AuthToken"
+#define SETTING_TOR_USER "User"
+#define SETTING_TOR_GROUP "Group"
+#define SETTING_DATA_DIRECTORY "DataDirectory"
+#define SETTING_AUTH_METHOD "AuthenticationMethod"
+#define SETTING_CONTROL_PASSWORD "ControlPassword"
+#define SETTING_USE_RANDOM_PASSWORD "UseRandomPassword"
+
/** Default to using hashed password authentication */
#define DEFAULT_AUTH_METHOD PasswordAuth
@@ -70,6 +69,7 @@
/** Default constructor */
TorSettings::TorSettings()
+: VSettings("Tor")
{
#if defined(Q_OS_WIN32)
QString programFiles = win32_program_files_folder();
Modified: trunk/src/config/torsettings.h
===================================================================
--- trunk/src/config/torsettings.h 2007-10-10 03:38:15 UTC (rev 1981)
+++ trunk/src/config/torsettings.h 2007-10-10 03:38:22 UTC (rev 1982)
@@ -30,11 +30,12 @@
#include <QHostAddress>
-#include "vidaliasettings.h"
+#include "vsettings.h"
+
/** Manages Tor-specific settings, such as location, command-line arguments,
* and control interface information. */
-class TorSettings : private VidaliaSettings
+class TorSettings : public VSettings
{
public:
/** Available Tor authentication methods. */