[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2120: Only remember the torrc and datadir values if Vidalia starte (in trunk: . src/gui/config)
Author: edmanm
Date: 2007-11-21 15:31:28 -0500 (Wed, 21 Nov 2007)
New Revision: 2120
Modified:
trunk/
trunk/CHANGELOG
trunk/src/gui/config/advancedpage.cpp
Log:
r2126@lysithea: edmanm | 2007-11-21 15:24:47 -0500
Only remember the torrc and datadir values if Vidalia started Tor, or
if the user changed the displayed values.
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r2126] on 0108964c-5b0b-4c9e-969f-e2288315d100
Modified: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG 2007-11-21 20:30:45 UTC (rev 2119)
+++ trunk/CHANGELOG 2007-11-21 20:31:28 UTC (rev 2120)
@@ -3,6 +3,8 @@
o GETCONF RelayBandwidthRate and RelayBandwidthBurst properly on Tor >=
0.2.0.1-alpha. Previously, we were SETCONFing RelayBandwidthFoo when
appropriate, but always GETCONFing BandwidthFoo. Fixes Ticket #298.
+ o Only remember the torrc and datadir values if Vidalia started Tor, or
+ if the user changed the displayed values.
o Fix some dumb logic in determing whether the Windows we're running on
supports Window transparency.
o Use the correct icon for the "Close Stream" context menu action in the
Modified: trunk/src/gui/config/advancedpage.cpp
===================================================================
--- trunk/src/gui/config/advancedpage.cpp 2007-11-21 20:30:45 UTC (rev 2119)
+++ trunk/src/gui/config/advancedpage.cpp 2007-11-21 20:31:28 UTC (rev 2120)
@@ -116,25 +116,34 @@
/* Validate the selected authentication options */
TorSettings::AuthenticationMethod authMethod =
indexToAuthMethod(ui.cmbAuthMethod->currentIndex());
- if (authMethod == TorSettings::PasswordAuth &&
- ui.linePassword->text().isEmpty() &&
- !ui.chkRandomPassword->isChecked()) {
+ if (authMethod == TorSettings::PasswordAuth
+ && ui.linePassword->text().isEmpty()
+ && !ui.chkRandomPassword->isChecked()) {
errmsg = tr("You selected 'Password' authentication, but did not "
"specify a password.");
return false;
}
+
+ /* Only remember the torrc and datadir values if Vidalia started Tor, or
+ * if the user changed the displayed values. */
+ if (!Vidalia::torControl()->isVidaliaRunningTor()) {
+ QString torrc = ui.lineTorConfig->text();
+ if (torrc != _settings->getTorrc())
+ _settings->setTorrc(torrc);
+ QString dataDir = ui.lineTorDataDirectory->text();
+ if (dataDir != _settings->getDataDirectory())
+ _settings->setDataDirectory(dataDir);
+ }
_settings->setControlAddress(controlAddress);
_settings->setControlPort(ui.lineControlPort->text().toUShort());
- _settings->setTorrc(ui.lineTorConfig->text());
- _settings->setDataDirectory(ui.lineTorDataDirectory->text());
_settings->setUser(ui.lineUser->text());
_settings->setGroup(ui.lineGroup->text());
_settings->setAuthenticationMethod(authMethod);
_settings->setUseRandomPassword(ui.chkRandomPassword->isChecked());
- if (authMethod == TorSettings::PasswordAuth &&
- !ui.chkRandomPassword->isChecked())
+ if (authMethod == TorSettings::PasswordAuth
+ && !ui.chkRandomPassword->isChecked())
_settings->setControlPassword(ui.linePassword->text());
#if defined(Q_WS_WIN)