[Pkg-mozext-commits] [firetray] 45/84: Fix popup menu separator placing.

David Prévot taffit at moszumanska.debian.org
Sun Jul 20 01:42:45 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 46ceaec9d0635312d83471ae42ae55d1a89131f6
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Wed Apr 2 22:49:10 2014 +0200

    Fix popup menu separator placing.
---
 src/modules/winnt/FiretrayPopupMenu.jsm | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/modules/winnt/FiretrayPopupMenu.jsm b/src/modules/winnt/FiretrayPopupMenu.jsm
index f327779..8a93a2d 100644
--- a/src/modules/winnt/FiretrayPopupMenu.jsm
+++ b/src/modules/winnt/FiretrayPopupMenu.jsm
@@ -49,30 +49,25 @@ firetray.PopupMenu = {
     this.menu = user32.CreatePopupMenu(); // FIXME: destroy
     log.debug("menu="+this.menu);
 
-    var addMenuSeparator = false;
-
     this.insertMenuItem('Quit', 'quit', IDM_QUIT);
     user32.InsertMenuW(this.menu, 0, user32.MF_BYPOSITION|user32.MF_SEPARATOR, 0, null);
     this.insertMenuItem('Preferences', 'prefs', IDM_PREF);
 
+    let menuSeparatorAdded = false;
     if (firetray.Handler.inBrowserApp) {
+      user32.InsertMenuW(this.menu, 0, user32.MF_BYPOSITION|user32.MF_SEPARATOR, 0, null);
+      menuSeparatorAdded = true;
       this.insertMenuItem('NewWindow', 'new-wnd', IDM_NEW_WND);
-      addMenuSeparator = true;
     }
 
     if (firetray.Handler.inMailApp) {
+      if (!menuSeparatorAdded) {
+        user32.InsertMenuW(this.menu, 0, user32.MF_BYPOSITION|user32.MF_SEPARATOR, 0, null);
+      }
       this.insertMenuItem('NewMessage', 'new-msg', IDM_NEW_MSG);
       this.insertMenuItem('ResetIcon', 'reset', IDM_RESET);
-      addMenuSeparator = true;
-    }
-
-    if (addMenuSeparator) {
-      user32.InsertMenuW(this.menu, 2, user32.MF_BYPOSITION|user32.MF_SEPARATOR, 0, null);
     }
 
-    // // We'll user InsertMenuW for hidden windows:
-    // user32.InsertMenuW(this.menu, 0, user32.MF_BYPOSITION|user32.MF_STRING, IDM_CLOSE, "Close"); // FIXME: ampersand doesn't work ?
-
     log.debug("PopupMenu created");
   },
 

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