Commit e5b0e027 authored by Richard Pospesel's avatar Richard Pospesel
Browse files

Bug 27476: about:torconnect fixes and new strings

- torlauncher.properties::torlauncher.copiedNLogMessagesShort : reduced verbosity version of torlauncher.copiednLogMessages for Copy Log button tooltip
- network-settings.dtd::torConnect.copyLog : label for 'Copy Log' button in about:torconnect
- added various new strings for about:torconnect to en_US network-settings.dtd
- disables legacy launcher unless "TOR_USE_LEGACY_LAUNCHER" environet variable is defined
parent 3dc433e8
......@@ -81,3 +81,12 @@
<!ENTITY torPreferences.viewTorLogs "View the Tor logs.">
<!ENTITY torPreferences.viewLogs "View Logs…">
<!ENTITY torPreferences.torLogsDialogTitle "Tor Logs">
<!-- #24746 about:torconnect strings -->
<!ENTITY torConnect.tryAgain "Try Connecting Again">
<!ENTITY torConnect.offline "Offline">
<!ENTITY torConnect.connectMessage "Changes to Tor Settings will not take effect until you connect to the Tor Network">
<!ENTITY torConnect.tryAgainMessage "Tor Browser has failed to establish a connection to the Tor Network">
<!ENTITY torConnect.connectingConcise "Connecting…">
<!ENTITY torConnect.connectedConcise "Connected">
<!ENTITY torConnect.copyLog "Copy Tor Logs">
......@@ -93,3 +93,5 @@ torlauncher.bootstrapWarning.pt_missing=missing pluggable transport
torlauncher.nsresult.NS_ERROR_NET_RESET=The connection to the server was lost.
torlauncher.nsresult.NS_ERROR_CONNECTION_REFUSED=Could not connect to the server.
torlauncher.nsresult.NS_ERROR_PROXY_CONNECTION_REFUSED=Could not connect to the proxy.
torlauncher.copiedNLogMessages=Copied %S Logs
......@@ -583,6 +583,10 @@ TorProcessService.prototype =
if (aIsRunningTor)
this._monitorTorProcessStartup();
if (!TorLauncherUtil.useLegacyLauncher) {
return;
}
var bridgeConfigIsBad = (this._defaultBridgesStatus ==
this.kDefaultBridgesStatus_BadConfig);
if (TorLauncherUtil.shouldShowNetworkSettings || bridgeConfigIsBad)
......@@ -814,7 +818,7 @@ TorProcessService.prototype =
this.mObsSvc.notifyObservers(errorObj, aNotifyTopic, null);
}
if (!errorObj.handled)
if (TorLauncherUtil.useLegacyLauncher && !errorObj.handled)
{
let msg = aMessage;
if (aDetails)
......
......@@ -366,6 +366,17 @@ let TorLauncherUtil = // Public
return this.getBoolPref(kPrefPromptForLocale, true); */
},
get useLegacyLauncher() {
const kEnvUseLegacyLauncher = "TOR_USE_LEGACY_LAUNCHER";
const env = Cc["@mozilla.org/process/environment;1"].getService(
Ci.nsIEnvironment
);
if (env.exists(kEnvUseLegacyLauncher)) {
return "1" == env.get(kEnvUseLegacyLauncher);
}
return false;
},
get shouldShowNetworkSettings()
{
const kPrefPromptAtStartup = "extensions.torlauncher.prompt_at_startup";
......@@ -379,6 +390,10 @@ let TorLauncherUtil = // Public
return ("1" == env.get(kEnvForceShowNetConfig));
} catch(e) {}
if (!TorLauncherUtil.useLegacyLauncher) {
return true;
}
return this.getBoolPref(kPrefPromptAtStartup, true);
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment