[Pkg-mozext-commits] [itsalltext] 174/459: Hopefully, this fixes the mac os X problem.
David Prévot
taffit at moszumanska.debian.org
Tue Feb 24 23:26:18 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 e74de2504950903c37a3573349985a3d572918a5
Author: docwhat at gerf.org <docwhat at gerf.org>
Date: Mon Mar 26 09:57:40 2007 -0400
Hopefully, this fixes the mac os X problem.
---
chrome/content/itsalltext.js | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index 2b4d26e..fe0e577 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -354,9 +354,22 @@ var ItsAllText = function() {
* @private
*/
that.openPreferences = function() {
- window.openDialog('chrome://itsalltext/chrome/preferences.xul',
- 'itsalltext_preferences',
- "chrome,titlebar,toolbar,centerscreen,modal");
+ var optionsURL = 'chrome://itsalltext/chrome/preferences.xul';
+ /* This code is borrowed from
+ chrome://mozapps/content/extensions/extensions.js
+ about line 980
+ It fixes the problem with Macs not getting a close button.
+ */
+ var features;
+ try {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ instantApply = prefs.getBoolPref("browser.preferences.instantApply");
+ features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
+ } catch (e) {
+ features = "chrome,titlebar,toolbar,centerscreen,modal";
+ }
+ window.openDialog(optionsURL, "", features);
};
/**
--
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