mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 413437 - Locking homepage buttons to disable them is broken. patch from Michael Schonfeld <dev@schonfeld.org>, r=me.
This commit is contained in:
parent
5fb2f28e98
commit
c0a06d2b9a
@ -131,6 +131,7 @@ var gMainPane = {
|
||||
_updateUseCurrentButton: function () {
|
||||
var useCurrent = document.getElementById("useCurrent");
|
||||
|
||||
var windowIsPresent;
|
||||
var win;
|
||||
if (document.documentElement.instantApply) {
|
||||
const Cc = Components.classes, Ci = Components.interfaces;
|
||||
@ -144,7 +145,7 @@ var gMainPane = {
|
||||
|
||||
if (win && win.document.documentElement
|
||||
.getAttribute("windowtype") == "navigator:browser") {
|
||||
useCurrent.disabled = false;
|
||||
windowIsPresent = true;
|
||||
|
||||
var tabbrowser = win.document.getElementById("content");
|
||||
if (tabbrowser.browsers.length > 1)
|
||||
@ -153,9 +154,16 @@ var gMainPane = {
|
||||
useCurrent.label = useCurrent.getAttribute("label1");
|
||||
}
|
||||
else {
|
||||
windowIsPresent = false;
|
||||
useCurrent.label = useCurrent.getAttribute("label1");
|
||||
useCurrent.disabled = true;
|
||||
}
|
||||
|
||||
// In this case, the button's disabled state is set by preferences.xml.
|
||||
if (document.getElementById
|
||||
("pref.browser.homepage.disable_button.current_page").locked)
|
||||
return;
|
||||
|
||||
useCurrent.disabled = !windowIsPresent;
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user