[Pkg-mozext-commits] [firebug] 23/35: Issue 6931: Edit button in the CSS panel is not available

David Prévot taffit at moszumanska.debian.org
Sat May 24 14:54:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository firebug.

commit 381cc06016d33cc2b8745f11953ac18f581f72c9
Author: Jan Odvarko <odvarko at gmail.com>
Date:   Thu May 22 15:07:36 2014 +0200

    Issue 6931: 	Edit button in the CSS panel is not available
---
 extension/content/firebug/css/cssPanel.js | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/extension/content/firebug/css/cssPanel.js b/extension/content/firebug/css/cssPanel.js
index fcc3f30..d432367 100644
--- a/extension/content/firebug/css/cssPanel.js
+++ b/extension/content/firebug/css/cssPanel.js
@@ -99,6 +99,8 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel,
         // Create an updater for asynchronous update (watching embedded iframe loads).
         var callback = this.updateDefaultLocation.bind(this);
         this.updater = new CSSPanelUpdater(this.context, callback);
+
+        CSSModule.addListener(this);
     },
 
     destroy: function(state)
@@ -112,6 +114,8 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel,
         if (this.updater)
             this.updater.destroy();
 
+        CSSModule.removeListener(this);
+
         Panel.destroy.apply(this, arguments);
     },
 
@@ -211,6 +215,23 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Panel,
     },
 
     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+    // CSSModule Listener
+
+    onCSSInsertRule: function(styleSheet, cssText, ruleIndex)
+    {
+        // Make sure toolbar buttons and location list are properly updated
+        // if a new stylesheet has been just appended (see also issue 6931).
+        this.showToolbarButtons("fbCSSButtons", true);
+        this.showToolbarButtons("fbLocationSeparator", false);
+        this.showToolbarButtons("fbLocationButtons", true);
+        this.showToolbarButtons("fbLocationList", true);
+
+        CSSModule.updateEditButton();
+
+        Firebug.chrome.syncLocationList();
+    },
+
+    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
     // Default Location Update
 
     /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firebug.git



More information about the Pkg-mozext-commits mailing list