aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-30 19:25:21 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-03-30 19:25:21 +0100
commiteacbe640fa7ffb8a99a04ebf21f94982c3679a8c (patch)
tree4fa69148cfa06ee45d84728f2d2196e5be709e88 /src/metadata-menu-item.vala
parent6a225f960257026db4c5d57211b4159127bfc3a0 (diff)
downloadayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.tar.gz
ayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.tar.bz2
ayatana-indicator-sound-eacbe640fa7ffb8a99a04ebf21f94982c3679a8c.zip
MenuItem: use GtkLaunchContext with proper event timeout to launch applications
Also discards non-activation events
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index b2dd752..bcd4378 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -168,13 +168,16 @@ public class MetadataMenuitem : PlayerItem
public override void handle_event (string name,
Variant input_value,
uint timestamp)
- {
+ {
+ if (name != Dbusmenu.MENUITEM_EVENT_ACTIVATED)
+ return;
+
if(this.owner.current_state == PlayerController.state.OFFLINE)
{
- this.owner.instantiate();
+ this.owner.instantiate(timestamp);
}
else if(this.owner.current_state == PlayerController.state.CONNECTED){
- this.owner.mpris_bridge.expose();
+ this.owner.mpris_bridge.expose(timestamp);
}
}