aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-03 18:47:30 -0800
committerTed Gould <ted@gould.cx>2010-02-03 18:47:30 -0800
commitaeb104ebe6e4375be82b58a5ba284e56d3f3183e (patch)
tree3483b1e2d894e910a3cedd206b462726c77b3630 /libdbusmenu-glib/client.c
parent013addb9cfd5fe843d3336de90b6c687464a2c2c (diff)
parent3c326978d937a03354b470b7b2ffd4dbd471c50c (diff)
downloadlibdbusmenu-aeb104ebe6e4375be82b58a5ba284e56d3f3183e.tar.gz
libdbusmenu-aeb104ebe6e4375be82b58a5ba284e56d3f3183e.tar.bz2
libdbusmenu-aeb104ebe6e4375be82b58a5ba284e56d3f3183e.zip
Adding support for having generic signals in the menuitems. Moving 'clicked' to GTK.
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r--libdbusmenu-glib/client.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 720c8e2..f5ebbd1 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -35,6 +35,7 @@ License version 3 and version 2.1 along with this program. If not, see
#include "client.h"
#include "menuitem.h"
+#include "client-menuitem.h"
#include "dbusmenu-client.h"
#include "server-marshal.h"
@@ -626,14 +627,11 @@ menuitem_call_cb (DBusGProxy * proxy, GError * error, gpointer userdata)
return;
}
-static void
-menuitem_activate (DbusmenuMenuitem * mi, DbusmenuClient * client)
+void
+dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name, const GValue * value, guint timestamp)
{
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
- GValue value = {0};
- g_value_init(&value, G_TYPE_INT);
- g_value_set_int(&value, 0);
- org_ayatana_dbusmenu_event_async (priv->menuproxy, dbusmenu_menuitem_get_id(mi), "clicked", &value, 0, menuitem_call_cb, mi);
+ org_ayatana_dbusmenu_event_async (priv->menuproxy, id, name, value, timestamp, menuitem_call_cb, GINT_TO_POINTER(id));
return;
}
@@ -661,11 +659,10 @@ parse_layout_xml(DbusmenuClient * client, xmlNodePtr node, DbusmenuMenuitem * it
}
/* Build a new item */
- item = dbusmenu_menuitem_new_with_id(id);
+ item = DBUSMENU_MENUITEM(dbusmenu_client_menuitem_new(id, client));
if (parent == NULL) {
dbusmenu_menuitem_set_root(item, TRUE);
}
- g_signal_connect(G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_activate), client);
/* Get the properties queued up for this item */
/* Not happy about this, but I need these :( */