[gnome-shell] popupMenu: Don't count the separator as an item when returning isEmpty



commit 658db43ad3bd43e627fb167c05c4fb51577860a6
Author: Michael Wood <michael g wood intel com>
Date:   Mon Jul 15 19:16:30 2013 +0100

    popupMenu: Don't count the separator as an item when returning isEmpty
    
    If we have a separator don't use it's possibly-unsynced visibility to
    determine if the menu is empty or not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=70386

 js/ui/popupMenu.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 42dd6f7..78f25db 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -722,6 +722,8 @@ const PopupMenuBase = new Lang.Class({
 
     isEmpty: function() {
         let hasVisibleChildren = this.box.get_children().some(function(child) {
+            if (child._delegate instanceof PopupSeparatorMenuItem)
+                return false;
             return child.visible;
         });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]