[Pkg-mozext-commits] [firebug] 37/56: Issue 7686 - properly customize the start button
David Prévot
taffit at moszumanska.debian.org
Wed Nov 19 21:01:45 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 3fd8b41babece8a0d94dc8cc77965ff64e049c33
Author: Jan Odvarko <odvarko at gmail.com>
Date: Wed Oct 29 14:49:44 2014 +0100
Issue 7686 - properly customize the start button
---
extension/content/firebug/firefox/browserOverlay.js | 13 -------------
.../firebug/firefox/multiprocessNotificationPanel.xml | 18 +++++++++++++-----
.../firebug/firefox/start-button/startButton.xml | 5 +++++
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js
index 59c7140..557a9ed 100644
--- a/extension/content/firebug/firefox/browserOverlay.js
+++ b/extension/content/firebug/firefox/browserOverlay.js
@@ -90,10 +90,6 @@ BrowserOverlay.prototype =
this.internationalize();
this.allPagesActivation();
-
- if (this.isMultiprocessEnabled()) {
- this.initializeMultiprocessUI();
- }
},
internationalize: function()
@@ -615,15 +611,6 @@ BrowserOverlay.prototype =
return false;
},
- initializeMultiprocessUI: function()
- {
- // xxxHonza: when exactly is the binding applied?
- this.win.setTimeout(() => {
- var startButton = this.doc.getElementById("firebug-button");
- startButton.mutliprocessEnabled();
- }, 400);
- },
-
showMultiprocessNotification: function()
{
var popupSet = $(this.doc, "mainPopupSet");
diff --git a/extension/content/firebug/firefox/multiprocessNotificationPanel.xml b/extension/content/firebug/firefox/multiprocessNotificationPanel.xml
index 6688626..790bffa 100644
--- a/extension/content/firebug/firefox/multiprocessNotificationPanel.xml
+++ b/extension/content/firebug/firefox/multiprocessNotificationPanel.xml
@@ -82,12 +82,20 @@
<method name="open">
<body><![CDATA[
- var panel = document.getAnonymousElementByAttribute(this, "anonid", "panel");
+ var offsetY = 0;
+ var offsetX = 0;
+ var target = document.getElementById("nav-bar-customization-target");
+
var startButton = document.getElementById("firebug-button");
- var style = document.defaultView.getComputedStyle(startButton.button);
- var offsetY = parseInt(style["padding-bottom"]);
- var offsetX = parseInt(style["width"])/2;
- panel.openPopup(startButton.button, "after_end", -offsetX, -offsetY, false, false);
+ if (startButton) {
+ var style = document.defaultView.getComputedStyle(startButton.button);
+ offsetY = parseInt(style["padding-bottom"]);
+ offsetX = parseInt(style["width"])/2;
+ target = startButton.button;
+ }
+
+ var panel = document.getAnonymousElementByAttribute(this, "anonid", "panel");
+ panel.openPopup(target, "after_end", -offsetX, -offsetY, false, false);
]]></body>
</method>
diff --git a/extension/content/firebug/firefox/start-button/startButton.xml b/extension/content/firebug/firefox/start-button/startButton.xml
index c0719d9..3ac5360 100644
--- a/extension/content/firebug/firefox/start-button/startButton.xml
+++ b/extension/content/firebug/firefox/start-button/startButton.xml
@@ -19,6 +19,11 @@
</content>
<implementation>
+ <constructor><![CDATA[
+ if (Firebug.browserOverlay.isMultiprocessEnabled())
+ this.mutliprocessEnabled();
+ ]]></constructor>
+
<property name="button">
<xbl:getter><![CDATA[
return document.getAnonymousElementByAttribute(this, "anonid", "button");
--
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