[PALEMOON] Replace tabs with 2 spaces in statusbar component

This commit is contained in:
NTD 2018-04-20 16:10:23 -04:00 • committed by Roy Tam
commit 1f12910aa2
15 changed files with 3814 additions and 3816 deletions

File diff suppressed because it is too large Load diff

View file

@ -12,172 +12,172 @@ const CU = Components.utils;
CU.import("resource://gre/modules/XPCOMUtils.jsm"); CU.import("resource://gre/modules/XPCOMUtils.jsm");
function S4EProgressService(gBrowser, service, getters, statusService) { function S4EProgressService(gBrowser, service, getters, statusService) {
this._gBrowser = gBrowser; this._gBrowser = gBrowser;
this._service = service; this._service = service;
this._getters = getters; this._getters = getters;
this._statusService = statusService; this._statusService = statusService;
this._gBrowser.addProgressListener(this); this._gBrowser.addProgressListener(this);
} }
S4EProgressService.prototype = S4EProgressService.prototype =
{ {
_gBrowser: null, _gBrowser: null,
_service: null, _service: null,
_getters: null, _getters: null,
_statusService: null, _statusService: null,
_busyUI: false, _busyUI: false,
set value(val) set value(val)
{ {
let toolbar_progress = this._getters.toolbarProgress; let toolbar_progress = this._getters.toolbarProgress;
if(toolbar_progress) if(toolbar_progress)
{ {
toolbar_progress.value = val; toolbar_progress.value = val;
} }
let throbber_progress = this._getters.throbberProgress; let throbber_progress = this._getters.throbberProgress;
if(throbber_progress) if(throbber_progress)
{ {
if(val) if(val)
{ {
throbber_progress.setAttribute("progress", val); throbber_progress.setAttribute("progress", val);
} }
else else
{ {
throbber_progress.removeAttribute("progress"); throbber_progress.removeAttribute("progress");
} }
} }
}, },
set collapsed(val) set collapsed(val)
{ {
let toolbar_progress = this._getters.toolbarProgress; let toolbar_progress = this._getters.toolbarProgress;
if(toolbar_progress) if(toolbar_progress)
{ {
toolbar_progress.collapsed = val; toolbar_progress.collapsed = val;
} }
let throbber_progress = this._getters.throbberProgress; let throbber_progress = this._getters.throbberProgress;
if(throbber_progress) if(throbber_progress)
{ {
if(val) if(val)
{ {
throbber_progress.removeAttribute("busy"); throbber_progress.removeAttribute("busy");
} }
else else
{ {
throbber_progress.setAttribute("busy", true); throbber_progress.setAttribute("busy", true);
} }
} }
}, },
destroy: function() destroy: function()
{ {
this._gBrowser.removeProgressListener(this); this._gBrowser.removeProgressListener(this);
["_gBrowser", "_service", "_getters", "_statusService"].forEach(function(prop) ["_gBrowser", "_service", "_getters", "_statusService"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
{ {
this._statusService.setNetworkStatus(aMessage, this._busyUI); this._statusService.setNetworkStatus(aMessage, this._busyUI);
}, },
onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)
{ {
let nsIWPL = CI.nsIWebProgressListener; let nsIWPL = CI.nsIWebProgressListener;
if(!this._busyUI if(!this._busyUI
&& aStateFlags & nsIWPL.STATE_START && aStateFlags & nsIWPL.STATE_START
&& aStateFlags & nsIWPL.STATE_IS_NETWORK && aStateFlags & nsIWPL.STATE_IS_NETWORK
&& !(aStateFlags & nsIWPL.STATE_RESTORING)) && !(aStateFlags & nsIWPL.STATE_RESTORING))
{ {
this._busyUI = true; this._busyUI = true;
this.value = 0; this.value = 0;
this.collapsed = false; this.collapsed = false;
} }
else if(aStateFlags & nsIWPL.STATE_STOP) else if(aStateFlags & nsIWPL.STATE_STOP)
{ {
if(aRequest) if(aRequest)
{ {
let msg = ""; let msg = "";
let location; let location;
if(aRequest instanceof CI.nsIChannel || "URI" in aRequest) if(aRequest instanceof CI.nsIChannel || "URI" in aRequest)
{ {
location = aRequest.URI; location = aRequest.URI;
if(location.spec != "about:blank") if(location.spec != "about:blank")
{ {
switch (aStatus) switch (aStatus)
{ {
case Components.results.NS_BINDING_ABORTED: case Components.results.NS_BINDING_ABORTED:
msg = this._getters.strings.getString("nv_stopped"); msg = this._getters.strings.getString("nv_stopped");
break; break;
case Components.results.NS_ERROR_NET_TIMEOUT: case Components.results.NS_ERROR_NET_TIMEOUT:
msg = this._getters.strings.getString("nv_timeout"); msg = this._getters.strings.getString("nv_timeout");
break; break;
} }
} }
} }
if(!msg && (!location || location.spec != "about:blank")) if(!msg && (!location || location.spec != "about:blank"))
{ {
msg = this._getters.strings.getString("nv_done"); msg = this._getters.strings.getString("nv_done");
} }
this._statusService.setDefaultStatus(msg); this._statusService.setDefaultStatus(msg);
this._statusService.setNetworkStatus("", this._busyUI); this._statusService.setNetworkStatus("", this._busyUI);
} }
if(this._busyUI) if(this._busyUI)
{ {
this._busyUI = false; this._busyUI = false;
this.collapsed = true; this.collapsed = true;
this.value = 0; this.value = 0;
} }
} }
}, },
onUpdateCurrentBrowser: function(aStateFlags, aStatus, aMessage, aTotalProgress) onUpdateCurrentBrowser: function(aStateFlags, aStatus, aMessage, aTotalProgress)
{ {
let nsIWPL = CI.nsIWebProgressListener; let nsIWPL = CI.nsIWebProgressListener;
let loadingDone = aStateFlags & nsIWPL.STATE_STOP; let loadingDone = aStateFlags & nsIWPL.STATE_STOP;
this.onStateChange( this.onStateChange(
this._gBrowser.webProgress, this._gBrowser.webProgress,
{ URI: this._gBrowser.currentURI }, { URI: this._gBrowser.currentURI },
((loadingDone ? nsIWPL.STATE_STOP : nsIWPL.STATE_START) | (aStateFlags & nsIWPL.STATE_IS_NETWORK)), ((loadingDone ? nsIWPL.STATE_STOP : nsIWPL.STATE_START) | (aStateFlags & nsIWPL.STATE_IS_NETWORK)),
aStatus aStatus
); );
if(!loadingDone) if(!loadingDone)
{ {
this.onProgressChange(this._gBrowser.webProgress, null, 0, 0, aTotalProgress, 1); this.onProgressChange(this._gBrowser.webProgress, null, 0, 0, aTotalProgress, 1);
this.onStatusChange(this._gBrowser.webProgress, null, 0, aMessage); this.onStatusChange(this._gBrowser.webProgress, null, 0, aMessage);
} }
}, },
onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
{ {
if (aMaxTotalProgress > 0 && this._busyUI) if (aMaxTotalProgress > 0 && this._busyUI)
{ {
// This is highly optimized. Don't touch this code unless // This is highly optimized. Don't touch this code unless
// you are intimately familiar with the cost of setting // you are intimately familiar with the cost of setting
// attrs on XUL elements. -- hyatt // attrs on XUL elements. -- hyatt
let percentage = (aCurTotalProgress * 100) / aMaxTotalProgress; let percentage = (aCurTotalProgress * 100) / aMaxTotalProgress;
this.value = percentage; this.value = percentage;
} }
}, },
onProgressChange64: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) onProgressChange64: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)
{ {
return this.onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); return this.onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
}, },
QueryInterface: XPCOMUtils.generateQI([ CI.nsIWebProgressListener, CI.nsIWebProgressListener2 ]) QueryInterface: XPCOMUtils.generateQI([ CI.nsIWebProgressListener, CI.nsIWebProgressListener2 ])
}; };

View file

