diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-04-22 17:26:08 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-04-22 17:26:08 +0200 |
commit | 3cabcaefd84a4ff980d0d2160df099c573d467b2 (patch) | |
tree | 213c7ddeea976bc41f6ce61e1c8d8549a5dd4464 /src/ido-menu-item.c | |
parent | dbeec9ceb74e60badf4b695e8fb023fb3f70c99b (diff) | |
download | ayatana-indicator-messages-3cabcaefd84a4ff980d0d2160df099c573d467b2.tar.gz ayatana-indicator-messages-3cabcaefd84a4ff980d0d2160df099c573d467b2.tar.bz2 ayatana-indicator-messages-3cabcaefd84a4ff980d0d2160df099c573d467b2.zip |
IdoMenuItem: pass event timestamp to the action if we have no status change
Diffstat (limited to 'src/ido-menu-item.c')
-rw-r--r-- | src/ido-menu-item.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ido-menu-item.c b/src/ido-menu-item.c index 32044ff..f702828 100644 --- a/src/ido-menu-item.c +++ b/src/ido-menu-item.c @@ -282,10 +282,24 @@ static void ido_menu_item_activate (GtkMenuItem *item) { IdoMenuItemPrivate *priv = IDO_MENU_ITEM (item)->priv; + GVariant *parameter; /* see ido_menu_item_set_active */ if (!priv->in_set_active && priv->action && priv->action_group) - g_action_group_activate_action (priv->action_group, priv->action, priv->target); + { + guint32 event_time = gtk_get_current_event_time (); + + if (priv->target) + { + parameter = priv->target; + } + else + { + parameter = g_variant_new_uint32 (event_time); + } + + g_action_group_activate_action (priv->action_group, priv->action, parameter); + } if (priv->in_set_active) GTK_MENU_ITEM_CLASS (ido_menu_item_parent_class)->activate (item); |