[Pkg-mozext-commits] [itsalltext] 184/459: fixed problem with preferences not waiting when the editor is bad.

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:26:20 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 1d37a6f85bc763b6751d6e7aa204eaa24e407b2f
Author: Christian Höltje <docwhat at gerf.org>
Date:   Sun Apr 1 12:32:55 2007 -0400

    fixed problem with preferences not waiting when the editor is bad.
---
 chrome/content/cacheobj.js   | 2 +-
 chrome/content/itsalltext.js | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/chrome/content/cacheobj.js b/chrome/content/cacheobj.js
index af09029..828a436 100644
--- a/chrome/content/cacheobj.js
+++ b/chrome/content/cacheobj.js
@@ -261,7 +261,7 @@ CacheObj.prototype.edit = function(extension) {
                           "chrome,titlebar,toolbar,centerscreen,modal",
                           params);
         if(params.out.do_preferences) {
-            ItsAllText.openPreferences();
+            ItsAllText.openPreferences(true);
             this.edit(extension);
         }
     }
diff --git a/chrome/content/itsalltext.js b/chrome/content/itsalltext.js
index 02d2974..7823044 100644
--- a/chrome/content/itsalltext.js
+++ b/chrome/content/itsalltext.js
@@ -351,13 +351,15 @@ var ItsAllText = function() {
     
     /**
      * Open the preferences dialog box.
+     * @param{boolean} wait The function won't return until the preference is set.
      * @private
      * Stolen from http://wiki.mozilla.org/XUL:Windows
      * and utilityOverlay.js's openPreferences()
      */
-    that.openPreferences = function () {
+    that.openPreferences = function (wait) {
+        wait = typeof(wait)=='boolean'?wait:false;
         var paneID = that.MYSTRING + '_preferences';
-        var instantApply = getBoolPref("browser.preferences.instantApply", false);
+        var instantApply = getBoolPref("browser.preferences.instantApply", false) && !wait;
         var features = "chrome,titlebar,toolbar,centerscreen" + (instantApply ? ",dialog=no" : ",modal");
 
         var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);

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