aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-04-10 23:26:46 -0500
committerTed Gould <ted@gould.cx>2011-04-10 23:26:46 -0500
commitf3654c0176b8ecc1cc812b9dc93e21da8483659d (patch)
tree4679b0f51444f001e518ea91f0ef6db2550e0f2d /libdbusmenu-glib
parentd3150ac5780e1e63f39746429a10dfe44f4c5099 (diff)
downloadlibdbusmenu-f3654c0176b8ecc1cc812b9dc93e21da8483659d.tar.gz
libdbusmenu-f3654c0176b8ecc1cc812b9dc93e21da8483659d.tar.bz2
libdbusmenu-f3654c0176b8ecc1cc812b9dc93e21da8483659d.zip
Passing the menuitem instead of finding it.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/client-menuitem.c2
-rw-r--r--libdbusmenu-glib/client-private.h3
-rw-r--r--libdbusmenu-glib/client.c3
3 files changed, 4 insertions, 4 deletions
diff --git a/libdbusmenu-glib/client-menuitem.c b/libdbusmenu-glib/client-menuitem.c
index 60f8637..483470a 100644
--- a/libdbusmenu-glib/client-menuitem.c
+++ b/libdbusmenu-glib/client-menuitem.c
@@ -106,7 +106,7 @@ static void
handle_event (DbusmenuMenuitem * mi, const gchar * name, GVariant * variant, guint timestamp)
{
DbusmenuClientMenuitemPrivate * priv = DBUSMENU_CLIENT_MENUITEM_GET_PRIVATE(mi);
- dbusmenu_client_send_event(priv->client, dbusmenu_menuitem_get_id(mi), name, variant, timestamp);
+ dbusmenu_client_send_event(priv->client, dbusmenu_menuitem_get_id(mi), name, variant, timestamp, mi);
return;
}
diff --git a/libdbusmenu-glib/client-private.h b/libdbusmenu-glib/client-private.h
index f6df372..44c0066 100644
--- a/libdbusmenu-glib/client-private.h
+++ b/libdbusmenu-glib/client-private.h
@@ -37,7 +37,8 @@ void dbusmenu_client_send_event (DbusmenuClient * client,
gint id,
const gchar * name,
GVariant * variant,
- guint timestamp);
+ guint timestamp,
+ DbusmenuMenuitem * mi);
void dbusmenu_client_send_about_to_show(DbusmenuClient * client,
gint id,
void (*cb) (gpointer user_data),
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 45cf0d1..2e6b09a 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1516,14 +1516,13 @@ menuitem_call_cb (GObject * proxy, GAsyncResult * res, gpointer userdata)
/* Sends the event over DBus to the server on the other side
of the bus. */
void
-dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name, GVariant * variant, guint timestamp)
+dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name, GVariant * variant, guint timestamp, DbusmenuMenuitem * mi)
{
g_return_if_fail(DBUSMENU_IS_CLIENT(client));
g_return_if_fail(id >= 0);
g_return_if_fail(name != NULL);
DbusmenuClientPrivate * priv = DBUSMENU_CLIENT_GET_PRIVATE(client);
- DbusmenuMenuitem * mi = dbusmenu_menuitem_find_id(priv->root, id);
if (mi == NULL) {
g_warning("Asked to activate a menuitem %d that we don't know about", id);
return;