[Pkg-mozext-commits] [firebug] 07/18: #8022 Improve multiprocess notification popup
David Prévot
taffit at moszumanska.debian.org
Thu Jun 9 01:36:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firebug.
commit 534d8cdc620bceca868845418bbf6dd1457a79f2
Author: Jan Odvarko <odvarko at gmail.com>
Date: Tue May 10 12:53:23 2016 +0200
#8022 Improve multiprocess notification popup
---
.../content/firebug/firefox/browserOverlay.css | 16 ++++++++
.../content/firebug/firefox/browserOverlay.js | 46 ++++++++++++++++++++--
.../firefox/newMultiprocessNotificationPanel.xml | 46 ++++++++++++++++++----
extension/defaults/preferences/firebug.js | 4 ++
.../en-US/multiprocess-notification.properties | 16 +++++---
5 files changed, 112 insertions(+), 16 deletions(-)
diff --git a/extension/content/firebug/firefox/browserOverlay.css b/extension/content/firebug/firefox/browserOverlay.css
index 6ddcfda..ed67e15 100644
--- a/extension/content/firebug/firefox/browserOverlay.css
+++ b/extension/content/firebug/firefox/browserOverlay.css
@@ -219,6 +219,22 @@ fbMultiprocessNotificationPanel .iconbox {
padding-right: 10px;
}
+fbNewMultiprocessNotificationPanel .closeButton {
+ background-image: url(chrome://firebug/skin/mac/close.svg);
+ width: 13px;
+ height: 13px;
+ border: none;
+ cursor: pointer;
+}
+
+fbNewMultiprocessNotificationPanel .closeButton:hover {
+ filter: url(resource://firebugui/filters.svg#darken);
+}
+
+fbNewMultiprocessNotificationPanel .closeButton:active {
+ filter: url(resource://firebugui/filters.svg#deepDarken);
+}
+
fbUpgradeNotificationPanel .desc,
fbAuroraNotificationPanel .desc,
fbNewMultiprocessNotificationPanel .desc,
diff --git a/extension/content/firebug/firefox/browserOverlay.js b/extension/content/firebug/firefox/browserOverlay.js
index e4c2a52..0eb1d62 100644
--- a/extension/content/firebug/firefox/browserOverlay.js
+++ b/extension/content/firebug/firefox/browserOverlay.js
@@ -764,6 +764,9 @@ BrowserOverlay.prototype =
return;
}
+ this.oldTheme = Options.getPref("devtools", "theme");
+ this.oldTheme = (this.oldTheme == "firebug") ? "light" : this.oldTheme;
+
var popupSet = $(this.doc, "mainPopupSet");
var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel");
if (!panel)
@@ -771,11 +774,25 @@ BrowserOverlay.prototype =
panel = this.doc.createElement("fbNewMultiprocessNotificationPanel");
panel.setAttribute("opendevtoolscommand", "Firebug.browserOverlay.onOpenDevTools(event, 'fbMultiprocessNotificationPanel')");
panel.setAttribute("disablecommand", "Firebug.browserOverlay.onDisableE10s(event)");
+ panel.setAttribute("activatefirebugtheme", "Firebug.browserOverlay.onActivateFirebugTheme(event)");
+
popupSet.appendChild(panel);
}
+ let firebugTheme = Options.get("activateFirebugTheme");
+ panel.firebugTheme.checked = firebugTheme;
+
+ //panel.notAgain.checked = false;
+
+ if (firebugTheme)
+ {
+ this.activateFirebugTheme("firebug");
+ }
+
panel.internationalize(Locale);
panel.open();
+
+ this.toggleDevTools(true);
},
onDisableE10s: function(event)
@@ -788,7 +805,8 @@ BrowserOverlay.prototype =
Options.setPref("browser.tabs", "remote.autostart.1", false);
var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel");
- Options.set("noMultiprocessMessage", panel.notAgain.checked);
+ //Options.set("noMultiprocessMessage", panel.notAgain.checked);
+ Options.set("noMultiprocessMessage", true);
restartFirefox();
},
@@ -798,11 +816,33 @@ BrowserOverlay.prototype =
Events.cancelEvent(event);
var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel");
- Options.set("noMultiprocessMessage", panel.notAgain.checked);
+ //Options.set("noMultiprocessMessage", panel.notAgain.checked);
+ Options.set("noMultiprocessMessage", true);
panel.close();
+ },
+
+ onActivateFirebugTheme: function(event) {
+ var panel = this.doc.querySelector("fbNewMultiprocessNotificationPanel");
+ var newTheme = panel.firebugTheme.checked ? "firebug" : this.oldTheme;
+
+ Options.set("activateFirebugTheme", panel.firebugTheme.checked);
+
+ this.activateFirebugTheme(newTheme);
+ },
+
+ activateFirebugTheme: function(newTheme) {
+ var oldTheme = Options.getPref("devtools", "theme");
+
+ Options.setPref("devtools", "theme", newTheme);
+
+ let data = {
+ pref: "devtools.theme",
+ newValue: newTheme,
+ oldValue: oldTheme
+ };
- this.toggleDevTools(true);
+ DevTools.gDevTools.emit("pref-changed", data);
},
toggleDevTools: function(forceOpen) {
diff --git a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml
index e4f45af..b826015 100644
--- a/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml
+++ b/extension/content/firebug/firefox/newMultiprocessNotificationPanel.xml
@@ -14,10 +14,12 @@
<xul:panel anonid="panel" norestorefocus="true" noautofocus="true"
ignorekeys="true" role="presentation" type="arrow" class="panel">
<xul:hbox>
- <xul:vbox class="iconbox">
- <xul:image src="chrome://firebug/skin/firebug64.png"/>
- </xul:vbox>
- <xul:vbox>
+ <xul:vbox class="iconbox">
+ <xul:image src="chrome://firebug/skin/firebug64.png"/>
+ </xul:vbox>
+ <xul:vbox>
+ <xul:hbox class="warningbox"></xul:hbox>
+
<xul:description anonid="desc" class="desc" />
<xul:hbox class="warningbox"></xul:hbox>
@@ -26,12 +28,23 @@
class="text-link popup-notification-learnmore-link learnMore"
href="https://getfirebug.com/merging-into-firefox-developer-tools"/>
+ <xul:hbox class="warningbox"></xul:hbox>
+
+ <xul:description anonid="desc3" class="desc" />
+
<xul:hbox class="warningbox">
<xul:vbox>
- <xul:checkbox anonid="notAgain" checked="false"/>
+ <xul:checkbox anonid="firebugTheme" checked="true"
+ xbl:inherits="oncommand=activatefirebugtheme" />
</xul:vbox>
</xul:hbox>
+ <!-- <xul:hbox class="warningbox">
+ <xul:vbox>
+ <xul:checkbox anonid="notAgain" checked="false" />
+ </xul:vbox>
+ </xul:hbox> -->
+
<xul:hbox class="warningbox" style="height: 10px;"></xul:hbox>
<xul:hbox align="right">
@@ -48,7 +61,10 @@
</xul:button>
</xul:hbox>
</xul:vbox>
- </xul:hbox>
+ <xul:vbox>
+ <xul:image class="closeButton" anonid="closeButton"/>
+ </xul:vbox>
+ </xul:hbox>
</xul:panel>
</content>
@@ -62,17 +78,25 @@
var desc = document.getAnonymousElementByAttribute(this, "anonid", "desc");
desc.textContent = Locale.$STR("multiprocess.description");
+ var desc3 = document.getAnonymousElementByAttribute(this, "anonid", "desc3");
+ desc3.textContent = Locale.$STR("multiprocess.description3");
+
var learnMore = document.getAnonymousElementByAttribute(this, "anonid", "learnMore");
learnMore.textContent = Locale.$STR("multiprocess.learnMore");
- var notAgain = document.getAnonymousElementByAttribute(this, "anonid", "notAgain");
- notAgain.label = Locale.$STR("multiprocess.notAgain");
+ //var notAgain = document.getAnonymousElementByAttribute(this, "anonid", "notAgain");
+ //notAgain.label = Locale.$STR("multiprocess.notAgain");
var openDevToolsButton = document.getAnonymousElementByAttribute(this, "anonid", "opendevtools");
openDevToolsButton.label = Locale.$STR("multiprocess.openDevTools");
var disableMenu = document.getAnonymousElementByAttribute(this, "anonid", "disable");
disableMenu.label = Locale.$STR("multiprocess.disable");
+
+ this.firebugTheme.label = Locale.$STR("multiprocess.activateFirebugTheme");
+
+ var closeButton = document.getAnonymousElementByAttribute(this, "anonid", "closeButton");
+ closeButton.addEventListener('click', this.close.bind(this), false);
]]></body>
</method>
@@ -113,6 +137,12 @@
return document.getAnonymousElementByAttribute(this, "anonid", "notAgain");
]]></getter>
</property>
+
+ <property name="firebugTheme">
+ <getter><![CDATA[
+ return document.getAnonymousElementByAttribute(this, "anonid", "firebugTheme");
+ ]]></getter>
+ </property>
</implementation>
</binding>
</bindings>
diff --git a/extension/defaults/preferences/firebug.js b/extension/defaults/preferences/firebug.js
index 7df4e05..a1f9b08 100644
--- a/extension/defaults/preferences/firebug.js
+++ b/extension/defaults/preferences/firebug.js
@@ -28,6 +28,10 @@ pref("extensions.firebug.hideDefaultInspector", false);
pref("extensions.firebug.delayLoad", true);
pref("extensions.firebug.clearAnnotationsConfirmation", true);
+// Multiprocess Notification
+pref("extensions.firebug.noMultiprocessMessage", false);
+pref("extensions.firebug.activateFirebugTheme", true);
+
// Remoting
pref("extensions.firebug.serverHost", "localhost");
pref("extensions.firebug.serverPort", 5999);
diff --git a/extension/locale/en-US/multiprocess-notification.properties b/extension/locale/en-US/multiprocess-notification.properties
index 88bcb3f..7333bd2 100644
--- a/extension/locale/en-US/multiprocess-notification.properties
+++ b/extension/locale/en-US/multiprocess-notification.properties
@@ -1,12 +1,13 @@
-# LOCALIZATION NOTE (multiprocess.description, multiprocess.learnMore, multiprocess.warning,
+# LOCALIZATION NOTE (multiprocess.description, multiprocess.description3, multiprocess.learnMore, multiprocess.warning,
# multiprocess.upgrade, multiprocess.disable, multiprocess.cancel):
# Label used in a notification panel that is displayed when the user clicks on Firebug start
# button in multiprocess Firefox browser (e10s enabled browser).
-multiprocess.description=The next version of Firebug will be integrated directly into the Firefox Developer Tools for increased performance, stability, and feature tracking of Firefox. Integration means an updated Inspector, new Performance, Storage and Memory tools, all using the Firebug theme that you're familiar with, so it's easy to get started.
-multiprocess.learnMore=Learn more...
+multiprocess.description=The next version of Firebug has been integrated directly into the Firefox Developer Tools for increased performance and stability.
+multiprocess.description3=This change includes an updated Inspector and new Performance, Storage, and Memory tools, all using the Firebug theme you’re familiar with.
+multiprocess.learnMore=Learn more about the changes...
multiprocess.warning=Firebug 3 alpha is based on the built-in Firefox developer tools so Firebug 2 addons don't work just yet, however turning off e10s should only be a temporary measure since it brings performance, stability and security advantages.
multiprocess.upgrade=Upgrade and Restart
-multiprocess.disable=Disable e10s and Restart
+multiprocess.disable=Restart Firefox and enable old unstable Firefox and Firebug
multiprocess.cancel=Cancel
# LOCALIZATION NOTE (multiprocess.notAgain, multiprocess.description2,
@@ -14,7 +15,7 @@ multiprocess.cancel=Cancel
# that is displayed when the user clicks on Firebug start button in multiprocess
# Firefox browser (e10s enabled browser).
multiprocess.description2=We've ported many Firebug features into built-in tools in order to support existing Firebug users so, go ahead and check it out!
-multiprocess.openDevTools=Open Firefox Developer Tools
+multiprocess.openDevTools=Use Firefox Developer Tools
multiprocess.warning2=Turning off e10s should only be a temporary measure since it brings performance, stability and security advantages.
multiprocess.notAgain=Do not display this message again
@@ -35,3 +36,8 @@ upgrade.tip.upgradeFirebug=Upgrade to Firebug 3 (for testers)
# Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug.
upgrade.description=Firebug 3 alpha is available for testing
upgrade.description2=Firebug 3 is based on the built-in Firefox developer tools so it works with the performance, stability and security advantages coming with multiprocess Firefox (also known as e10s), however Firebug 2 addons don't work with Firebug 3 yet.
+
+# LOCALIZATION NOTE (multiprocess.activateFirebugTheme):
+# Label used in a notification panel that is displayed when the user wants to explicitly upgrade Firebug.
+# The label belongs to a checkbox allowing to activate/deactivate Firebug theme for built-in DevTools
+multiprocess.activateFirebugTheme=Activate the Firebug theme
--
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