mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Remove mentions of restarting in the options panel when toggling the remote and chrome debugging prefs (bug 918240). r=jwalker,mratcliffe
This commit is contained in:
parent
70e387eb3d
commit
c2ba167c9e
@ -40,9 +40,6 @@ function OptionsPanel(iframeWindow, toolbox) {
|
||||
this.toolbox = toolbox;
|
||||
this.isReady = false;
|
||||
|
||||
// Make restart method available from xul
|
||||
this.panelWin.restart = this.restart;
|
||||
|
||||
EventEmitter.decorate(this);
|
||||
};
|
||||
|
||||
@ -57,7 +54,6 @@ OptionsPanel.prototype = {
|
||||
|
||||
this.setupToolsList();
|
||||
this.populatePreferences();
|
||||
this.prepareRestartPreferences();
|
||||
|
||||
this._disableJSClicked = this._disableJSClicked.bind(this);
|
||||
|
||||
@ -201,34 +197,6 @@ OptionsPanel.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles checkbox click inside hbox with class "hidden-labels-box". The
|
||||
* labels inside the hbox are shown again when the user click on the checkbox
|
||||
* in the box.
|
||||
*/
|
||||
prepareRestartPreferences: function() {
|
||||
let checkboxes = this.panelDoc.querySelectorAll(".hidden-labels-box > checkbox");
|
||||
for (let checkbox of checkboxes) {
|
||||
checkbox.addEventListener("command", function(target) {
|
||||
target.parentNode.classList.toggle("visible");
|
||||
}.bind(null, checkbox));
|
||||
}
|
||||
},
|
||||
|
||||
restart: function() {
|
||||
let canceled = Cc["@mozilla.org/supports-PRBool;1"]
|
||||
.createInstance(Ci.nsISupportsPRBool);
|
||||
Services.obs.notifyObservers(canceled, "quit-application-requested", "restart");
|
||||
if (canceled.data) {
|
||||
return;
|
||||
}
|
||||
|
||||
// restart
|
||||
Cc['@mozilla.org/toolkit/app-startup;1']
|
||||
.getService(Ci.nsIAppStartup)
|
||||
.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables JavaScript for the currently loaded tab. We force a page refresh
|
||||
* here because setting docShell.allowJavascript to true fails to block JS
|
||||
|
@ -74,21 +74,11 @@
|
||||
<checkbox label="&options.enableChrome.label3;"
|
||||
tooltiptext="&options.enableChrome.tooltip;"
|
||||
data-pref="devtools.chrome.enabled"/>
|
||||
<label class="options-citation-label"
|
||||
value="&options.context.requiresRestart2;"/>
|
||||
<label class="text-link"
|
||||
onclick="restart()"
|
||||
value="&options.restartButton.label;"/>
|
||||
</hbox>
|
||||
<hbox class="hidden-labels-box">
|
||||
<checkbox label="&options.enableRemote.label3;"
|
||||
tooltiptext="&options.enableRemote.tooltip;"
|
||||
data-pref="devtools.debugger.remote-enabled"/>
|
||||
<label class="options-citation-label"
|
||||
value="&options.context.requiresRestart2;"/>
|
||||
<label class="text-link"
|
||||
onclick="restart()"
|
||||
value="&options.restartButton.label;"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
@ -52,15 +52,6 @@
|
||||
- -->
|
||||
<!ENTITY options.defaultColorUnit.name "Color Names">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.context.requiresRestart2): This is the requires
|
||||
- restart label at right of settings that require a browser restart to be
|
||||
- effective. -->
|
||||
<!ENTITY options.context.requiresRestart2 "Requires browser restart">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.restartButton.label): This is the label for the
|
||||
- restart button next to options.context.requiresRestart2 label. -->
|
||||
<!ENTITY options.restartButton.label "Restart now">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.context.triggersPageRefresh2): This is the
|
||||
- triggers page refresh label next to the settings in the advanced settings
|
||||
- group in the options panel which trigger page reload. -->
|
||||
|
Loading…
Reference in New Issue
Block a user