aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-03 18:09:57 -0800
committerTed Gould <ted@gould.cx>2010-02-03 18:09:57 -0800
commit167062acbd9cddb34596328404fe648f68cc6999 (patch)
treef674c1d9b2c221eeea48b75e1e00a3c46c33957c /libdbusmenu-glib/client.c
parent9b7020779b1b334d696e6d165d1d61f95c12fc0a (diff)
downloadlibdbusmenu-167062acbd9cddb34596328404fe648f68cc6999.tar.gz
libdbusmenu-167062acbd9cddb34596328404fe648f68cc6999.tar.bz2
libdbusmenu-167062acbd9cddb34596328404fe648f68cc6999.zip
Bringing through the handling of events through the local subclass of the item.
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 :( */