[gnome-shell] popupMenu: Ensure that submenus are properly hidden when insensitive
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] popupMenu: Ensure that submenus are properly hidden when insensitive
- Date: Mon, 15 Jul 2013 16:37:33 +0000 (UTC)
commit 4b889eac32eb2b53fcd17f822f0424697b349848
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Jun 12 03:35:28 2013 -0400
popupMenu: Ensure that submenus are properly hidden when insensitive
We don't actually propagate sensitivity information to submenus; we
simply make sure that they can never be open when the parent is
insensitive.
https://bugzilla.gnome.org/show_bug.cgi?id=702539
js/ui/popupMenu.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index e14f75d..5918c93 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1340,6 +1340,13 @@ const PopupSubMenuMenuItem = new Lang.Class({
this.menu.connect('open-state-changed', Lang.bind(this, this._subMenuOpenStateChanged));
},
+ syncSensitive: function() {
+ let sensitive = this.parent();
+ this._triangle.visible = sensitive;
+ if (!sensitive)
+ this.menu.close(false);
+ },
+
_subMenuOpenStateChanged: function(menu, open) {
if (open)
this.actor.add_style_pseudo_class('open');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]