aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbusmenu-glib/menuitem-marshal.list1
-rw-r--r--libdbusmenu-glib/menuitem.c10
-rw-r--r--libdbusmenu-glib/menuitem.h4
-rw-r--r--libdbusmenu-glib/server.c2
4 files changed, 10 insertions, 7 deletions
diff --git a/libdbusmenu-glib/menuitem-marshal.list b/libdbusmenu-glib/menuitem-marshal.list
index dc4ba53..654c91b 100644
--- a/libdbusmenu-glib/menuitem-marshal.list
+++ b/libdbusmenu-glib/menuitem-marshal.list
@@ -3,3 +3,4 @@ VOID: OBJECT, UINT, UINT
VOID: OBJECT, UINT
VOID: OBJECT
VOID: VOID
+VOID: UINT
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
index a03117c..e50b2d8 100644
--- a/libdbusmenu-glib/menuitem.c
+++ b/libdbusmenu-glib/menuitem.c
@@ -127,6 +127,7 @@ dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass)
/**
DbusmenuMenuitem::item-activated:
@arg0: The #DbusmenuMenuitem object.
+ @arg1: The timestamp of when it was activated
Emitted on the objects on the server side when
they are signaled on the client side.
@@ -136,8 +137,8 @@ dbusmenu_menuitem_class_init (DbusmenuMenuitemClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(DbusmenuMenuitemClass, item_activated),
NULL, NULL,
- _dbusmenu_menuitem_marshal_VOID__VOID,
- G_TYPE_NONE, 0, G_TYPE_NONE);
+ _dbusmenu_menuitem_marshal_VOID__UINT,
+ G_TYPE_NONE, 1, G_TYPE_UINT, G_TYPE_NONE);
/**
DbusmenuMenuitem::child-added:
@arg0: The #DbusmenuMenuitem which is the parent.
@@ -1114,18 +1115,19 @@ dbusmenu_menuitem_foreach (DbusmenuMenuitem * mi, void (*func) (DbusmenuMenuitem
/**
dbusmenu_menuitem_activate:
@mi: The #DbusmenuMenuitem to send the signal on.
+ @timestamp: The timestamp of when the event happened
Emits the #DbusmenuMenuitem::item-activate signal on this
menu item. Called by server objects when they get the
appropriate DBus signals from the client.
*/
void
-dbusmenu_menuitem_activate (DbusmenuMenuitem * mi)
+dbusmenu_menuitem_activate (DbusmenuMenuitem * mi, guint timestamp)
{
g_return_if_fail(DBUSMENU_IS_MENUITEM(mi));
#ifdef MASSIVEDEBUGGING
g_debug("Menuitem %d (%s) activated", ID(mi), LABEL(mi));
#endif
- g_signal_emit(G_OBJECT(mi), signals[ITEM_ACTIVATED], 0, TRUE);
+ g_signal_emit(G_OBJECT(mi), signals[ITEM_ACTIVATED], 0, timestamp, TRUE);
return;
}
diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h
index aaafe17..238b7d9 100644
--- a/libdbusmenu-glib/menuitem.h
+++ b/libdbusmenu-glib/menuitem.h
@@ -104,7 +104,7 @@ struct _DbusmenuMenuitemClass
/* Signals */
void (*property_changed) (gchar * property, GValue * value);
- void (*item_activated) (void);
+ void (*item_activated) (guint timestamp);
void (*child_added) (DbusmenuMenuitem * child, guint position);
void (*child_removed) (DbusmenuMenuitem * child);
void (*child_moved) (DbusmenuMenuitem * child, guint newpos, guint oldpos);
@@ -153,7 +153,7 @@ void dbusmenu_menuitem_set_root (DbusmenuMenuitem * mi, gboolean root);
gboolean dbusmenu_menuitem_get_root (DbusmenuMenuitem * mi);
void dbusmenu_menuitem_foreach (DbusmenuMenuitem * mi, void (*func) (DbusmenuMenuitem * mi, gpointer data), gpointer data);
-void dbusmenu_menuitem_activate (DbusmenuMenuitem * mi);
+void dbusmenu_menuitem_activate (DbusmenuMenuitem * mi, guint timestamp);
/**
SECTION:menuitem
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 48268ad..44bbe1b 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -553,7 +553,7 @@ _dbusmenu_server_event (DbusmenuServer * server, guint id, gchar * eventid, GVal
return FALSE;
}
- dbusmenu_menuitem_activate(mi);
+ dbusmenu_menuitem_activate(mi, timestamp);
return TRUE;
}