[Pkg-mozext-commits] [firetray] 65/84: Cleaning.
David Prévot
taffit at moszumanska.debian.org
Sun Jul 20 01:42:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firetray.
commit 7aca24c88a3b6918fbfd62692a82a7e28f4f09e9
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Sun May 25 21:52:06 2014 +0200
Cleaning.
---
src/chrome/content/overlay.js | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/chrome/content/overlay.js b/src/chrome/content/overlay.js
index 3367f21..e8319fe 100644
--- a/src/chrome/content/overlay.js
+++ b/src/chrome/content/overlay.js
@@ -74,30 +74,29 @@ var firetrayChrome = { // each new window gets a new firetrayChrome !
* we override the fake buttons' default actions.
*/
hijackTitlebarButtons: function() {
- Object.keys(this.titlebarDispatch).map(function(val, idx) {
- let fInfo = firetrayChrome.replaceCommand(val, firetrayChrome.titlebarDispatch[val]['new']);
+ this.titlebarDispatch.forEach(function(button) {
+ let fInfo = firetrayChrome.replaceCommand(button.id, button.new);
if (fInfo) {
- firetrayChrome.titlebarDispatch[val]['old'] = fInfo[0];
- firetray_log.debug('replaced command='+val+' type='+fInfo[1]+' func='+fInfo[0]);
- firetrayChrome.titlebarDispatch[val]['type'] = fInfo[1];
+ button.old = fInfo[0];
+ firetray_log.debug('replaced command='+button.id+' type='+fInfo[1]+' func='+fInfo[0]);
+ button.type = fInfo[1];
}
});
},
- titlebarDispatch: {
- "titlebar-min": {new: function(e){
+ titlebarDispatch: [
+ {id: "titlebar-min", new: function(e){
firetray_log.debug(' titlebar-min clicked');
if (!firetray.Handler.onMinimize(firetrayChrome.winId))
firetrayChrome.applyDefaultCommand("titlebar-min");
}, old: null, type: null},
-
- "titlebar-close": {new: function(e){
+ {id: "titlebar-close", new: function(e){
firetray_log.debug(' titlebar-close clicked');
if (!firetrayChrome.onClose(null)) {
firetrayChrome.applyDefaultCommand("titlebar-close");
}
}, old: null, type: null}
- },
+ ],
replaceCommand: function(eltId, func) {
let elt = document.getElementById(eltId);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git
More information about the Pkg-mozext-commits
mailing list