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:
blakeross%telocity.com 2006-05-17 02:31:20 +00:00
Родитель ff88a0c0aa
Коммит 5ffb5a39e1
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -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