aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-20 16:15:25 -0500
committerTed Gould <ted@gould.cx>2010-07-20 16:15:25 -0500
commit903aaf402c081506173b31c755fe58338b6cd930 (patch)
tree2a72f5ea23cf89e2d0b6c8a463ae08c1ac0645c2 /libdbusmenu-glib
parent3d98145e318bb486451603c2a312e65c14ea809f (diff)
downloadlibdbusmenu-903aaf402c081506173b31c755fe58338b6cd930.tar.gz
libdbusmenu-903aaf402c081506173b31c755fe58338b6cd930.tar.bz2
libdbusmenu-903aaf402c081506173b31c755fe58338b6cd930.zip
Actually build the signal and put it on the object.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/server-marshal.list1
-rw-r--r--libdbusmenu-glib/server.c17
-rw-r--r--libdbusmenu-glib/server.h3
3 files changed, 20 insertions, 1 deletions
diff --git a/libdbusmenu-glib/server-marshal.list b/libdbusmenu-glib/server-marshal.list
index 1689a05..0d68c4e 100644
--- a/libdbusmenu-glib/server-marshal.list
+++ b/libdbusmenu-glib/server-marshal.list
@@ -1,2 +1,3 @@
VOID: INT, STRING, POINTER
VOID: UINT, INT
+VOID: INT, UINT
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 13c2843..deee5da 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -65,6 +65,7 @@ enum {
ID_PROP_UPDATE,
ID_UPDATE,
LAYOUT_UPDATED,
+ ITEM_ACTIVATION,
LAST_SIGNAL
};
@@ -165,6 +166,22 @@ dbusmenu_server_class_init (DbusmenuServerClass *class)
NULL, NULL,
_dbusmenu_server_marshal_VOID__UINT_INT,
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT);
+ /**
+ DbusmenuServer::item-activation-requested:
+ @arg0: The #DbusmenuServer emitting the signal.
+ @arg1: The ID of the parent for this update.
+ @arg2: The timestamp of when the event happened
+
+ This is signaled when a menuitem under this server
+ sends it's activate signal.
+ */
+ signals[ITEM_ACTIVATION] = g_signal_new(DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION,
+ G_TYPE_FROM_CLASS(class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET(DbusmenuServerClass, item_activation),
+ NULL, NULL,
+ _dbusmenu_server_marshal_VOID__INT_UINT,
+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT);
g_object_class_install_property (object_class, PROP_DBUS_OBJECT,
diff --git a/libdbusmenu-glib/server.h b/libdbusmenu-glib/server.h
index 4daf448..a9bf213 100644
--- a/libdbusmenu-glib/server.h
+++ b/libdbusmenu-glib/server.h
@@ -46,6 +46,7 @@ G_BEGIN_DECLS
#define DBUSMENU_SERVER_SIGNAL_ID_PROP_UPDATE "item-property-updated"
#define DBUSMENU_SERVER_SIGNAL_ID_UPDATE "item-updated"
#define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED "layout-updated"
+#define DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION "item-activation-requested"
#define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED
#define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object"
@@ -73,7 +74,7 @@ struct _DbusmenuServerClass {
void (*id_prop_update)(gint id, gchar * property, gchar * value);
void (*id_update)(gint id);
void (*layout_updated)(gint revision);
- void (*item_activation_requested)(gint id, guint timestamp);
+ void (*item_activation)(gint id, guint timestamp);
/* Reserved */
void (*dbusmenu_server_reserved1)(void);