зеркало из https://github.com/mozilla/gecko-dev.git
Turbo turns off if you go to the advanced panel and press ok without making any changes (99677). r=hewitt sr=ben
This commit is contained in:
Родитель
ff88a0c0aa
Коммит
5ffb5a39e1
|
@ -77,19 +77,16 @@
|
|||
frame.setAttribute("hidden", "true");
|
||||
return;
|
||||
}
|
||||
if (!("didCheckTurbo" in parent))
|
||||
parent.didCheckTurbo = false;
|
||||
if (!("isTurboEnabled" in parent))
|
||||
parent.isTurboEnabled = false;
|
||||
if (parent.didCheckTurbo) {
|
||||
parent.isTurboEnabled = -1;
|
||||
else {
|
||||
document.getElementById("enableTurbo").checked = parent.isTurboEnabled;
|
||||
return;
|
||||
}
|
||||
var winhooksService = Components.classes["@mozilla.org/winhooks;1"].getService(Components.interfaces.nsIWindowsHooks);
|
||||
if (winhooksService) {
|
||||
var isTurbo = winhooksService.isStartupTurboEnabled();
|
||||
document.getElementById("enableTurbo").checked = isTurbo;
|
||||
parent.didCheckTurbo = true;
|
||||
parent.isTurboEnabled = winhooksService.isStartupTurboEnabled();
|
||||
document.getElementById("enableTurbo").checked = parent.isTurboEnabled;
|
||||
}
|
||||
|
||||
parent.hPrefWindow.registerOKCallbackFunc( saveTurboSetting );
|
||||
|
@ -115,7 +112,7 @@
|
|||
return;
|
||||
|
||||
var winhooksService = Components.classes["@mozilla.org/winhooks;1"].getService(Components.interfaces.nsIWindowsHooks);
|
||||
if (winhooksService) {
|
||||
if (winhooksService && parent.isTurboEnabled != -1) {
|
||||
if (parent.isTurboEnabled)
|
||||
winhooksService.startupTurboEnable();
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче