MessageTray: add right click menu for summary items

This provides straight forward controls for opening the corresponding
application or removing the summary item.

https://bugzilla.gnome.org/show_bug.cgi?id=617224
This commit is contained in:
Hellyna Ng
2011-02-12 03:43:01 +08:00
committed by Marina Zhurakhinskaya
parent 4282748483
commit 868bf5838d
6 changed files with 139 additions and 76 deletions

View File

@ -54,8 +54,10 @@ PopupBaseMenuItem.prototype = {
}
if (params.reactive && params.hover)
this.actor.connect('notify::hover', Lang.bind(this, this._onHoverChanged));
if (params.reactive)
if (params.reactive) {
this.actor.connect('key-focus-in', Lang.bind(this, this._onKeyFocusIn));
this.actor.connect('key-focus-out', Lang.bind(this, this._onKeyFocusOut));
}
},
_onStyleChanged: function (actor) {
@ -81,6 +83,10 @@ PopupBaseMenuItem.prototype = {
this.setActive(true);
},
_onKeyFocusOut: function (actor) {
this.setActive(false);
},
_onHoverChanged: function (actor) {
this.setActive(actor.hover);
},