[gnome-shell] App menu: only create the popup menu with a GMenu
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] App menu: only create the popup menu with a GMenu
- Date: Tue, 17 Jan 2012 17:40:19 +0000 (UTC)
commit 1bac40fbe34b29b021075be4519aafdcfa6f2a13
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Jan 9 16:31:44 2012 +0100
App menu: only create the popup menu with a GMenu
Since the application proxy is created asynchronously, at the time
the GActionGroup (GActionMuxer) is created, there is no GDBusMenu yet.
Defer creating the menu in that case.
Also, clear out signal handlers if have no target application.
https://bugzilla.gnome.org/show_bug.cgi?id=633028
js/ui/panel.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 3e58332..3196fc1 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -528,6 +528,9 @@ const AppMenuButton = new Lang.Class({
if (targetApp) {
this._appMenuNotifyId = targetApp.connect('notify::menu', Lang.bind(this, this._sync));
this._actionGroupNotifyId = targetApp.connect('notify::action-group', Lang.bind(this, this._sync));
+ } else {
+ this._appMenuNotifyId = 0;
+ this._actionGroupNotifyId = 0;
}
this._targetApp = targetApp;
@@ -549,7 +552,7 @@ const AppMenuButton = new Lang.Class({
_maybeSetMenu: function() {
let menu;
- if (this._targetApp.action_group) {
+ if (this._targetApp.action_group && this._targetApp.menu) {
if (this.menu instanceof PopupMenu.RemoteMenu &&
this.menu.actionGroup == this._targetApp.action_group)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]