@ -13,452 +13,452 @@ CU.import("resource://gre/modules/XPCOMUtils.jsm");
function S4EStatusService(window, service, getters) function S4EStatusService(window, service, getters)
{ {
this._window = window; this._window = window;
this._service = service; this._service = service;
this._getters = getters; this._getters = getters;
this._overLinkService = new S4EOverlinkService(this._window, this._service, this); this._overLinkService = new S4EOverlinkService(this._window, this._service, this);
} }
S4EStatusService.prototype = S4EStatusService.prototype =
{ {
_window: null, _window: null,
_service: null, _service: null,
_getters: null, _getters: null,
_overLinkService: null, _overLinkService: null,
_overLink: { val: "", type: "" }, _overLink: { val: "", type: "" },
_network: { val: "", type: "" }, _network: { val: "", type: "" },
_networkXHR: { val: "", type: "" }, _networkXHR: { val: "", type: "" },
_status: { val: "", type: "" }, _status: { val: "", type: "" },
_jsStatus: { val: "", type: "" }, _jsStatus: { val: "", type: "" },
_defaultStatus: { val: "", type: "" }, _defaultStatus: { val: "", type: "" },
_isFullScreen: false, _isFullScreen: false,
_isFullScreenVideo: false, _isFullScreenVideo: false,
_statusText: { val: "", type: "" }, _statusText: { val: "", type: "" },
_noUpdate: false, _noUpdate: false,
_statusChromeTimeoutID: 0, _statusChromeTimeoutID: 0,
_statusContentTimeoutID: 0, _statusContentTimeoutID: 0,
getCompositeStatusText: function() getCompositeStatusText: function()
{ {
return this._statusText.val; return this._statusText.val;
}, },
getStatusText: function() getStatusText: function()
{ {
return this._status.val; return this._status.val;
}, },
setNetworkStatus: function(status, busy) setNetworkStatus: function(status, busy)
{ {
if(busy) if(busy)
{ {
this._network = { val: status, type: "network" }; this._network = { val: status, type: "network" };
this._networkXHR = { val: "", type: "network xhr" }; this._networkXHR = { val: "", type: "network xhr" };
} }
else else
{ {
this._networkXHR = { val: status, type: "network xhr" }; this._networkXHR = { val: status, type: "network xhr" };
} }
this.updateStatusField(); this.updateStatusField();
}, },
setStatusText: function(status) setStatusText: function(status)
{ {
this._status = { val: status, type: "status chrome" }; this._status = { val: status, type: "status chrome" };
this.updateStatusField(); this.updateStatusField();
}, },
setJSStatus: function(status) setJSStatus: function(status)
{ {
this._jsStatus = { val: status, type: "status content" }; this._jsStatus = { val: status, type: "status content" };
this.updateStatusField(); this.updateStatusField();
}, },
setJSDefaultStatus: function(status) setJSDefaultStatus: function(status)
{ {
// This was removed from Firefox in Bug 862917 // This was removed from Firefox in Bug 862917
}, },
setDefaultStatus: function(status) setDefaultStatus: function(status)
{ {
this._defaultStatus = { val: status, type: "status chrome default" }; this._defaultStatus = { val: status, type: "status chrome default" };
this.updateStatusField(); this.updateStatusField();
}, },
setOverLink: function(link, aAnchor) setOverLink: function(link, aAnchor)
{ {
this._overLinkService.update(link, aAnchor); this._overLinkService.update(link, aAnchor);
}, },
setOverLinkInternal: function(link, aAnchor) setOverLinkInternal: function(link, aAnchor)
{ {
let status = this._service.status; let status = this._service.status;
let statusLinkOver = this._service.statusLinkOver; let statusLinkOver = this._service.statusLinkOver;
if(statusLinkOver) if(statusLinkOver)
{ {
link = link.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g, encodeURIComponent); link = link.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g, encodeURIComponent);
if(status == statusLinkOver) if(status == statusLinkOver)
{ {
this._overLink = { val: link, type: "overLink", anchor: aAnchor }; this._overLink = { val: link, type: "overLink", anchor: aAnchor };
this.updateStatusField(); this.updateStatusField();
} }
else else
{ {
this.setStatusField(statusLinkOver, { val: link, type: "overLink", anchor: aAnchor }, true); this.setStatusField(statusLinkOver, { val: link, type: "overLink", anchor: aAnchor }, true);
} }
} }
}, },
setNoUpdate: function(nu) setNoUpdate: function(nu)
{ {
this._noUpdate = nu; this._noUpdate = nu;
}, },
buildBinding: function() { buildBinding: function() {
let XULBWPropHandler = function(prop, oldval, newval) { let XULBWPropHandler = function(prop, oldval, newval) {
CU.reportError("Attempt to modify XULBrowserWindow." + prop); CU.reportError("Attempt to modify XULBrowserWindow." + prop);
return oldval; return oldval;
}; };
["updateStatusField", "onStatusChange"].forEach(function(prop) ["updateStatusField", "onStatusChange"].forEach(function(prop)
{ {
this._window.XULBrowserWindow.unwatch(prop); this._window.XULBrowserWindow.unwatch(prop);
this._window.XULBrowserWindow[prop] = function() {}; this._window.XULBrowserWindow[prop] = function() {};
this._window.XULBrowserWindow.watch(prop, XULBWPropHandler); this._window.XULBrowserWindow.watch(prop, XULBWPropHandler);
}, this); }, this);
["getCompositeStatusText", "getStatusText", "setStatusText", "setJSStatus", ["getCompositeStatusText", "getStatusText", "setStatusText", "setJSStatus",
"setJSDefaultStatus", "setDefaultStatus", "setOverLink"].forEach(function(prop) "setJSDefaultStatus", "setDefaultStatus", "setOverLink"].forEach(function(prop)
{ {
this._window.XULBrowserWindow.unwatch(prop); this._window.XULBrowserWindow.unwatch(prop);
this._window.XULBrowserWindow[prop] = this[prop].bind(this); this._window.XULBrowserWindow[prop] = this[prop].bind(this);
this._window.XULBrowserWindow.watch(prop, XULBWPropHandler); this._window.XULBrowserWindow.watch(prop, XULBWPropHandler);
}, this); }, this);
let XULBWHandler = function(prop, oldval, newval) { let XULBWHandler = function(prop, oldval, newval) {
if(!newval) if(!newval)
{ {
return newval; return newval;
} }
CU.reportError("XULBrowserWindow changed. Updating S4E bindings."); CU.reportError("XULBrowserWindow changed. Updating S4E bindings.");
this._window.setTimeout(function(self) this._window.setTimeout(function(self)
{ {
self.buildBinding(); self.buildBinding();
}, 0, this); }, 0, this);
return newval; return newval;
}; };
this._window.watch("XULBrowserWindow", XULBWHandler); this._window.watch("XULBrowserWindow", XULBWHandler);
}, },
destroy: function() destroy: function()
{ {
// No need to unbind from the XULBrowserWindow, it's already null at this point // No need to unbind from the XULBrowserWindow, it's already null at this point
this.clearTimer("_statusChromeTimeoutID"); this.clearTimer("_statusChromeTimeoutID");
this.clearTimer("_statusContentTimeoutID"); this.clearTimer("_statusContentTimeoutID");
this._overLinkService.destroy(); this._overLinkService.destroy();
["_overLink", "_network", "_networkXHR", "_status", "_jsStatus", "_defaultStatus", ["_overLink", "_network", "_networkXHR", "_status", "_jsStatus", "_defaultStatus",
"_statusText", "_window", "_service", "_getters", "_overLinkService"].forEach(function(prop) "_statusText", "_window", "_service", "_getters", "_overLinkService"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
buildTextOrder: function() buildTextOrder: function()
{ {
this.__defineGetter__("_textOrder", function() this.__defineGetter__("_textOrder", function()
{ {
let textOrder = ["_overLink"]; let textOrder = ["_overLink"];
if(this._service.statusNetwork) if(this._service.statusNetwork)
{ {
textOrder.push("_network"); textOrder.push("_network");
if(this._service.statusNetworkXHR) if(this._service.statusNetworkXHR)
{ {
textOrder.push("_networkXHR"); textOrder.push("_networkXHR");
} }
} }
textOrder.push("_status", "_jsStatus"); textOrder.push("_status", "_jsStatus");
if(this._service.statusDefault) if(this._service.statusDefault)
{ {
textOrder.push("_defaultStatus"); textOrder.push("_defaultStatus");
} }
delete this._textOrder; delete this._textOrder;
return this._textOrder = textOrder; return this._textOrder = textOrder;
}); });
}, },
updateStatusField: function(force) updateStatusField: function(force)
{ {
let text = { val: "", type: "" }; let text = { val: "", type: "" };
for(let i = 0; !text.val && i < this._textOrder.length; i++) for(let i = 0; !text.val && i < this._textOrder.length; i++)
{ {
text = this[this._textOrder[i]]; text = this[this._textOrder[i]];
} }
if(this._statusText.val != text.val || force) if(this._statusText.val != text.val || force)
{ {
if(this._noUpdate) if(this._noUpdate)
{ {
return; return;
} }
this._statusText = text; this._statusText = text;
this.setStatusField(this._service.status, text, false); this.setStatusField(this._service.status, text, false);
if(text.val && this._service.statusTimeout) if(text.val && this._service.statusTimeout)
{ {
this.setTimer(text.type); this.setTimer(text.type);
} }
} }
}, },
updateFullScreen: function() updateFullScreen: function()
{ {
this._isFullScreen = this._window.fullScreen; this._isFullScreen = this._window.fullScreen;
this._isFullScreenVideo = false; this._isFullScreenVideo = false;
if(this._isFullScreen) if(this._isFullScreen)
{ {
let fsEl = this._window.content.document.mozFullScreenElement; let fsEl = this._window.content.document.mozFullScreenElement;
if(fsEl && (fsEl.nodeName == "VIDEO" || fsEl.getElementsByTagName("VIDEO").length > 0)) if(fsEl && (fsEl.nodeName == "VIDEO" || fsEl.getElementsByTagName("VIDEO").length > 0))
{ {
this._isFullScreenVideo = true; this._isFullScreenVideo = true;
} }
} }
this.clearStatusField(); this.clearStatusField();
this.updateStatusField(true); this.updateStatusField(true);
}, },
setTimer: function(type) setTimer: function(type)
{ {
let typeArgs = type.split(" ", 3); let typeArgs = type.split(" ", 3);
if(typeArgs.length < 2 || typeArgs[0] != "status") if(typeArgs.length < 2 || typeArgs[0] != "status")
{ {
return; return;
} }
if(typeArgs[1] == "chrome") if(typeArgs[1] == "chrome")
{ {
this.clearTimer("_statusChromeTimeoutID"); this.clearTimer("_statusChromeTimeoutID");
this._statusChromeTimeoutID = this._window.setTimeout(function(self, isDefault) this._statusChromeTimeoutID = this._window.setTimeout(function(self, isDefault)
{ {
self._statusChromeTimeoutID = 0; self._statusChromeTimeoutID = 0;
if(isDefault) if(isDefault)
{ {
self.setDefaultStatus(""); self.setDefaultStatus("");
} }
else else
{ {
self.setStatusText(""); self.setStatusText("");
} }
}, this._service.statusTimeout, this, (typeArgs.length == 3 && typeArgs[2] == "default")); }, this._service.statusTimeout, this, (typeArgs.length == 3 && typeArgs[2] == "default"));
} }
else else
{ {
this.clearTimer("_statusContentTimeoutID"); this.clearTimer("_statusContentTimeoutID");
this._statusContentTimeoutID = this._window.setTimeout(function(self) this._statusContentTimeoutID = this._window.setTimeout(function(self)
{ {
self._statusContentTimeoutID = 0; self._statusContentTimeoutID = 0;
self.setJSStatus(""); self.setJSStatus("");
}, this._service.statusTimeout, this); }, this._service.statusTimeout, this);
} }
}, },
clearTimer: function(timerName) clearTimer: function(timerName)
{ {
if(this[timerName] != 0) if(this[timerName] != 0)
{ {
this._window.clearTimeout(this[timerName]); this._window.clearTimeout(this[timerName]);
this[timerName] = 0; this[timerName] = 0;
} }
}, },
clearStatusField: function() clearStatusField: function()
{ {
this._getters.statusOverlay.value = ""; this._getters.statusOverlay.value = "";
let status_label = this._getters.statusWidgetLabel; let status_label = this._getters.statusWidgetLabel;
if(status_label) if(status_label)
{ {
status_label.value = ""; status_label.value = "";
} }
}, },
setStatusField: function(location, text, allowTooltip) setStatusField: function(location, text, allowTooltip)
{ {
if(!location) if(!location)
{ {
return; return;
} }
let label = null; let label = null;
if(this._isFullScreen && this._service.advancedStatusDetectFullScreen) if(this._isFullScreen && this._service.advancedStatusDetectFullScreen)
{ {
switch(location) switch(location)
{ {
case 1: // Toolbar case 1: // Toolbar
location = 3 location = 3
break; break;
case 2: // URL bar case 2: // URL bar
if(Services.prefs.getBoolPref("browser.fullscreen.autohide")) if(Services.prefs.getBoolPref("browser.fullscreen.autohide"))
{ {
location = 3 location = 3
} }
break; break;
} }
} }
switch(location) switch(location)
{ {
case 1: // Toolbar case 1: // Toolbar
label = this._getters.statusWidgetLabel; label = this._getters.statusWidgetLabel;
break; break;
case 2: // URL Bar case 2: // URL Bar
break; break;
case 3: // Popup case 3: // Popup
default: default:
if(this._isFullScreenVideo && this._service.advancedStatusDetectVideo) if(this._isFullScreenVideo && this._service.advancedStatusDetectVideo)
{ {
return; return;
} }
label = this._getters.statusOverlay; label = this._getters.statusOverlay;
break; break;
} }
if(label) if(label)
{ {
label.setAttribute("previoustype", label.getAttribute("type")); label.setAttribute("previoustype", label.getAttribute("type"));
label.setAttribute("type", text.type); label.setAttribute("type", text.type);
label.value = text.val; label.value = text.val;
label.setAttribute("crop", text.type == "overLink" ? "center" : "end"); label.setAttribute("crop", text.type == "overLink" ? "center" : "end");
} }
} }
}; };
function S4EOverlinkService(window, service, statusService) { function S4EOverlinkService(window, service, statusService) {
this._window = window; this._window = window;
this._service = service; this._service = service;
this._statusService = statusService; this._statusService = statusService;
} }
S4EOverlinkService.prototype = S4EOverlinkService.prototype =
{ {
_window: null, _window: null,
_service: null, _service: null,
_statusService: null, _statusService: null,
_timer: 0, _timer: 0,
_currentLink: { link: "", anchor: null }, _currentLink: { link: "", anchor: null },
_pendingLink: { link: "", anchor: null }, _pendingLink: { link: "", anchor: null },
_listening: false, _listening: false,
update: function(aLink, aAnchor) update: function(aLink, aAnchor)
{ {
this.clearTimer(); this.clearTimer();
this.stopListen(); this.stopListen();
this._pendingLink = { link: aLink, anchor: aAnchor }; this._pendingLink = { link: aLink, anchor: aAnchor };
if(!aLink) if(!aLink)
{ {
if(this._window.XULBrowserWindow.hideOverLinkImmediately || !this._service.statusLinkOverDelayHide) if(this._window.XULBrowserWindow.hideOverLinkImmediately || !this._service.statusLinkOverDelayHide)
{ {
this._show(); this._show();
} }
else else
{ {
this._showDelayed(); this._showDelayed();
} }
} }
else if(this._currentLink.link || !this._service.statusLinkOverDelayShow) else if(this._currentLink.link || !this._service.statusLinkOverDelayShow)
{ {
this._show(); this._show();
} }
else else
{ {
this._showDelayed(); this._showDelayed();
this.startListen(); this.startListen();
} }
}, },
destroy: function() destroy: function()
{ {
this.clearTimer(); this.clearTimer();
this.stopListen(); this.stopListen();
["_currentLink", "_pendingLink", "_statusService", "_window"].forEach(function(prop) ["_currentLink", "_pendingLink", "_statusService", "_window"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
startListen: function() startListen: function()
{ {
if(!this._listening) if(!this._listening)
{ {
this._window.addEventListener("mousemove", this, true); this._window.addEventListener("mousemove", this, true);
this._listening = true; this._listening = true;
} }
}, },
stopListen: function() stopListen: function()
{ {
if(this._listening) if(this._listening)
{ {
this._window.removeEventListener("mousemove", this, true); this._window.removeEventListener("mousemove", this, true);
this._listening = false; this._listening = false;
} }
}, },
clearTimer: function() clearTimer: function()
{ {
if(this._timer != 0) if(this._timer != 0)
{ {
this._window.clearTimeout(this._timer); this._window.clearTimeout(this._timer);
this._timer = 0; this._timer = 0;
} }
}, },
handleEvent: function(event) handleEvent: function(event)
{ {
switch(event.type) switch(event.type)
{ {
case "mousemove": case "mousemove":
this.clearTimer(); this.clearTimer();
this._showDelayed(); this._showDelayed();
} }
}, },
_showDelayed: function() _showDelayed: function()
{ {
let delay = ((this._pendingLink.link) let delay = ((this._pendingLink.link)
? this._service.statusLinkOverDelayShow ? this._service.statusLinkOverDelayShow
: this._service.statusLinkOverDelayHide); : this._service.statusLinkOverDelayHide);
this._timer = this._window.setTimeout(function(self) this._timer = this._window.setTimeout(function(self)
{ {
self._timer = 0; self._timer = 0;
self._show(); self._show();
self.stopListen(); self.stopListen();
}, delay, this); }, delay, this);
}, },
_show: function() _show: function()
{ {
this._currentLink = this._pendingLink; this._currentLink = this._pendingLink;
this._statusService.setOverLinkInternal(this._currentLink.link, this._currentLink.anchor); this._statusService.setOverLinkInternal(this._currentLink.link, this._currentLink.anchor);
} }
}; };

View file

@ -23,257 +23,257 @@ CU.import("resource:///modules/statusbar/Toolbars.jsm");
function Status4Evar(window, gBrowser, toolbox) function Status4Evar(window, gBrowser, toolbox)
{ {
this._window = window; this._window = window;
this._toolbox = toolbox; this._toolbox = toolbox;
this.getters = new S4EWindowGetters(this._window); this.getters = new S4EWindowGetters(this._window);
this.toolbars = new S4EToolbars(this._window, gBrowser, this._toolbox, s4e_service, this.getters); this.toolbars = new S4EToolbars(this._window, gBrowser, this._toolbox, s4e_service, this.getters);
this.statusService = new S4EStatusService(this._window, s4e_service, this.getters); this.statusService = new S4EStatusService(this._window, s4e_service, this.getters);
this.progressMeter = new S4EProgressService(gBrowser, s4e_service, this.getters, this.statusService); this.progressMeter = new S4EProgressService(gBrowser, s4e_service, this.getters, this.statusService);
this.downloadStatus = new S4EDownloadService(this._window, gBrowser, s4e_service, this.getters); this.downloadStatus = new S4EDownloadService(this._window, gBrowser, s4e_service, this.getters);
this.sizeModeService = new SizeModeService(this._window, this); this.sizeModeService = new SizeModeService(this._window, this);
this._window.addEventListener("unload", this, false); this._window.addEventListener("unload", this, false);
} }
Status4Evar.prototype = Status4Evar.prototype =
{ {
_window: null, _window: null,
_toolbox: null, _toolbox: null,
getters: null, getters: null,
toolbars: null, toolbars: null,
statusService: null, statusService: null,
progressMeter: null, progressMeter: null,
downloadStatus: null, downloadStatus: null,
sizeModeService: null, sizeModeService: null,
setup: function() setup: function()
{ {
this._toolbox.addEventListener("beforecustomization", this, false); this._toolbox.addEventListener("beforecustomization", this, false);
this._toolbox.addEventListener("aftercustomization", this, false); this._toolbox.addEventListener("aftercustomization", this, false);
this.toolbars.setup(); this.toolbars.setup();
this.updateWindow(); this.updateWindow();
// OMFG HAX! If a page is already loading, fake a network start event // OMFG HAX! If a page is already loading, fake a network start event
if(this._window.XULBrowserWindow._busyUI) if(this._window.XULBrowserWindow._busyUI)
{ {
let nsIWPL = CI.nsIWebProgressListener; let nsIWPL = CI.nsIWebProgressListener;
this.progressMeter.onStateChange(0, null, nsIWPL.STATE_START | nsIWPL.STATE_IS_NETWORK, 0); this.progressMeter.onStateChange(0, null, nsIWPL.STATE_START | nsIWPL.STATE_IS_NETWORK, 0);
} }
}, },
destroy: function() destroy: function()
{ {
this._window.removeEventListener("unload", this, false); this._window.removeEventListener("unload", this, false);
this._toolbox.removeEventListener("aftercustomization", this, false); this._toolbox.removeEventListener("aftercustomization", this, false);
this._toolbox.removeEventListener("beforecustomization", this, false); this._toolbox.removeEventListener("beforecustomization", this, false);
this.getters.destroy(); this.getters.destroy();
this.statusService.destroy(); this.statusService.destroy();
this.downloadStatus.destroy(); this.downloadStatus.destroy();
this.progressMeter.destroy(); this.progressMeter.destroy();
this.toolbars.destroy(); this.toolbars.destroy();
this.sizeModeService.destroy(); this.sizeModeService.destroy();
["_window", "_toolbox", "getters", "statusService", "downloadStatus", ["_window", "_toolbox", "getters", "statusService", "downloadStatus",
"progressMeter", "toolbars", "sizeModeService"].forEach(function(prop) "progressMeter", "toolbars", "sizeModeService"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
handleEvent: function(aEvent) handleEvent: function(aEvent)
{ {
switch(aEvent.type) switch(aEvent.type)
{ {
case "unload": case "unload":
this.destroy(); this.destroy();
break; break;
case "beforecustomization": case "beforecustomization":
this.beforeCustomization(); this.beforeCustomization();
break; break;
case "aftercustomization": case "aftercustomization":
this.updateWindow(); this.updateWindow();
break; break;
} }
}, },
beforeCustomization: function() beforeCustomization: function()
{ {
this.toolbars.updateSplitters(false); this.toolbars.updateSplitters(false);
this.toolbars.updateWindowGripper(false); this.toolbars.updateWindowGripper(false);
this.statusService.setNoUpdate(true); this.statusService.setNoUpdate(true);
let status_label = this.getters.statusWidgetLabel; let status_label = this.getters.statusWidgetLabel;
if(status_label) if(status_label)
{ {
status_label.value = this.getters.strings.getString("statusText"); status_label.value = this.getters.strings.getString("statusText");
} }
this.downloadStatus.customizing(true); this.downloadStatus.customizing(true);
}, },
updateWindow: function() updateWindow: function()
{ {
this.statusService.setNoUpdate(false); this.statusService.setNoUpdate(false);
this.getters.resetGetters(); this.getters.resetGetters();
this.statusService.buildTextOrder(); this.statusService.buildTextOrder();
this.statusService.buildBinding(); this.statusService.buildBinding();
this.downloadStatus.init(); this.downloadStatus.init();
this.downloadStatus.customizing(false); this.downloadStatus.customizing(false);
this.toolbars.updateSplitters(true); this.toolbars.updateSplitters(true);
s4e_service.updateWindow(this._window); s4e_service.updateWindow(this._window);
// This also handles the following: // This also handles the following:
// * buildTextOrder() // * buildTextOrder()
// * updateStatusField(true) // * updateStatusField(true)
// * updateWindowGripper(true) // * updateWindowGripper(true)
}, },
launchOptions: function(currentWindow) launchOptions: function(currentWindow)
{ {
let optionsURL = "chrome://browser/content/statusbar/prefs.xul"; let optionsURL = "chrome://browser/content/statusbar/prefs.xul";
let windows = Services.wm.getEnumerator(null); let windows = Services.wm.getEnumerator(null);
while (windows.hasMoreElements()) while (windows.hasMoreElements())
{ {
let win = windows.getNext(); let win = windows.getNext();
if (win.document.documentURI == optionsURL) if (win.document.documentURI == optionsURL)
{ {
win.focus(); win.focus();
return; return;
} }
} }
let features = "chrome,titlebar,toolbar,centerscreen"; let features = "chrome,titlebar,toolbar,centerscreen";
try try
{ {
let instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply"); let instantApply = Services.prefs.getBoolPref("browser.preferences.instantApply");
features += instantApply ? ",dialog=no" : ",modal"; features += instantApply ? ",dialog=no" : ",modal";
} }
catch(e) catch(e)
{ {
features += ",modal"; features += ",modal";
} }
currentWindow.openDialog(optionsURL, "", features); currentWindow.openDialog(optionsURL, "", features);
} }
}; };
function S4EWindowGetters(window) function S4EWindowGetters(window)
{ {
this._window = window; this._window = window;
} }
S4EWindowGetters.prototype = S4EWindowGetters.prototype =
{ {
_window: null, _window: null,
_getterMap: _getterMap:
[ [
["addonbar", "addon-bar"], ["addonbar", "addon-bar"],
["addonbarCloseButton", "addonbar-closebutton"], ["addonbarCloseButton", "addonbar-closebutton"],
["browserBottomBox", "browser-bottombox"], ["browserBottomBox", "browser-bottombox"],
["downloadButton", "status4evar-download-button"], ["downloadButton", "status4evar-download-button"],
["downloadButtonTooltip", "status4evar-download-tooltip"], ["downloadButtonTooltip", "status4evar-download-tooltip"],
["downloadButtonProgress", "status4evar-download-progress-bar"], ["downloadButtonProgress", "status4evar-download-progress-bar"],
["downloadButtonLabel", "status4evar-download-label"], ["downloadButtonLabel", "status4evar-download-label"],
["downloadButtonAnchor", "status4evar-download-anchor"], ["downloadButtonAnchor", "status4evar-download-anchor"],
["downloadNotifyAnchor", "status4evar-download-notification-anchor"], ["downloadNotifyAnchor", "status4evar-download-notification-anchor"],
["statusBar", "status4evar-status-bar"], ["statusBar", "status4evar-status-bar"],
["statusWidget", "status4evar-status-widget"], ["statusWidget", "status4evar-status-widget"],
["statusWidgetLabel", "status4evar-status-text"], ["statusWidgetLabel", "status4evar-status-text"],
["strings", "bundle_status4evar"], ["strings", "bundle_status4evar"],
["throbberProgress", "status4evar-throbber-widget"], ["throbberProgress", "status4evar-throbber-widget"],
["toolbarProgress", "status4evar-progress-bar"] ["toolbarProgress", "status4evar-progress-bar"]
], ],
resetGetters: function() resetGetters: function()
{ {
let document = this._window.document; let document = this._window.document;
this._getterMap.forEach(function(getter) this._getterMap.forEach(function(getter)
{ {
let [prop, id] = getter; let [prop, id] = getter;
delete this[prop]; delete this[prop];
this.__defineGetter__(prop, function() this.__defineGetter__(prop, function()
{ {
delete this[prop]; delete this[prop];
return this[prop] = document.getElementById(id); return this[prop] = document.getElementById(id);
}); });
}, this); }, this);
delete this.statusOverlay; delete this.statusOverlay;
this.__defineGetter__("statusOverlay", function() this.__defineGetter__("statusOverlay", function()
{ {
let so = this._window.XULBrowserWindow.statusTextField; let so = this._window.XULBrowserWindow.statusTextField;
if(!so) if(!so)
{ {
return null; return null;
} }
delete this.statusOverlay; delete this.statusOverlay;
return this.statusOverlay = so; return this.statusOverlay = so;
}); });
}, },
destroy: function() destroy: function()
{ {
this._getterMap.forEach(function(getter) this._getterMap.forEach(function(getter)
{ {
let [prop, id] = getter; let [prop, id] = getter;
delete this[prop]; delete this[prop];
}, this); }, this);
["statusOverlay", "statusOverlay", "_window"].forEach(function(prop) ["statusOverlay", "statusOverlay", "_window"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
} }
}; };
function SizeModeService(window, s4e) function SizeModeService(window, s4e)
{ {
this._window = window; this._window = window;
this._s4e = s4e; this._s4e = s4e;
this.lastFullScreen = this._window.fullScreen; this.lastFullScreen = this._window.fullScreen;
this.lastwindowState = this._window.windowState; this.lastwindowState = this._window.windowState;
this._window.addEventListener("sizemodechange", this, false); this._window.addEventListener("sizemodechange", this, false);
} }
SizeModeService.prototype = SizeModeService.prototype =
{ {
_window: null, _window: null,
_s4e: null, _s4e: null,
lastFullScreen: null, lastFullScreen: null,
lastwindowState: null, lastwindowState: null,
destroy: function() destroy: function()
{ {
this._window.removeEventListener("sizemodechange", this, false); this._window.removeEventListener("sizemodechange", this, false);
["_window", "_s4e"].forEach(function(prop) ["_window", "_s4e"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
handleEvent: function(e) handleEvent: function(e)
{ {
if(this._window.fullScreen != this.lastFullScreen) if(this._window.fullScreen != this.lastFullScreen)
{ {
this.lastFullScreen = this._window.fullScreen; this.lastFullScreen = this._window.fullScreen;
this._s4e.statusService.updateFullScreen(); this._s4e.statusService.updateFullScreen();
} }
if(this._window.windowState != this.lastwindowState) if(this._window.windowState != this.lastwindowState)
{ {
this.lastwindowState = this._window.windowState; this.lastwindowState = this._window.windowState;
this._s4e.toolbars.updateWindowGripper(true); this._s4e.toolbars.updateWindowGripper(true);
} }
}, },
QueryInterface: XPCOMUtils.generateQI([ CI.nsIDOMEventListener ]) QueryInterface: XPCOMUtils.generateQI([ CI.nsIDOMEventListener ])
}; };

View file

@ -13,209 +13,209 @@ CU.import("resource://gre/modules/Services.jsm");
function S4EToolbars(window, gBrowser, toolbox, service, getters) function S4EToolbars(window, gBrowser, toolbox, service, getters)
{ {
this._window = window; this._window = window;
this._toolbox = toolbox; this._toolbox = toolbox;
this._service = service; this._service = service;
this._getters = getters; this._getters = getters;
this._handler = new ClassicS4EToolbars(this._window, this._toolbox); this._handler = new ClassicS4EToolbars(this._window, this._toolbox);
} }
S4EToolbars.prototype = S4EToolbars.prototype =
{ {
_window: null, _window: null,
_toolbox: null, _toolbox: null,
_service: null, _service: null,
_getters: null, _getters: null,
_handler: null, _handler: null,
setup: function() setup: function()
{ {
this.updateSplitters(false); this.updateSplitters(false);
this.updateWindowGripper(false); this.updateWindowGripper(false);
this._handler.setup(this._service.firstRun); this._handler.setup(this._service.firstRun);
}, },
destroy: function() destroy: function()
{ {
this._handler.destroy(); this._handler.destroy();
["_window", "_toolbox", "_service", "_getters", "_handler"].forEach(function(prop) ["_window", "_toolbox", "_service", "_getters", "_handler"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
updateSplitters: function(action) updateSplitters: function(action)
{ {
let document = this._window.document; let document = this._window.document;
let splitter_before = document.getElementById("status4evar-status-splitter-before"); let splitter_before = document.getElementById("status4evar-status-splitter-before");
if(splitter_before) if(splitter_before)
{ {
splitter_before.parentNode.removeChild(splitter_before); splitter_before.parentNode.removeChild(splitter_before);
} }
let splitter_after = document.getElementById("status4evar-status-splitter-after"); let splitter_after = document.getElementById("status4evar-status-splitter-after");
if(splitter_after) if(splitter_after)
{ {
splitter_after.parentNode.removeChild(splitter_after); splitter_after.parentNode.removeChild(splitter_after);
} }
let status = this._getters.statusWidget; let status = this._getters.statusWidget;
if(!action || !status) if(!action || !status)
{ {
return; return;
} }
let urlbar = document.getElementById("urlbar-container"); let urlbar = document.getElementById("urlbar-container");
let stop = document.getElementById("stop-button"); let stop = document.getElementById("stop-button");
let fullscreenflex = document.getElementById("fullscreenflex"); let fullscreenflex = document.getElementById("fullscreenflex");
let nextSibling = status.nextSibling; let nextSibling = status.nextSibling;
let previousSibling = status.previousSibling; let previousSibling = status.previousSibling;
function getSplitter(splitter, suffix) function getSplitter(splitter, suffix)
{ {
if(!splitter) if(!splitter)
{ {
splitter = document.createElement("splitter"); splitter = document.createElement("splitter");
splitter.id = "status4evar-status-splitter-" + suffix; splitter.id = "status4evar-status-splitter-" + suffix;
splitter.setAttribute("resizebefore", "flex"); splitter.setAttribute("resizebefore", "flex");
splitter.setAttribute("resizeafter", "flex"); splitter.setAttribute("resizeafter", "flex");
splitter.className = "chromeclass-toolbar-additional status4evar-status-splitter"; splitter.className = "chromeclass-toolbar-additional status4evar-status-splitter";
} }
return splitter; return splitter;
} }
if((previousSibling && previousSibling.flex > 0) if((previousSibling && previousSibling.flex > 0)
|| (urlbar && stop && urlbar.getAttribute("combined") && stop == previousSibling)) || (urlbar && stop && urlbar.getAttribute("combined") && stop == previousSibling))
{ {
status.parentNode.insertBefore(getSplitter(splitter_before, "before"), status); status.parentNode.insertBefore(getSplitter(splitter_before, "before"), status);
} }
if(nextSibling && nextSibling.flex > 0 && nextSibling != fullscreenflex) if(nextSibling && nextSibling.flex > 0 && nextSibling != fullscreenflex)
{ {
status.parentNode.insertBefore(getSplitter(splitter_after, "after"), nextSibling); status.parentNode.insertBefore(getSplitter(splitter_after, "after"), nextSibling);
} }
}, },
updateWindowGripper: function(action) updateWindowGripper: function(action)
{ {
let document = this._window.document; let document = this._window.document;
let gripper = document.getElementById("status4evar-window-gripper"); let gripper = document.getElementById("status4evar-window-gripper");
let toolbar = this._getters.statusBar || this._getters.addonbar; let toolbar = this._getters.statusBar || this._getters.addonbar;
if(!action || !toolbar || !this._service.addonbarWindowGripper if(!action || !toolbar || !this._service.addonbarWindowGripper
|| this._window.windowState != CI.nsIDOMChromeWindow.STATE_NORMAL || toolbar.toolbox.customizing) || this._window.windowState != CI.nsIDOMChromeWindow.STATE_NORMAL || toolbar.toolbox.customizing)
{ {
if(gripper) if(gripper)
{ {
gripper.parentNode.removeChild(gripper); gripper.parentNode.removeChild(gripper);
} }
return; return;
} }
gripper = this._handler.buildGripper(toolbar, gripper, "status4evar-window-gripper"); gripper = this._handler.buildGripper(toolbar, gripper, "status4evar-window-gripper");
toolbar.appendChild(gripper); toolbar.appendChild(gripper);
} }
}; };
function ClassicS4EToolbars(window, toolbox) function ClassicS4EToolbars(window, toolbox)
{ {
this._window = window; this._window = window;
this._toolbox = toolbox; this._toolbox = toolbox;
} }
ClassicS4EToolbars.prototype = ClassicS4EToolbars.prototype =
{ {
_window: null, _window: null,
_toolbox: null, _toolbox: null,
setup: function(firstRun) setup: function(firstRun)
{ {
let document = this._window.document; let document = this._window.document;
let addon_bar = document.getElementById("addon-bar"); let addon_bar = document.getElementById("addon-bar");
if(addon_bar) if(addon_bar)
{ {
let baseSet = "addonbar-closebutton" let baseSet = "addonbar-closebutton"
+ ",status4evar-status-widget" + ",status4evar-status-widget"
+ ",status4evar-progress-widget"; + ",status4evar-progress-widget";
// Update the defaultSet // Update the defaultSet
let defaultSet = baseSet; let defaultSet = baseSet;
let defaultSetIgnore = ["addonbar-closebutton", "spring", "status-bar"]; let defaultSetIgnore = ["addonbar-closebutton", "spring", "status-bar"];
addon_bar.getAttribute("defaultset").split(",").forEach(function(item) addon_bar.getAttribute("defaultset").split(",").forEach(function(item)
{ {
if(defaultSetIgnore.indexOf(item) == -1) if(defaultSetIgnore.indexOf(item) == -1)
{ {
defaultSet += "," + item; defaultSet += "," + item;
} }
}); });
defaultSet += ",status-bar" defaultSet += ",status-bar"
addon_bar.setAttribute("defaultset", defaultSet); addon_bar.setAttribute("defaultset", defaultSet);
// Update the currentSet // Update the currentSet
if(firstRun) if(firstRun)
{ {
let isCustomizableToolbar = function(aElt) let isCustomizableToolbar = function(aElt)
{ {
return aElt.localName == "toolbar" && aElt.getAttribute("customizable") == "true"; return aElt.localName == "toolbar" && aElt.getAttribute("customizable") == "true";
} }
let isCustomizedAlready = false; let isCustomizedAlready = false;
let toolbars = Array.filter(this._toolbox.childNodes, isCustomizableToolbar).concat( let toolbars = Array.filter(this._toolbox.childNodes, isCustomizableToolbar).concat(
Array.filter(this._toolbox.externalToolbars, isCustomizableToolbar)); Array.filter(this._toolbox.externalToolbars, isCustomizableToolbar));
toolbars.forEach(function(toolbar) toolbars.forEach(function(toolbar)
{ {
if(toolbar.currentSet.indexOf("status4evar") > -1) if(toolbar.currentSet.indexOf("status4evar") > -1)
{ {
isCustomizedAlready = true; isCustomizedAlready = true;
} }
}); });
if(!isCustomizedAlready) if(!isCustomizedAlready)
{ {
let currentSet = baseSet; let currentSet = baseSet;
let currentSetIgnore = ["addonbar-closebutton", "spring"]; let currentSetIgnore = ["addonbar-closebutton", "spring"];
addon_bar.currentSet.split(",").forEach(function(item) addon_bar.currentSet.split(",").forEach(function(item)
{ {
if(currentSetIgnore.indexOf(item) == -1) if(currentSetIgnore.indexOf(item) == -1)
{ {
currentSet += "," + item; currentSet += "," + item;
} }
}); });
addon_bar.currentSet = currentSet; addon_bar.currentSet = currentSet;
addon_bar.setAttribute("currentset", currentSet); addon_bar.setAttribute("currentset", currentSet);
document.persist(addon_bar.id, "currentset"); document.persist(addon_bar.id, "currentset");
this._window.setToolbarVisibility(addon_bar, true); this._window.setToolbarVisibility(addon_bar, true);
} }
} }
} }
}, },
destroy: function() destroy: function()
{ {
["_window", "_toolbox"].forEach(function(prop) ["_window", "_toolbox"].forEach(function(prop)
{ {
delete this[prop]; delete this[prop];
}, this); }, this);
}, },
buildGripper: function(toolbar, gripper, id) buildGripper: function(toolbar, gripper, id)
{ {
if(!gripper) if(!gripper)
{ {
let document = this._window.document; let document = this._window.document;
gripper = document.createElement("resizer"); gripper = document.createElement("resizer");
gripper.id = id; gripper.id = id;
gripper.dir = "bottomend"; gripper.dir = "bottomend";
} }
return gripper; return gripper;
} }
}; };

View file

@ -8,8 +8,7 @@
* Status Popup * Status Popup
*/ */
statuspanel statuspanel {
{ -moz-binding: url("chrome://browser/content/statusbar/tabbrowser.xml#statuspanel");
-moz-binding: url("chrome://browser/content/statusbar/tabbrowser.xml#statuspanel");
} }

View file

@ -6,11 +6,11 @@ if(!caligon) var caligon = {};
window.addEventListener("load", function buildS4E() window.addEventListener("load", function buildS4E()
{ {
window.removeEventListener("load", buildS4E, false); window.removeEventListener("load", buildS4E, false);
Components.utils.import("resource:///modules/statusbar/Status4Evar.jsm"); Components.utils.import("resource:///modules/statusbar/Status4Evar.jsm");
caligon.status4evar = new Status4Evar(window, gBrowser, gNavToolbox); caligon.status4evar = new Status4Evar(window, gBrowser, gNavToolbox);
caligon.status4evar.setup(); caligon.status4evar.setup();
}, false); }, false);

View file

@ -13,23 +13,23 @@
<overlay id="status4evar-overlay" <overlay id="status4evar-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundleset id="stringbundleset"> <stringbundleset id="stringbundleset">
<stringbundle id="bundle_status4evar" src="chrome://browser/locale/statusbar/overlay.properties" /> <stringbundle id="bundle_status4evar" src="chrome://browser/locale/statusbar/overlay.properties" />
</stringbundleset> </stringbundleset>
<script type="application/javascript" src="chrome://browser/content/statusbar/overlay.js" /> <script type="application/javascript" src="chrome://browser/content/statusbar/overlay.js" />
<commandset> <commandset>
<command id="S4E:Options" oncommand="caligon.status4evar.launchOptions(window);"/> <command id="S4E:Options" oncommand="caligon.status4evar.launchOptions(window);"/>
</commandset> </commandset>
<popupset id="mainPopupSet"> <popupset id="mainPopupSet">
<hbox id="status4evar-download-notification-container" mousethrough="always"> <hbox id="status4evar-download-notification-container" mousethrough="always">
<vbox id="status4evar-download-notification-anchor"> <vbox id="status4evar-download-notification-anchor">
<vbox id="status4evar-download-notification-icon" /> <vbox id="status4evar-download-notification-icon" />
</vbox> </vbox>
</hbox> </hbox>
</popupset> </popupset>
<menupopup id="menu_ToolsPopup"> <menupopup id="menu_ToolsPopup">
<menuitem id="statusbar-options-fx" command="S4E:Options" <menuitem id="statusbar-options-fx" command="S4E:Options"
@ -41,41 +41,41 @@
label="&status4evar.menu.options.label;"/> label="&status4evar.menu.options.label;"/>
</menupopup> </menupopup>
<toolbarpalette id="BrowserToolbarPalette"> <toolbarpalette id="BrowserToolbarPalette">
<toolbaritem id="status4evar-status-widget" <toolbaritem id="status4evar-status-widget"
title="&status4evar.status.widget.title;" title="&status4evar.status.widget.title;"
removable="true" flex="1" persist="width" width="100"> removable="true" flex="1" persist="width" width="100">
<label id="status4evar-status-text" flex="1" crop="end" value="&status4evar.status.widget.title;" /> <label id="status4evar-status-text" flex="1" crop="end" value="&status4evar.status.widget.title;" />
</toolbaritem> </toolbaritem>
<toolbarbutton id="status4evar-download-button" <toolbarbutton id="status4evar-download-button"
title="&status4evar.download.widget.title;" title="&status4evar.download.widget.title;"
class="toolbarbutton-1 chromeclass-toolbar-additional" class="toolbarbutton-1 chromeclass-toolbar-additional"
removable="true" collapsed="true" tooltip="_child" removable="true" collapsed="true" tooltip="_child"
oncommand="caligon.status4evar.downloadStatus.openUI(event)"> oncommand="caligon.status4evar.downloadStatus.openUI(event)">
<stack id="status4evar-download-anchor" class="toolbarbutton-icon"> <stack id="status4evar-download-anchor" class="toolbarbutton-icon">
<vbox id="status4evar-download-icon" /> <vbox id="status4evar-download-icon" />
<vbox pack="end"> <vbox pack="end">
<progressmeter id="status4evar-download-progress-bar" mode="normal" value="0" collapsed="true" min="0" max="100" /> <progressmeter id="status4evar-download-progress-bar" mode="normal" value="0" collapsed="true" min="0" max="100" />
</vbox> </vbox>
</stack> </stack>
<tooltip id="status4evar-download-tooltip" /> <tooltip id="status4evar-download-tooltip" />
<label id="status4evar-download-label" value="&status4evar.download.widget.title;" class="toolbarbutton-text" crop="right" flex="1" /> <label id="status4evar-download-label" value="&status4evar.download.widget.title;" class="toolbarbutton-text" crop="right" flex="1" />
</toolbarbutton> </toolbarbutton>
<toolbaritem id="status4evar-progress-widget" <toolbaritem id="status4evar-progress-widget"
title="&status4evar.progress.widget.title;" title="&status4evar.progress.widget.title;"
removable="true"> removable="true">
<progressmeter id="status4evar-progress-bar" class="progressmeter-statusbar" <progressmeter id="status4evar-progress-bar" class="progressmeter-statusbar"
mode="normal" value="0" collapsed="true" min="0" max="100" /> mode="normal" value="0" collapsed="true" min="0" max="100" />
</toolbaritem> </toolbaritem>
<toolbarbutton id="status4evar-options-button" <toolbarbutton id="status4evar-options-button"
title="&status4evar.options.widget.title;" title="&status4evar.options.widget.title;"
class="toolbarbutton-1 chromeclass-toolbar-additional" class="toolbarbutton-1 chromeclass-toolbar-additional"
label="&status4evar.options.widget.label;" label="&status4evar.options.widget.label;"
removable="true" command="S4E:Options" tooltiptext="&status4evar.options.widget.title;" /> removable="true" command="S4E:Options" tooltiptext="&status4evar.options.widget.title;" />
</toolbarpalette> </toolbarpalette>
<statusbar id="status-bar" ordinal="1" /> <statusbar id="status-bar" ordinal="1" />
</overlay> </overlay>

View file

@ -4,8 +4,7 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.css-bg-editor .css-bg-editor {
{ -moz-binding: url("chrome://browser/content/statusbar/prefs.xml#css-bg-editor");
-moz-binding: url("chrome://browser/content/statusbar/prefs.xml#css-bg-editor");
} }

View file

@ -6,267 +6,267 @@ Components.utils.import("resource://gre/modules/Services.jsm");
var status4evarPrefs = var status4evarPrefs =
{ {
get dynamicProgressStyle() get dynamicProgressStyle()
{ {
let styleSheets = window.document.styleSheets; let styleSheets = window.document.styleSheets;
for(let i = 0; i < styleSheets.length; i++) for(let i = 0; i < styleSheets.length; i++)
{ {
let styleSheet = styleSheets[i]; let styleSheet = styleSheets[i];
if(styleSheet.href == "chrome://browser/skin/statusbar/dynamic.css") if(styleSheet.href == "chrome://browser/skin/statusbar/dynamic.css")
{ {
delete this.dynamicProgressStyle; delete this.dynamicProgressStyle;
return this.dynamicProgressStyle = styleSheet; return this.dynamicProgressStyle = styleSheet;
} }
} }
return null; return null;
}, },
// //
// Status timeout management // Status timeout management
// //
get statusTimeoutPref() get statusTimeoutPref()
{ {
delete this.statusTimeoutPref; delete this.statusTimeoutPref;
return this.statusTimeoutPref = document.getElementById("status4evar-pref-status-timeout"); return this.statusTimeoutPref = document.getElementById("status4evar-pref-status-timeout");
}, },
get statusTimeoutCheckbox() get statusTimeoutCheckbox()
{ {
delete this.statusTimeoutCheckbox; delete this.statusTimeoutCheckbox;
return this.statusTimeoutCheckbox = document.getElementById("status4evar-status-timeout-check"); return this.statusTimeoutCheckbox = document.getElementById("status4evar-status-timeout-check");
}, },
statusTimeoutChanged: function() statusTimeoutChanged: function()
{ {
if(this.statusTimeoutPref.value > 0) if(this.statusTimeoutPref.value > 0)
{ {
this.statusTimeoutPref.disabled = false; this.statusTimeoutPref.disabled = false;
this.statusTimeoutCheckbox.checked = true; this.statusTimeoutCheckbox.checked = true;
} }
else else
{ {
this.statusTimeoutPref.disabled = true; this.statusTimeoutPref.disabled = true;
this.statusTimeoutCheckbox.checked = false; this.statusTimeoutCheckbox.checked = false;
} }
}, },
statusTimeoutSync: function() statusTimeoutSync: function()
{ {
this.statusTimeoutChanged(); this.statusTimeoutChanged();
return undefined; return undefined;
}, },
statusTimeoutToggle: function() statusTimeoutToggle: function()
{ {
if(this.statusTimeoutPref.disabled == this.statusTimeoutCheckbox.checked) if(this.statusTimeoutPref.disabled == this.statusTimeoutCheckbox.checked)
{ {
if(this.statusTimeoutCheckbox.checked) if(this.statusTimeoutCheckbox.checked)
{ {
this.statusTimeoutPref.value = 10; this.statusTimeoutPref.value = 10;
} }
else else
{ {
this.statusTimeoutPref.value = 0; this.statusTimeoutPref.value = 0;
} }
} }
}, },
// //
// Status network management // Status network management
// //
get statusNetworkPref() get statusNetworkPref()
{ {
delete this.statusNetworkPref; delete this.statusNetworkPref;
return this.statusNetworkPref = document.getElementById("status4evar-pref-status-network"); return this.statusNetworkPref = document.getElementById("status4evar-pref-status-network");
}, },
get statusNetworkXHRPref() get statusNetworkXHRPref()
{ {
delete this.statusNetworkXHRPref; delete this.statusNetworkXHRPref;
return this.statusNetworkXHRPref = document.getElementById("status4evar-pref-status-network-xhr"); return this.statusNetworkXHRPref = document.getElementById("status4evar-pref-status-network-xhr");
}, },
statusNetworkChanged: function() statusNetworkChanged: function()
{ {
this.statusNetworkXHRPref.disabled = ! this.statusNetworkPref.value; this.statusNetworkXHRPref.disabled = ! this.statusNetworkPref.value;
}, },
statusNetworkSync: function() statusNetworkSync: function()
{ {
this.statusNetworkChanged(); this.statusNetworkChanged();
return undefined; return undefined;
}, },
// //
// Status Text langth managment // Status Text langth managment
// //
get textMaxLengthPref() get textMaxLengthPref()
{ {
delete this.textMaxLengthPref; delete this.textMaxLengthPref;
return this.textMaxLengthPref = document.getElementById("status4evar-pref-status-toolbar-maxLength"); return this.textMaxLengthPref = document.getElementById("status4evar-pref-status-toolbar-maxLength");
}, },
get textMaxLengthCheckbox() get textMaxLengthCheckbox()
{ {
delete this.textMaxLengthCheckbox; delete this.textMaxLengthCheckbox;
return this.textMaxLengthCheckbox = document.getElementById("status4evar-status-toolbar-maxLength-check"); return this.textMaxLengthCheckbox = document.getElementById("status4evar-status-toolbar-maxLength-check");
}, },
textLengthChanged: function() textLengthChanged: function()
{ {
if(this.textMaxLengthPref.value > 0) if(this.textMaxLengthPref.value > 0)
{ {
this.textMaxLengthPref.disabled = false; this.textMaxLengthPref.disabled = false;
this.textMaxLengthCheckbox.checked = true; this.textMaxLengthCheckbox.checked = true;
} }
else else
{ {
this.textMaxLengthPref.disabled = true; this.textMaxLengthPref.disabled = true;
this.textMaxLengthCheckbox.checked = false; this.textMaxLengthCheckbox.checked = false;
} }
}, },
textLengthSync: function() textLengthSync: function()
{ {
this.textLengthChanged(); this.textLengthChanged();
return undefined; return undefined;
}, },
textLengthToggle: function() textLengthToggle: function()
{ {
if(this.textMaxLengthPref.disabled == this.textMaxLengthCheckbox.checked) if(this.textMaxLengthPref.disabled == this.textMaxLengthCheckbox.checked)
{ {
if(this.textMaxLengthCheckbox.checked) if(this.textMaxLengthCheckbox.checked)
{ {
this.textMaxLengthPref.value = 800; this.textMaxLengthPref.value = 800;
} }
else else
{ {
this.textMaxLengthPref.value = 0; this.textMaxLengthPref.value = 0;
} }
} }
}, },
// //
// Toolbar progress style management // Toolbar progress style management
// //
get progressToolbarStylePref() get progressToolbarStylePref()
{ {
delete this.progressToolbarStylePref; delete this.progressToolbarStylePref;
return this.progressToolbarStylePref = document.getElementById("status4evar-pref-progress-toolbar-style"); return this.progressToolbarStylePref = document.getElementById("status4evar-pref-progress-toolbar-style");
}, },
get progressToolbarCSSPref() get progressToolbarCSSPref()
{ {
delete this.progressToolbarCSSPref; delete this.progressToolbarCSSPref;
return this.progressToolbarCSSPref = document.getElementById("status4evar-pref-progress-toolbar-css"); return this.progressToolbarCSSPref = document.getElementById("status4evar-pref-progress-toolbar-css");
}, },
get progressToolbarProgress() get progressToolbarProgress()
{ {
delete this.progressToolbarProgress; delete this.progressToolbarProgress;
return this.progressToolbarProgress = document.getElementById("status4evar-progress-bar"); return this.progressToolbarProgress = document.getElementById("status4evar-progress-bar");
}, },
progressToolbarCSSChanged: function() progressToolbarCSSChanged: function()
{ {
if(!this.progressToolbarCSSPref.value) if(!this.progressToolbarCSSPref.value)
{ {
this.progressToolbarCSSPref.value = "#33FF33"; this.progressToolbarCSSPref.value = "#33FF33";
} }
this.dynamicProgressStyle.cssRules[1].style.background = this.progressToolbarCSSPref.value; this.dynamicProgressStyle.cssRules[1].style.background = this.progressToolbarCSSPref.value;
}, },
progressToolbarStyleChanged: function() progressToolbarStyleChanged: function()
{ {
this.progressToolbarCSSChanged(); this.progressToolbarCSSChanged();
this.progressToolbarCSSPref.disabled = !this.progressToolbarStylePref.value; this.progressToolbarCSSPref.disabled = !this.progressToolbarStylePref.value;
if(this.progressToolbarStylePref.value) if(this.progressToolbarStylePref.value)
{ {
this.progressToolbarProgress.setAttribute("s4estyle", true); this.progressToolbarProgress.setAttribute("s4estyle", true);
} }
else else
{ {
this.progressToolbarProgress.removeAttribute("s4estyle"); this.progressToolbarProgress.removeAttribute("s4estyle");
} }
}, },
progressToolbarStyleSync: function() progressToolbarStyleSync: function()
{ {
this.progressToolbarStyleChanged(); this.progressToolbarStyleChanged();
return undefined; return undefined;
}, },
// //
// Download progress management // Download progress management
// //
get downloadProgressCheck() get downloadProgressCheck()
{ {
delete this.downloadProgressCheck; delete this.downloadProgressCheck;
return this.downloadProgressCheck = document.getElementById("status4evar-download-progress-check"); return this.downloadProgressCheck = document.getElementById("status4evar-download-progress-check");
}, },
get downloadProgressPref() get downloadProgressPref()
{ {
delete this.downloadProgressPref; delete this.downloadProgressPref;
return this.downloadProgressPref = document.getElementById("status4evar-pref-download-progress"); return this.downloadProgressPref = document.getElementById("status4evar-pref-download-progress");
}, },
get downloadProgressColorActivePref() get downloadProgressColorActivePref()
{ {
delete this.downloadProgressActiveColorPref; delete this.downloadProgressActiveColorPref;
return this.downloadProgressActiveColorPref = document.getElementById("status4evar-pref-download-color-active"); return this.downloadProgressActiveColorPref = document.getElementById("status4evar-pref-download-color-active");
}, },
get downloadProgressColorPausedPref() get downloadProgressColorPausedPref()
{ {
delete this.downloadProgressPausedColorPref; delete this.downloadProgressPausedColorPref;
return this.downloadProgressPausedColorPref = document.getElementById("status4evar-pref-download-color-paused"); return this.downloadProgressPausedColorPref = document.getElementById("status4evar-pref-download-color-paused");
}, },
downloadProgressSync: function() downloadProgressSync: function()
{ {
let val = this.downloadProgressPref.value; let val = this.downloadProgressPref.value;
this.downloadProgressColorActivePref.disabled = (val == 0); this.downloadProgressColorActivePref.disabled = (val == 0);
this.downloadProgressColorPausedPref.disabled = (val == 0); this.downloadProgressColorPausedPref.disabled = (val == 0);
this.downloadProgressPref.disabled = (val == 0); this.downloadProgressPref.disabled = (val == 0);
this.downloadProgressCheck.checked = (val != 0); this.downloadProgressCheck.checked = (val != 0);
return ((val == 0) ? 1 : val); return ((val == 0) ? 1 : val);
}, },
downloadProgressToggle: function() downloadProgressToggle: function()
{ {
let enabled = this.downloadProgressCheck.checked; let enabled = this.downloadProgressCheck.checked;
this.downloadProgressPref.value = ((enabled) ? 1 : 0); this.downloadProgressPref.value = ((enabled) ? 1 : 0);
}, },
// //
// Pref Window load // Pref Window load
// //
get downloadButtonActionCommandPref() get downloadButtonActionCommandPref()
{ {
delete this.downloadButtonActionCommandPref; delete this.downloadButtonActionCommandPref;
return this.downloadButtonActionCommandPref = document.getElementById("status4evar-pref-download-button-action-command"); return this.downloadButtonActionCommandPref = document.getElementById("status4evar-pref-download-button-action-command");
}, },
get downloadButtonActionThirdPartyItem() get downloadButtonActionThirdPartyItem()
{ {
delete this.downloadButtonActionThirdPartyItem; delete this.downloadButtonActionThirdPartyItem;
return this.downloadButtonActionThirdPartyItem = document.getElementById("status4evar-download-button-action-menu-thirdparty"); return this.downloadButtonActionThirdPartyItem = document.getElementById("status4evar-download-button-action-menu-thirdparty");
}, },
onPrefWindowLoad: function() onPrefWindowLoad: function()
{ {
if(!this.downloadButtonActionCommandPref.value) if(!this.downloadButtonActionCommandPref.value)
{ {
this.downloadButtonActionThirdPartyItem.disabled = true; this.downloadButtonActionThirdPartyItem.disabled = true;
} }
}, },
onPrefWindowUnLoad: function() onPrefWindowUnLoad: function()
{ {
} }
} }
var XULBrowserWindow = { var XULBrowserWindow = {

File diff suppressed because it is too large Load diff

View file

@ -5,8 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. --> * file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE prefwindow [ <!DOCTYPE prefwindow [
<!ENTITY % prefsDTD SYSTEM "chrome://browser/locale/statusbar/statusbar-prefs.dtd"> <!ENTITY % prefsDTD SYSTEM "chrome://browser/locale/statusbar/statusbar-prefs.dtd">
%prefsDTD; %prefsDTD;
]> ]>
<?xml-stylesheet href="chrome://global/skin/config.css" type="text/css" ?> <?xml-stylesheet href="chrome://global/skin/config.css" type="text/css" ?>
@ -23,275 +23,275 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="status4evarPrefs.onPrefWindowLoad();" onunload="status4evarPrefs.onPrefWindowUnLoad();"> onload="status4evarPrefs.onPrefWindowLoad();" onunload="status4evarPrefs.onPrefWindowUnLoad();">
<stringbundleset id="stringbundleset"> <stringbundleset id="stringbundleset">
<stringbundle id="bundle_status4evar" src="chrome://browser/locale/statusbar/prefs.properties" /> <stringbundle id="bundle_status4evar" src="chrome://browser/locale/statusbar/prefs.properties" />
</stringbundleset> </stringbundleset>
<script type="application/javascript" src="chrome://browser/content/statusbar/prefs.js" /> <script type="application/javascript" src="chrome://browser/content/statusbar/prefs.js" />
<prefpane id="status4evar-pane-status" label="&status4evar.pane.status;"> <prefpane id="status4evar-pane-status" label="&status4evar.pane.status;">
<preferences> <preferences>
<preference id="status4evar-pref-status" name="status4evar.status" type="int" /> <preference id="status4evar-pref-status" name="status4evar.status" type="int" />
<preference id="status4evar-pref-status-default" name="status4evar.status.default" type="bool" /> <preference id="status4evar-pref-status-default" name="status4evar.status.default" type="bool" />
<preference id="status4evar-pref-status-network" name="status4evar.status.network" type="bool" <preference id="status4evar-pref-status-network" name="status4evar.status.network" type="bool"
onchange="status4evarPrefs.statusNetworkChanged();" /> onchange="status4evarPrefs.statusNetworkChanged();" />
<preference id="status4evar-pref-status-network-xhr" name="status4evar.status.network.xhr" type="bool" /> <preference id="status4evar-pref-status-network-xhr" name="status4evar.status.network.xhr" type="bool" />
<preference id="status4evar-pref-status-timeout" name="status4evar.status.timeout" type="int" <preference id="status4evar-pref-status-timeout" name="status4evar.status.timeout" type="int"
onchange="status4evarPrefs.statusTimeoutChanged();" /> onchange="status4evarPrefs.statusTimeoutChanged();" />
<preference id="status4evar-pref-status-linkOver" name="status4evar.status.linkOver" type="int" /> <preference id="status4evar-pref-status-linkOver" name="status4evar.status.linkOver" type="int" />
<preference id="status4evar-pref-status-linkOver-delay-show" name="status4evar.status.linkOver.delay.show" type="int" /> <preference id="status4evar-pref-status-linkOver-delay-show" name="status4evar.status.linkOver.delay.show" type="int" />
<preference id="status4evar-pref-status-linkOver-delay-hide" name="status4evar.status.linkOver.delay.hide" type="int" /> <preference id="status4evar-pref-status-linkOver-delay-hide" name="status4evar.status.linkOver.delay.hide" type="int" />
<preference id="status4evar-pref-status-toolbar-maxLength" name="status4evar.status.toolbar.maxLength" type="int" <preference id="status4evar-pref-status-toolbar-maxLength" name="status4evar.status.toolbar.maxLength" type="int"
onchange="status4evarPrefs.textLengthChanged();" /> onchange="status4evarPrefs.textLengthChanged();" />
<preference id="status4evar-pref-status-popup-invertMirror" name="status4evar.status.popup.invertMirror" type="bool" /> <preference id="status4evar-pref-status-popup-invertMirror" name="status4evar.status.popup.invertMirror" type="bool" />
<preference id="status4evar-pref-status-popup-mouseMirror" name="status4evar.status.popup.mouseMirror" type="bool" /> <preference id="status4evar-pref-status-popup-mouseMirror" name="status4evar.status.popup.mouseMirror" type="bool" />
<preference id="toolkit-pref-dom-status-change" name="dom.disable_window_status_change" type="bool" inverted="true" /> <preference id="toolkit-pref-dom-status-change" name="dom.disable_window_status_change" type="bool" inverted="true" />
</preferences> </preferences>
<commandset id="status4evar-commandset-status"> <commandset id="status4evar-commandset-status">
<command id="status4evar-command-status-timeout" oncommand="status4evarPrefs.statusTimeoutToggle();" /> <command id="status4evar-command-status-timeout" oncommand="status4evarPrefs.statusTimeoutToggle();" />
<command id="status4evar-command-status-toolbar-maxLength" oncommand="status4evarPrefs.textLengthToggle();" /> <command id="status4evar-command-status-toolbar-maxLength" oncommand="status4evarPrefs.textLengthToggle();" />
</commandset> </commandset>
<tabbox id="status4evar-tabbox-status" flex="1"> <tabbox id="status4evar-tabbox-status" flex="1">
<tabs id="status4evar-tabs-status"> <tabs id="status4evar-tabs-status">
<tab id="status4evar-tab-status-general" label="&status4evar.tab.general;" /> <tab id="status4evar-tab-status-general" label="&status4evar.tab.general;" />
<tab id="status4evar-tab-status-toolbar" label="&status4evar.tab.toolbar;" /> <tab id="status4evar-tab-status-toolbar" label="&status4evar.tab.toolbar;" />
<tab id="status4evar-tab-status-popup" label="&status4evar.tab.popup;" /> <tab id="status4evar-tab-status-popup" label="&status4evar.tab.popup;" />
</tabs> </tabs>
<tabpanels id="status4evar-tabpanels-status" flex="1"> <tabpanels id="status4evar-tabpanels-status" flex="1">
<tabpanel id="status4evar-tabpanel-status-general" orient="vertical"> <tabpanel id="status4evar-tabpanel-status-general" orient="vertical">
<groupbox id="status4evar-status-general-status"> <groupbox id="status4evar-status-general-status">
<caption label="&status4evar.status.general.status.caption;" /> <caption label="&status4evar.status.general.status.caption;" />
<hbox align="center"> <hbox align="center">
<label id="status4evar-status-label" control="status4evar-status-menu">&status4evar.status.label;</label> <label id="status4evar-status-label" control="status4evar-status-menu">&status4evar.status.label;</label>
<menulist id="status4evar-status-menu" preference="status4evar-pref-status" sizetopopup="always"> <menulist id="status4evar-status-menu" preference="status4evar-pref-status" sizetopopup="always">
<menupopup> <menupopup>
<menuitem label="&status4evar.option.none;" value="0" /> <menuitem label="&status4evar.option.none;" value="0" />
<menuitem label="&status4evar.option.toolbar;" value="1" /> <menuitem label="&status4evar.option.toolbar;" value="1" />
<menuitem label="&status4evar.option.popup;" value="3" /> <menuitem label="&status4evar.option.popup;" value="3" />
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<checkbox id="status4evar-status-timeout-check" label="&status4evar.status.timeout.label;" <checkbox id="status4evar-status-timeout-check" label="&status4evar.status.timeout.label;"
command="status4evar-command-status-timeout" /> command="status4evar-command-status-timeout" />
<textbox id="status4evar-status-timeout-value" preference="status4evar-pref-status-timeout" type="number" size="4" <textbox id="status4evar-status-timeout-value" preference="status4evar-pref-status-timeout" type="number" size="4"
onsyncfrompreference="return status4evarPrefs.statusTimeoutSync();" /> onsyncfrompreference="return status4evarPrefs.statusTimeoutSync();" />
<label id="status4evar-status-timeout-unit">&status4evar.unit.seconds;</label> <label id="status4evar-status-timeout-unit">&status4evar.unit.seconds;</label>
</hbox> </hbox>
<checkbox id="status4evar-status-default-check" preference="status4evar-pref-status-default" label="&status4evar.status.default.label;" /> <checkbox id="status4evar-status-default-check" preference="status4evar-pref-status-default" label="&status4evar.status.default.label;" />
<checkbox id="status4evar-status-network-check" preference="status4evar-pref-status-network" label="&status4evar.status.network.label;" <checkbox id="status4evar-status-network-check" preference="status4evar-pref-status-network" label="&status4evar.status.network.label;"
onsyncfrompreference="return status4evarPrefs.statusNetworkSync();" /> onsyncfrompreference="return status4evarPrefs.statusNetworkSync();" />
<hbox align="center" class="indent"> <hbox align="center" class="indent">
<checkbox id="status4evar-status-network-xhr-check" preference="status4evar-pref-status-network-xhr" label="&status4evar.status.network.xhr.label;" /> <checkbox id="status4evar-status-network-xhr-check" preference="status4evar-pref-status-network-xhr" label="&status4evar.status.network.xhr.label;" />
</hbox> </hbox>
<checkbox id="toolkit-dom-status-change-check" preference="toolkit-pref-dom-status-change" label="&toolkit.dom.status.change.label;" /> <checkbox id="toolkit-dom-status-change-check" preference="toolkit-pref-dom-status-change" label="&toolkit.dom.status.change.label;" />
</groupbox> </groupbox>
<groupbox id="status4evar-status-general-linkOver"> <groupbox id="status4evar-status-general-linkOver">
<caption label="&status4evar.status.general.linkOver.caption;" /> <caption label="&status4evar.status.general.linkOver.caption;" />
<hbox align="center"> <hbox align="center">
<label id="status4evar-status-linkOver-label" control="status4evar-status-linkOver-menu">&status4evar.status.linkOver.label;</label> <label id="status4evar-status-linkOver-label" control="status4evar-status-linkOver-menu">&status4evar.status.linkOver.label;</label>
<menulist id="status4evar-status-linkOver-menu" preference="status4evar-pref-status-linkOver" sizetopopup="always"> <menulist id="status4evar-status-linkOver-menu" preference="status4evar-pref-status-linkOver" sizetopopup="always">
<menupopup> <menupopup>
<menuitem label="&status4evar.option.none;" value="0" /> <menuitem label="&status4evar.option.none;" value="0" />
<menuitem label="&status4evar.option.toolbar;" value="1" /> <menuitem label="&status4evar.option.toolbar;" value="1" />
<menuitem label="&status4evar.option.popup;" value="3" /> <menuitem label="&status4evar.option.popup;" value="3" />
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-status-linkOver-delay-show-label" control="status4evar-status-linkOver-delay-show-value">&status4evar.status.linkOver.delay.show.label;</label> <label id="status4evar-status-linkOver-delay-show-label" control="status4evar-status-linkOver-delay-show-value">&status4evar.status.linkOver.delay.show.label;</label>
<textbox id="status4evar-status-linkOver-delay-show-value" preference="status4evar-pref-status-linkOver-delay-show" type="number" size="5" /> <textbox id="status4evar-status-linkOver-delay-show-value" preference="status4evar-pref-status-linkOver-delay-show" type="number" size="5" />
<label id="status4evar-status-linkOver-delay-show-unit">&status4evar.unit.milliseconds;</label> <label id="status4evar-status-linkOver-delay-show-unit">&status4evar.unit.milliseconds;</label>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-status-linkOver-delay-hide-label" control="status4evar-status-linkOver-delay-hide-value">&status4evar.status.linkOver.delay.hide.label;</label> <label id="status4evar-status-linkOver-delay-hide-label" control="status4evar-status-linkOver-delay-hide-value">&status4evar.status.linkOver.delay.hide.label;</label>
<textbox id="status4evar-status-linkOver-delay-hide-value" preference="status4evar-pref-status-linkOver-delay-hide" type="number" size="5" /> <textbox id="status4evar-status-linkOver-delay-hide-value" preference="status4evar-pref-status-linkOver-delay-hide" type="number" size="5" />
<label id="status4evar-status-linkOver-delay-hide-unit">&status4evar.unit.milliseconds;</label> <label id="status4evar-status-linkOver-delay-hide-unit">&status4evar.unit.milliseconds;</label>
</hbox> </hbox>
</groupbox> </groupbox>
</tabpanel> </tabpanel>
<tabpanel id="status4evar-tabpanel-status-toolbar" orient="vertical"> <tabpanel id="status4evar-tabpanel-status-toolbar" orient="vertical">
<hbox align="center"> <hbox align="center">
<checkbox id="status4evar-status-toolbar-maxLength-check" label="&status4evar.status.toolbar.maxLength.label;" <checkbox id="status4evar-status-toolbar-maxLength-check" label="&status4evar.status.toolbar.maxLength.label;"
command="status4evar-command-status-toolbar-maxLength" /> command="status4evar-command-status-toolbar-maxLength" />
<textbox id="status4evar-status-toolbar-maxLength-value" preference="status4evar-pref-status-toolbar-maxLength" type="number" size="4" <textbox id="status4evar-status-toolbar-maxLength-value" preference="status4evar-pref-status-toolbar-maxLength" type="number" size="4"
onsyncfrompreference="return status4evarPrefs.textLengthSync();" /> onsyncfrompreference="return status4evarPrefs.textLengthSync();" />
<label id="status4evar-status-toolbar-maxLength-unit">&status4evar.unit.px;</label> <label id="status4evar-status-toolbar-maxLength-unit">&status4evar.unit.px;</label>
</hbox> </hbox>
</tabpanel> </tabpanel>
<tabpanel id="status4evar-tabpanel-status-popup" orient="vertical"> <tabpanel id="status4evar-tabpanel-status-popup" orient="vertical">
<checkbox id="status4evar-status-popup-invertMirror-check" preference="status4evar-pref-status-popup-invertMirror" label="&status4evar.status.popup.invertMirror.label;" /> <checkbox id="status4evar-status-popup-invertMirror-check" preference="status4evar-pref-status-popup-invertMirror" label="&status4evar.status.popup.invertMirror.label;" />
<checkbox id="status4evar-status-popup-mouseMirror-check" preference="status4evar-pref-status-popup-mouseMirror" label="&status4evar.status.popup.mouseMirror.label;" /> <checkbox id="status4evar-status-popup-mouseMirror-check" preference="status4evar-pref-status-popup-mouseMirror" label="&status4evar.status.popup.mouseMirror.label;" />
</tabpanel> </tabpanel>
</tabpanels> </tabpanels>
</tabbox> </tabbox>
</prefpane> </prefpane>
<prefpane id="status4evar-pane-progress" label="&status4evar.pane.progress;"> <prefpane id="status4evar-pane-progress" label="&status4evar.pane.progress;">
<preferences> <preferences>
<preference id="status4evar-pref-progress-toolbar-force" name="status4evar.progress.toolbar.force" type="bool" /> <preference id="status4evar-pref-progress-toolbar-force" name="status4evar.progress.toolbar.force" type="bool" />
<preference id="status4evar-pref-progress-toolbar-style" name="status4evar.progress.toolbar.style" type="bool" <preference id="status4evar-pref-progress-toolbar-style" name="status4evar.progress.toolbar.style" type="bool"
onchange="status4evarPrefs.progressToolbarStyleChanged();" /> onchange="status4evarPrefs.progressToolbarStyleChanged();" />
<preference id="status4evar-pref-progress-toolbar-css" name="status4evar.progress.toolbar.css" type="string" <preference id="status4evar-pref-progress-toolbar-css" name="status4evar.progress.toolbar.css" type="string"
onchange="status4evarPrefs.progressToolbarCSSChanged();" /> onchange="status4evarPrefs.progressToolbarCSSChanged();" />
</preferences> </preferences>
<commandset id="status4evar-commandset-status"> <commandset id="status4evar-commandset-status">
</commandset> </commandset>
<checkbox id="status4evar-progress-toolbar-force-check" preference="status4evar-pref-progress-toolbar-force" label="&status4evar.progress.toolbar.force.label;" /> <checkbox id="status4evar-progress-toolbar-force-check" preference="status4evar-pref-progress-toolbar-force" label="&status4evar.progress.toolbar.force.label;" />
<checkbox id="status4evar-progress-toolbar-style-check" preference="status4evar-pref-progress-toolbar-style" label="&status4evar.progress.style.label;" <checkbox id="status4evar-progress-toolbar-style-check" preference="status4evar-pref-progress-toolbar-style" label="&status4evar.progress.style.label;"
onsyncfrompreference="return status4evarPrefs.progressToolbarStyleSync();" /> onsyncfrompreference="return status4evarPrefs.progressToolbarStyleSync();" />
<vbox class="css-bg-editor" preference="status4evar-pref-progress-toolbar-css" preference-editable="true" flex="1"> <vbox class="css-bg-editor" preference="status4evar-pref-progress-toolbar-css" preference-editable="true" flex="1">
<progressmeter id="status4evar-progress-bar" value="75" flex="1" /> <progressmeter id="status4evar-progress-bar" value="75" flex="1" />
</vbox> </vbox>
</prefpane> </prefpane>
<prefpane id="status4evar-pane-download" label="&status4evar.pane.download;"> <prefpane id="status4evar-pane-download" label="&status4evar.pane.download;">
<preferences> <preferences>
<preference id="status4evar-pref-download-button-action" name="status4evar.download.button.action" type="int" /> <preference id="status4evar-pref-download-button-action" name="status4evar.download.button.action" type="int" />
<preference id="status4evar-pref-download-color-active" name="status4evar.download.color.active" type="string" /> <preference id="status4evar-pref-download-color-active" name="status4evar.download.color.active" type="string" />
<preference id="status4evar-pref-download-color-paused" name="status4evar.download.color.paused" type="string" /> <preference id="status4evar-pref-download-color-paused" name="status4evar.download.color.paused" type="string" />
<preference id="status4evar-pref-download-force" name="status4evar.download.force" type="bool" /> <preference id="status4evar-pref-download-force" name="status4evar.download.force" type="bool" />
<preference id="status4evar-pref-download-label" name="status4evar.download.label" type="int" /> <preference id="status4evar-pref-download-label" name="status4evar.download.label" type="int" />
<preference id="status4evar-pref-download-label-force" name="status4evar.download.label.force" type="bool" /> <preference id="status4evar-pref-download-label-force" name="status4evar.download.label.force" type="bool" />
<preference id="status4evar-pref-download-notify-animate" name="status4evar.download.notify.animate" type="bool" /> <preference id="status4evar-pref-download-notify-animate" name="status4evar.download.notify.animate" type="bool" />
<preference id="status4evar-pref-download-notify-timeout" name="status4evar.download.notify.timeout" type="int" /> <preference id="status4evar-pref-download-notify-timeout" name="status4evar.download.notify.timeout" type="int" />
<preference id="status4evar-pref-download-progress" name="status4evar.download.progress" type="int" /> <preference id="status4evar-pref-download-progress" name="status4evar.download.progress" type="int" />
<preference id="status4evar-pref-download-tooltip" name="status4evar.download.tooltip" type="int" /> <preference id="status4evar-pref-download-tooltip" name="status4evar.download.tooltip" type="int" />
<preference id="status4evar-pref-download-button-action-command" name="status4evar.download.button.action.command" type="string"/> <preference id="status4evar-pref-download-button-action-command" name="status4evar.download.button.action.command" type="string"/>
</preferences> </preferences>
<commandset id="status4evar-commandset-download"> <commandset id="status4evar-commandset-download">
<command id="status4evar-command-download-progress" oncommand="status4evarPrefs.downloadProgressToggle();" /> <command id="status4evar-command-download-progress" oncommand="status4evarPrefs.downloadProgressToggle();" />
</commandset> </commandset>
<checkbox id="status4evar-download-force-check" preference="status4evar-pref-download-force" label="&status4evar.download.force.label;" /> <checkbox id="status4evar-download-force-check" preference="status4evar-pref-download-force" label="&status4evar.download.force.label;" />
<checkbox id="status4evar-download-label-force-check" preference="status4evar-pref-download-label-force" label="&status4evar.download.label.force.label;" /> <checkbox id="status4evar-download-label-force-check" preference="status4evar-pref-download-label-force" label="&status4evar.download.label.force.label;" />
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-label-label" control="status4evar-download-label-menu">&status4evar.download.label.label;</label> <label id="status4evar-download-label-label" control="status4evar-download-label-menu">&status4evar.download.label.label;</label>
<menulist id="status4evar-download-label-menu" preference="status4evar-pref-download-label" sizetopopup="always"> <menulist id="status4evar-download-label-menu" preference="status4evar-pref-download-label" sizetopopup="always">
<menupopup> <menupopup>
<menuitem value="0" label="&status4evar.option.dlcount;" /> <menuitem value="0" label="&status4evar.option.dlcount;" />
<menuitem value="1" label="&status4evar.option.dltime;" /> <menuitem value="1" label="&status4evar.option.dltime;" />
<menuitem value="2" label="&status4evar.option.both;" /> <menuitem value="2" label="&status4evar.option.both;" />
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-tooltip-label" control="status4evar-download-tooltip-menu">&status4evar.download.tooltip.label;</label> <label id="status4evar-download-tooltip-label" control="status4evar-download-tooltip-menu">&status4evar.download.tooltip.label;</label>
<menulist id="status4evar-download-tooltip-menu" preference="status4evar-pref-download-tooltip" sizetopopup="always"> <menulist id="status4evar-download-tooltip-menu" preference="status4evar-pref-download-tooltip" sizetopopup="always">
<menupopup> <menupopup>
<menuitem value="0" label="&status4evar.option.dlcount;" /> <menuitem value="0" label="&status4evar.option.dlcount;" />
<menuitem value="1" label="&status4evar.option.dltime;" /> <menuitem value="1" label="&status4evar.option.dltime;" />
<menuitem value="2" label="&status4evar.option.both;" /> <menuitem value="2" label="&status4evar.option.both;" />
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-button-action-label" control="status4evar-download-button-action-menu">&status4evar.download.button.action.label;</label> <label id="status4evar-download-button-action-label" control="status4evar-download-button-action-menu">&status4evar.download.button.action.label;</label>
<menulist id="status4evar-download-button-action-menu" preference="status4evar-pref-download-button-action" sizetopopup="always"> <menulist id="status4evar-download-button-action-menu" preference="status4evar-pref-download-button-action" sizetopopup="always">
<menupopup> <menupopup>
<menuitem value="0" label="&status4evar.option.nothing;" /> <menuitem value="0" label="&status4evar.option.nothing;" />
<menuitem value="1" label="&status4evar.option.firefoxdefault;" /> <menuitem value="1" label="&status4evar.option.firefoxdefault;" />
<menuitem value="2" label="&status4evar.option.download.library;" /> <menuitem value="2" label="&status4evar.option.download.library;" />
<menuitem value="3" label="&status4evar.option.download.tab;" /> <menuitem value="3" label="&status4evar.option.download.tab;" />
<menuitem value="4" label="&status4evar.option.download.thirdparty;" id="status4evar-download-button-action-menu-thirdparty" /> <menuitem value="4" label="&status4evar.option.download.thirdparty;" id="status4evar-download-button-action-menu-thirdparty" />
</menupopup> </menupopup>
</menulist> </menulist>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-notify-timeout-label" control="status4evar-download-notify-timeout-value">&status4evar.download.notify.timeout.label;</label> <label id="status4evar-download-notify-timeout-label" control="status4evar-download-notify-timeout-value">&status4evar.download.notify.timeout.label;</label>
<textbox id="status4evar-download-notify-timeout-value" preference="status4evar-pref-download-notify-timeout" type="number" size="3" /> <textbox id="status4evar-download-notify-timeout-value" preference="status4evar-pref-download-notify-timeout" type="number" size="3" />
<label id="status4evar-download-notify-timeout-unit">&status4evar.unit.seconds;</label> <label id="status4evar-download-notify-timeout-unit">&status4evar.unit.seconds;</label>
</hbox> </hbox>
<checkbox id="status4evar-download-notify-animate-check" preference="status4evar-pref-download-notify-animate" label="&status4evar.download.notify.animate.label;" /> <checkbox id="status4evar-download-notify-animate-check" preference="status4evar-pref-download-notify-animate" label="&status4evar.download.notify.animate.label;" />
<checkbox id="status4evar-download-progress-check" command="status4evar-command-download-progress" label="&status4evar.download.progress.label;" /> <checkbox id="status4evar-download-progress-check" command="status4evar-command-download-progress" label="&status4evar.download.progress.label;" />
<vbox class="indent"> <vbox class="indent">
<hbox align="center"> <hbox align="center">
<radiogroup id="status4evar-download-progress-radiogroup" preference="status4evar-pref-download-progress" <radiogroup id="status4evar-download-progress-radiogroup" preference="status4evar-pref-download-progress"
onsyncfrompreference="return status4evarPrefs.downloadProgressSync();"> onsyncfrompreference="return status4evarPrefs.downloadProgressSync();">
<radio value="1" label="&status4evar.download.progress.average.label;" /> <radio value="1" label="&status4evar.download.progress.average.label;" />
<radio value="2" label="&status4evar.download.progress.max.label;" /> <radio value="2" label="&status4evar.download.progress.max.label;" />
<radio value="3" label="&status4evar.download.progress.min.label;" /> <radio value="3" label="&status4evar.download.progress.min.label;" />
</radiogroup> </radiogroup>
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-color-active-label" control="status4evar-download-color-active-picker">&status4evar.download.color.active.label;</label> <label id="status4evar-download-color-active-label" control="status4evar-download-color-active-picker">&status4evar.download.color.active.label;</label>
<colorpicker id="status4evar-download-color-active-picker" preference="status4evar-pref-download-color-active" type="button" /> <colorpicker id="status4evar-download-color-active-picker" preference="status4evar-pref-download-color-active" type="button" />
</hbox> </hbox>
<hbox align="center"> <hbox align="center">
<label id="status4evar-download-color-paused-label" control="status4evar-download-color-paused-picker">&status4evar.download.color.paused.label;</label> <label id="status4evar-download-color-paused-label" control="status4evar-download-color-paused-picker">&status4evar.download.color.paused.label;</label>
<colorpicker id="status4evar-download-color-paused-picker" preference="status4evar-pref-download-color-paused" type="button" /> <colorpicker id="status4evar-download-color-paused-picker" preference="status4evar-pref-download-color-paused" type="button" />
</hbox> </hbox>
</vbox> </vbox>
</prefpane> </prefpane>
<prefpane id="status4evar-pane-addonbar" label="&status4evar.pane.statusbar;"> <prefpane id="status4evar-pane-addonbar" label="&status4evar.pane.statusbar;">
<preferences> <preferences>
<preference id="status4evar-pref-addonbar-borderStyle" name="status4evar.addonbar.borderStyle" type="bool" /> <preference id="status4evar-pref-addonbar-borderStyle" name="status4evar.addonbar.borderStyle" type="bool" />
<preference id="status4evar-pref-addonbar-closeButton" name="status4evar.addonbar.closeButton" type="bool" /> <preference id="status4evar-pref-addonbar-closeButton" name="status4evar.addonbar.closeButton" type="bool" />
<preference id="status4evar-pref-addonbar-windowGripper" name="status4evar.addonbar.windowGripper" type="bool" /> <preference id="status4evar-pref-addonbar-windowGripper" name="status4evar.addonbar.windowGripper" type="bool" />
</preferences> </preferences>
<checkbox id="status4evar-addonbar-borderStyle-check" preference="status4evar-pref-addonbar-borderStyle" label="&status4evar.addonbar.borderStyle;" /> <checkbox id="status4evar-addonbar-borderStyle-check" preference="status4evar-pref-addonbar-borderStyle" label="&status4evar.addonbar.borderStyle;" />
<checkbox id="status4evar-addonbar-closeButton-check" preference="status4evar-pref-addonbar-closeButton" label="&status4evar.addonbar.closeButton;" /> <checkbox id="status4evar-addonbar-closeButton-check" preference="status4evar-pref-addonbar-closeButton" label="&status4evar.addonbar.closeButton;" />
<checkbox id="status4evar-addonbar-windowGripper-check" preference="status4evar-pref-addonbar-windowGripper" label="&status4evar.addonbar.windowGripper;" /> <checkbox id="status4evar-addonbar-windowGripper-check" preference="status4evar-pref-addonbar-windowGripper" label="&status4evar.addonbar.windowGripper;" />
</prefpane> </prefpane>
<prefpane id="status4evar-pane-advanced" label="&status4evar.pane.advanced;"> <prefpane id="status4evar-pane-advanced" label="&status4evar.pane.advanced;">
<preferences> <preferences>
<preference id="status4evar-pref-advanced-status-detectFullScreen" name="status4evar.advanced.status.detectFullScreen" type="bool" /> <preference id="status4evar-pref-advanced-status-detectFullScreen" name="status4evar.advanced.status.detectFullScreen" type="bool" />
<preference id="status4evar-pref-advanced-status-detectVideo" name="status4evar.advanced.status.detectVideo" type="bool" /> <preference id="status4evar-pref-advanced-status-detectVideo" name="status4evar.advanced.status.detectVideo" type="bool" />
<preference id="browser-pref-urlbar-trimming-enabled" name="browser.urlbar.trimURLs" type="bool" /> <preference id="browser-pref-urlbar-trimming-enabled" name="browser.urlbar.trimURLs" type="bool" />
</preferences> </preferences>
<vbox flex="1"> <vbox flex="1">
<groupbox id="status4evar-status-urlbar-builtin"> <groupbox id="status4evar-status-urlbar-builtin">
<caption label="&status4evar.status.urlbar.firefox.builtin.caption;" /> <caption label="&status4evar.status.urlbar.firefox.builtin.caption;" />
<checkbox id="browser-urlbar-trimming-enabled-ckeck" preference="browser-pref-urlbar-trimming-enabled" label="&browser.urlbar.trimming.enabled.label;" /> <checkbox id="browser-urlbar-trimming-enabled-ckeck" preference="browser-pref-urlbar-trimming-enabled" label="&browser.urlbar.trimming.enabled.label;" />
</groupbox> </groupbox>
<groupbox id="status4evar-advanced-status"> <groupbox id="status4evar-advanced-status">
<caption label="&status4evar.pane.status;" /> <caption label="&status4evar.pane.status;" />
<checkbox id="status4evar-advanced-status-detectFullScreen-check" preference="status4evar-pref-advanced-status-detectFullScreen" label="&status4evar.advanced.status.detectFullScreen;" /> <checkbox id="status4evar-advanced-status-detectFullScreen-check" preference="status4evar-pref-advanced-status-detectFullScreen" label="&status4evar.advanced.status.detectFullScreen;" />
<checkbox id="status4evar-advanced-status-detectVideo-check" preference="status4evar-pref-advanced-status-detectVideo" label="&status4evar.advanced.status.detectVideo;" /> <checkbox id="status4evar-advanced-status-detectVideo-check" preference="status4evar-pref-advanced-status-detectVideo" label="&status4evar.advanced.status.detectVideo;" />
</groupbox> </groupbox>
</vbox> </vbox>
</prefpane> </prefpane>
</prefwindow> </prefwindow>

View file

@ -9,210 +9,210 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"> xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="statuspanel" display="xul:hbox" extends="chrome://browser/content/tabbrowser.xml#statuspanel"> <binding id="statuspanel" display="xul:hbox" extends="chrome://browser/content/tabbrowser.xml#statuspanel">
<implementation> <implementation>
<!-- --> <!-- -->
<!-- Inverted mirror handling --> <!-- Inverted mirror handling -->
<!-- --> <!-- -->
<field name="_invertMirror"><![CDATA[ <field name="_invertMirror"><![CDATA[
false false
]]></field> ]]></field>
<property name="invertMirror"> <property name="invertMirror">
<setter><![CDATA[ <setter><![CDATA[
this._invertMirror = val; this._invertMirror = val;
this.mirror = this._isMirrored; this.mirror = this._isMirrored;
return val; return val;
]]></setter> ]]></setter>
<getter><![CDATA[ <getter><![CDATA[
return this._invertMirror; return this._invertMirror;
]]></getter> ]]></getter>
</property> </property>
<!-- --> <!-- -->
<!-- Mouse mirror handling --> <!-- Mouse mirror handling -->
<!-- --> <!-- -->
<field name="_mouseMirror"><![CDATA[ <field name="_mouseMirror"><![CDATA[
true true
]]></field> ]]></field>
<field name="_mouseMirrorListen"><![CDATA[ <field name="_mouseMirrorListen"><![CDATA[
false false
]]></field> ]]></field>
<property name="mouseMirror"> <property name="mouseMirror">
<setter><![CDATA[ <setter><![CDATA[
this._mouseMirror = val; this._mouseMirror = val;
this.setupMouseMirror(this.value); this.setupMouseMirror(this.value);
return val; return val;
]]></setter> ]]></setter>
<getter><![CDATA[ <getter><![CDATA[
return this._mouseMirror; return this._mouseMirror;
]]></getter> ]]></getter>
</property> </property>
<method name="setupMouseMirror"> <method name="setupMouseMirror">
<parameter name="val"/> <parameter name="val"/>
<body><![CDATA[ <body><![CDATA[
if(val && this._mouseMirror) if(val && this._mouseMirror)
{ {
this._calcMouseTargetRect(); this._calcMouseTargetRect();
if(!this._mouseMirrorListen) if(!this._mouseMirrorListen)
{ {
MousePosTracker.addListener(this); MousePosTracker.addListener(this);
this._mouseMirrorListen = true; this._mouseMirrorListen = true;
} }
} }
else else
{ {
this.mirror = false; this.mirror = false;
if(this._mouseMirrorListen) if(this._mouseMirrorListen)
{ {
MousePosTracker.removeListener(this); MousePosTracker.removeListener(this);
this._mouseMirrorListen = false; this._mouseMirrorListen = false;
} }
} }
]]></body> ]]></body>
</method> </method>
<method name="_calcMouseTargetRect"> <method name="_calcMouseTargetRect">
<body><![CDATA[ <body><![CDATA[
let alignRight = false; let alignRight = false;
let isRTL = (getComputedStyle(document.documentElement).direction == "rtl"); let isRTL = (getComputedStyle(document.documentElement).direction == "rtl");
if((this._invertMirror && !isRTL) || (!this._invertMirror && isRTL)) if((this._invertMirror && !isRTL) || (!this._invertMirror && isRTL))
{ {
alignRight = true; alignRight = true;
} }
let rect = this.getBoundingClientRect(); let rect = this.getBoundingClientRect();
this._mouseTargetRect = this._mouseTargetRect =
{ {
top: rect.top, top: rect.top,
bottom: rect.bottom, bottom: rect.bottom,
left: ((alignRight) ? window.innerWidth - rect.width : 0), left: ((alignRight) ? window.innerWidth - rect.width : 0),
right: ((alignRight) ? window.innerWidth : rect.width) right: ((alignRight) ? window.innerWidth : rect.width)
}; };
]]></body> ]]></body>
</method> </method>
<method name="onMouseEnter"> <method name="onMouseEnter">
<body><![CDATA[ <body><![CDATA[
this.mirror = true; this.mirror = true;
]]></body> ]]></body>
</method> </method>
<method name="onMouseLeave"> <method name="onMouseLeave">
<body><![CDATA[ <body><![CDATA[
this.mirror = false; this.mirror = false;
]]></body> ]]></body>
</method> </method>
<!-- --> <!-- -->
<!-- Mirror handling --> <!-- Mirror handling -->
<!-- --> <!-- -->
<field name="_isMirrored"><![CDATA[ <field name="_isMirrored"><![CDATA[
false false
]]></field> ]]></field>
<property name="mirror"> <property name="mirror">
<setter><![CDATA[ <setter><![CDATA[
this._isMirrored = val; this._isMirrored = val;
if(this._invertMirror) if(this._invertMirror)
{ {
val = !val; val = !val;
} }
this.setBooleanAttr("mirror", val); this.setBooleanAttr("mirror", val);
]]></setter> ]]></setter>
<getter><![CDATA[ <getter><![CDATA[
return this._isMirrored; return this._isMirrored;
]]></getter> ]]></getter>
</property> </property>
<method name="_mirror"> <method name="_mirror">
<body><![CDATA[ <body><![CDATA[
this.mirror = !this._isMirrored; this.mirror = !this._isMirrored;
]]></body> ]]></body>
</method> </method>
<!-- --> <!-- -->
<!-- Value handling --> <!-- Value handling -->
<!-- --> <!-- -->
<property name="label"> <property name="label">
<setter><![CDATA[ <setter><![CDATA[
if(window.caligon && window.caligon.status4evar) if(window.caligon && window.caligon.status4evar)
{ {
window.caligon.status4evar.statusService.setStatusText(val); window.caligon.status4evar.statusService.setStatusText(val);
} }
return undefined; return undefined;
]]></setter> ]]></setter>
<getter><![CDATA[ <getter><![CDATA[
if(window.caligon && window.caligon.status4evar) if(window.caligon && window.caligon.status4evar)
{ {
return window.caligon.status4evar.statusService.getStatusText(); return window.caligon.status4evar.statusService.getStatusText();
} }
return ""; return "";
]]></getter> ]]></getter>
</property> </property>
<property name="value"> <property name="value">
<setter><![CDATA[ <setter><![CDATA[
this.setValue(val); this.setValue(val);
this.setupMouseMirror(val); this.setupMouseMirror(val);
return val; return val;
]]></setter> ]]></setter>
<getter><![CDATA[ <getter><![CDATA[
return ((this.hasAttribute("inactive")) ? "" : this.getAttribute("label")); return ((this.hasAttribute("inactive")) ? "" : this.getAttribute("label"));
]]></getter> ]]></getter>
</property> </property>
<method name="setValue"> <method name="setValue">
<parameter name="val"/> <parameter name="val"/>
<body><![CDATA[ <body><![CDATA[
if((this.getAttribute("type") || "").indexOf("network") > -1 && (this.getAttribute("previoustype") || "").indexOf("network") > -1) if((this.getAttribute("type") || "").indexOf("network") > -1 && (this.getAttribute("previoustype") || "").indexOf("network") > -1)
{ {
this.style.minWidth = getComputedStyle(this).width; this.style.minWidth = getComputedStyle(this).width;
} }
else else
{ {
this.style.minWidth = ""; this.style.minWidth = "";
} }
if(val) if(val)
{ {
this.setAttribute("label", val); this.setAttribute("label", val);
this.setBooleanAttr("inactive", false); this.setBooleanAttr("inactive", false);
} }
else else
{ {
this.setBooleanAttr("inactive", true); this.setBooleanAttr("inactive", true);
} }
]]></body> ]]></body>
</method> </method>
<!-- --> <!-- -->
<!-- Helpers --> <!-- Helpers -->
<!-- --> <!-- -->
<method name="setBooleanAttr"> <method name="setBooleanAttr">
<parameter name="name"/> <parameter name="name"/>
<parameter name="val"/> <parameter name="val"/>
<body><![CDATA[ <body><![CDATA[
if(val) if(val)
{ {
this.setAttribute(name, "true"); this.setAttribute(name, "true");
} }
else else
{ {
this.removeAttribute(name); this.removeAttribute(name);
} }
]]></body> ]]></body>
</method> </method>
</implementation> </implementation>
</binding> </binding>
</bindings> </bindings>

View file

@ -9,49 +9,49 @@ interface nsIDOMWindow;
[scriptable, uuid(33d0433d-07be-4dc4-87fd-954057310efd)] [scriptable, uuid(33d0433d-07be-4dc4-87fd-954057310efd)]
interface nsIStatus4Evar : nsISupports interface nsIStatus4Evar : nsISupports
{ {
readonly attribute boolean addonbarBorderStyle; readonly attribute boolean addonbarBorderStyle;
readonly attribute boolean addonbarCloseButton; readonly attribute boolean addonbarCloseButton;
readonly attribute boolean addonbarLegacyShim; readonly attribute boolean addonbarLegacyShim;
readonly attribute boolean addonbarWindowGripper; readonly attribute boolean addonbarWindowGripper;
readonly attribute boolean advancedStatusDetectFullScreen; readonly attribute boolean advancedStatusDetectFullScreen;
readonly attribute boolean advancedStatusDetectVideo; readonly attribute boolean advancedStatusDetectVideo;
readonly attribute long downloadButtonAction; readonly attribute long downloadButtonAction;
readonly attribute ACString downloadButtonActionCommand; readonly attribute ACString downloadButtonActionCommand;
readonly attribute ACString downloadColorActive; readonly attribute ACString downloadColorActive;
readonly attribute ACString downloadColorPaused; readonly attribute ACString downloadColorPaused;
readonly attribute boolean downloadForce; readonly attribute boolean downloadForce;
readonly attribute long downloadLabel; readonly attribute long downloadLabel;
readonly attribute boolean downloadLabelForce; readonly attribute boolean downloadLabelForce;
readonly attribute boolean downloadNotifyAnimate; readonly attribute boolean downloadNotifyAnimate;
readonly attribute long downloadNotifyTimeout; readonly attribute long downloadNotifyTimeout;
readonly attribute long downloadProgress; readonly attribute long downloadProgress;
readonly attribute long downloadTooltip; readonly attribute long downloadTooltip;
readonly attribute boolean firstRun; readonly attribute boolean firstRun;
readonly attribute boolean firstRunAustralis; readonly attribute boolean firstRunAustralis;
readonly attribute ACString progressToolbarCSS; readonly attribute ACString progressToolbarCSS;
readonly attribute boolean progressToolbarForce; readonly attribute boolean progressToolbarForce;
readonly attribute boolean progressToolbarStyle; readonly attribute boolean progressToolbarStyle;
readonly attribute boolean progressToolbarStyleAdvanced; readonly attribute boolean progressToolbarStyleAdvanced;
readonly attribute long status; readonly attribute long status;
readonly attribute boolean statusDefault; readonly attribute boolean statusDefault;
readonly attribute boolean statusNetwork; readonly attribute boolean statusNetwork;
readonly attribute boolean statusNetworkXHR; readonly attribute boolean statusNetworkXHR;
readonly attribute long statusTimeout; readonly attribute long statusTimeout;
readonly attribute long statusLinkOver; readonly attribute long statusLinkOver;
readonly attribute long statusLinkOverDelayShow; readonly attribute long statusLinkOverDelayShow;
readonly attribute long statusLinkOverDelayHide; readonly attribute long statusLinkOverDelayHide;
readonly attribute long statusToolbarMaxLength; readonly attribute long statusToolbarMaxLength;
readonly attribute boolean statusToolbarInvertMirror; readonly attribute boolean statusToolbarInvertMirror;
readonly attribute boolean statusToolbarMouseMirror; readonly attribute boolean statusToolbarMouseMirror;
void resetPrefs(); void resetPrefs();
void updateWindow(in nsIDOMWindow win); void updateWindow(in nsIDOMWindow win);
}; };

File diff suppressed because it is too large Load diff