From 658db43ad3bd43e627fb167c05c4fb51577860a6 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 15 Jul 2013 19:16:30 +0100 Subject: [PATCH] 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 file changed, 2 insertions(+) diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 42dd6f7e9..78f25db68 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; });