Commit 270bb21f authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Improve Windows and Linux look and feel.

parent 1d4770ac
......@@ -49,6 +49,7 @@
<hbox align="center">
<menulist id="proxyType" oncommand="onProxyTypeChange()">
<menupopup id="proxyType_menuPopup">
<menuitem label="-" value="" selected="true" />
<menuitem label="&torsettings.useProxy.type.socks4;"
value="SOCKS4"/>
<menuitem label="&torsettings.useProxy.type.socks5;"
......
......@@ -18,7 +18,7 @@
title="&torsettings.dialog.title;"
windowtype="TorLauncher:NetworkSettings"
persist="screenX screenY"
buttonlabelextra1="&torsettings.copyLog;"
buttonlabelextra2="&torsettings.copyLog;"
onwizardfinish="return applySettings();"
onwizardcancel="return onCancel();"
onload="initDialog();">
......@@ -26,7 +26,8 @@
<script type="application/x-javascript"
src="chrome://torlauncher/content/network-settings.js"/>
<wizardpage label=" " pageid="proxy" next="firewall" onextra1="onCopyLog();"
<wizardpage label=" " pageid="proxy" next="firewall" onextra2="onCopyLog();"
onpageshow="showOrHideButton('next', true, true)"
onpageadvanced="return onWizardProxyNext(this);">
<hbox class="tbb-header">
<vbox class="tbb-logo-box" align="start">
......@@ -51,7 +52,7 @@
</hbox>
</wizardpage>
<wizardpage pageid="proxyYES" next="firewall" onextra1="onCopyLog();"
<wizardpage pageid="proxyYES" next="firewall" onextra2="onCopyLog();"
onpageadvanced="return (getAndValidateProxySettings() != null)">
<vbox class="tbb-logo-box" align="start">
<image class="tbb-logo" />
......@@ -61,7 +62,8 @@
<groupbox id="proxySpecificSettings" />
</wizardpage>
<wizardpage pageid="firewall" next="bridges" onextra1="onCopyLog();"
<wizardpage pageid="firewall" next="bridges" onextra2="onCopyLog();"
onpageshow="showOrHideButton('next', true, true)"
onpageadvanced="return onWizardFirewallNext(this);">
<vbox class="tbb-logo-box" align="start">
<image class="tbb-logo" />
......@@ -80,7 +82,7 @@
</hbox>
</wizardpage>
<wizardpage pageid="firewallYES" next="bridges" onextra1="onCopyLog();"
<wizardpage pageid="firewallYES" next="bridges" onextra2="onCopyLog();"
onpageadvanced="return (getAndValidateFirewallSettings() != null)">
<vbox class="tbb-logo-box" align="start">
<image class="tbb-logo" />
......@@ -92,7 +94,7 @@
</vbox>
</wizardpage>
<wizardpage label=" " pageid="bridges" onextra1="onCopyLog();"
<wizardpage label=" " pageid="bridges" onextra2="onCopyLog();"
onpageshow="showOrHideButton('finish', true, true)">
<vbox class="tbb-logo-box" align="start">
<image class="tbb-logo" />
......@@ -115,7 +117,7 @@
</wizardpage>
<wizardpage label=" " pageid="errorPanel" next="notUsed"
onextra1="onCopyLog();">
onextra2="onCopyLog();">
</wizardpage>
<wizardpage class="help" label=" " pageid="bridgeHelp" next="notUsed"
......
......@@ -104,11 +104,11 @@ function initDialog()
if (haveWizard)
{
// Set "Copy Tor Log" label and move it after the Quit (cancel) button.
var copyLogBtn = document.documentElement.getButton("extra1");
var copyLogBtn = document.documentElement.getButton("extra2");
if (copyLogBtn)
{
copyLogBtn.label = wizardElem.getAttribute("buttonlabelextra1");
if (cancelBtn && !TorLauncherUtil.isWindows)
copyLogBtn.label = wizardElem.getAttribute("buttonlabelextra2");
if (cancelBtn && TorLauncherUtil.isMac)
cancelBtn.parentNode.insertBefore(copyLogBtn, cancelBtn.nextSibling);
}
......@@ -119,6 +119,19 @@ function initDialog()
var finishBtn = document.documentElement.getButton("finish");
if (finishBtn)
finishBtn.label = TorLauncherUtil.getLocalizedString("connect");
// Add label and access key to Help button.
var helpBtn = document.documentElement.getButton("help");
if (helpBtn)
{
var strBundle = Cc["@mozilla.org/intl/stringbundle;1"]
.getService(Ci.nsIStringBundleService)
.createBundle("chrome://global/locale/dialog.properties");
helpBtn.setAttribute("label", strBundle.GetStringFromName("button-help"));
var accessKey = strBundle.GetStringFromName("accesskey-help");
if (accessKey)
helpBtn.setAttribute("accesskey", accessKey);
}
}
gObsService.addObserver(gObserver, kTorBootstrapErrorTopic, false);
......@@ -250,7 +263,7 @@ function showPanel(aPanelID)
if (deckElem)
{
deckElem.selectedPanel = document.getElementById(aPanelID);
showOrHideButton("extra1", (aPanelID != "bridgeHelp"), false);
showOrHideButton("extra2", (aPanelID != "bridgeHelp"), false);
}
else
getWizard().goTo(aPanelID);
......@@ -270,7 +283,7 @@ function wizardShowCopyLogButton()
{
if (getWizard())
{
var copyLogBtn = document.documentElement.getButton("extra1");
var copyLogBtn = document.documentElement.getButton("extra2");
if (copyLogBtn)
{
copyLogBtn.setAttribute("wizardCanCopyLog", true);
......@@ -423,7 +436,7 @@ function onOpenHelp()
{
showOrHideButton("cancel", false, false);
showOrHideButton("back", false, false);
showOrHideButton("extra1", false, false);
showOrHideButton("extra2", false, false);
overrideButtonLabel("next", "done");
}
else
......@@ -442,7 +455,7 @@ function closeHelp()
{
showOrHideButton("cancel", true, false);
showOrHideButton("back", true, false);
var copyLogBtn = document.documentElement.getButton("extra1");
var copyLogBtn = document.documentElement.getButton("extra2");
if (copyLogBtn && copyLogBtn.hasAttribute("wizardCanCopyLog"))
copyLogBtn.removeAttribute("hidden");
restoreButtonLabel("next");
......@@ -876,7 +889,7 @@ function showSaveSettingsAlert(aDetails)
"failed_to_save_settings", [aDetails], 1);
TorLauncherUtil.showAlert(window, s);
showOrHideButton("extra1", true, false);
showOrHideButton("extra2", true, false);
gWizIsCopyLogBtnShowing = true;
}
......
......@@ -18,11 +18,11 @@
title="&torsettings.dialog.title;"
windowtype="TorLauncher:NetworkSettings"
persist="screenX screenY"
buttons="accept,cancel,extra1,help"
buttonlabelextra1="&torsettings.copyLog;"
buttons="accept,cancel,extra2,help"
buttonlabelextra2="&torsettings.copyLog;"
ondialogaccept="return applySettings();"
ondialogcancel="return onCancel();"
ondialogextra1="onCopyLog();"
ondialogextra2="onCopyLog();"
ondialoghelp="onOpenHelp();"
onload="initDialog();">
......
......@@ -41,7 +41,7 @@ function initDialog()
if (gOpenerCallbackFunc)
{
// Dialog was opened from network settings: hide Open Settings button.
var extraBtn = document.documentElement.getButton("extra1");
var extraBtn = document.documentElement.getButton("extra2");
extraBtn.setAttribute("hidden", true);
}
else
......
......@@ -16,10 +16,10 @@
title="&torprogress.dialog.title;"
windowtype="TorLauncher:Progress"
persist="screenX screenY"
buttons="cancel,extra1"
buttonlabelextra1="&torprogress.openSettings;"
buttons="cancel,extra2"
buttonlabelextra2="&torprogress.openSettings;"
ondialogcancel="return onCancel();"
ondialogextra1="onOpenSettings();"
ondialogextra2="onOpenSettings();"
onload="initDialog();">
<script type="application/x-javascript"
......
......@@ -18,7 +18,15 @@ wizard {
padding-top: 0px;
}
.wizard-page-box {
padding: 0px;
margin: 20px;
}
wizard .wizard-header { display: none; }
#forAssistance {
margin-left: 12px;
margin-bottom: 6px;
-moz-user-select: text;
-moz-user-focus: normal;
......
Markdown is supported
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