[Pkg-mozext-commits] [itsalltext] 349/459: fix for stylish.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository itsalltext.
commit dfdb24c7ffa04acf74c9f6b624feed631d11ec70
Author: Christian Höltje <docwhat at gerf.org>
Date: Tue Feb 10 21:52:08 2009 -0500
fix for stylish.
---
src/chrome/content/API.js | 2 +-
src/chrome/content/itsalltext.js | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/chrome/content/API.js b/src/chrome/content/API.js
index 57c28e5..25c67e6 100644
--- a/src/chrome/content/API.js
+++ b/src/chrome/content/API.js
@@ -72,7 +72,7 @@
*/
node.style.MozAppearance = 'none';
- cache_object = node && ItsAllText.getCacheObj(node);
+ cache_object = node && ItsAllText.CacheObj.get(node);
if (!cache_object) {
return;
}
diff --git a/src/chrome/content/itsalltext.js b/src/chrome/content/itsalltext.js
index 328e7b0..0d68d9a 100644
--- a/src/chrome/content/itsalltext.js
+++ b/src/chrome/content/itsalltext.js
@@ -412,12 +412,14 @@ var ItsAllText = function () {
that.openPreferences = function (wait) {
wait = typeof(wait) == 'boolean' ? wait : false;
var paneID = that.MYSTRING + '_preferences',
- instantApply = getBoolPref("browser.preferences.instantApply", false) && !wait,
+ psvc = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch),
+ instantApply = psvc.getBoolPref("browser.preferences.instantApply", false) && !wait,
features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal"),
xpcom_wm = Components.classes["@mozilla.org/appshell/window-mediator;1"],
wm = xpcom_wm.getService(Components.interfaces.nsIWindowMediator),
win = wm.getMostRecentWindow("Browser:Preferences"),
pane;
+
if (win) {
win.focus();
if (paneID) {
@@ -721,8 +723,10 @@ ItsAllText.prototype.hitch = function (object, method) {
ItsAllText.prototype.listen = function (source, event, listener, opt_capture) {
opt_capture = !!opt_capture;
this.debug("listen(%o, %o, -, %o)", source, event, opt_capture);
- Components.lookupMethod(source, "addEventListener")(
- event, listener, opt_capture);
+ if (source) {
+ Components.lookupMethod(source, "addEventListener")(
+ event, listener, opt_capture);
+ }
};
/**
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/itsalltext.git
More information about the Pkg-mozext-commits
mailing list