aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-09-17 13:36:38 -0500
committerTed Gould <ted@canonical.com>2009-09-17 13:36:38 -0500
commit15c11261bd45e2732a31b2fa235cc2a6261452e4 (patch)
treef0eb0b94ed701659a7eed19ef7fce16f73866f23 /libdbusmenu-glib
parentc699131fa96f6f48bf2509b46beb256cf04b2d82 (diff)
downloadlibdbusmenu-15c11261bd45e2732a31b2fa235cc2a6261452e4.tar.gz
libdbusmenu-15c11261bd45e2732a31b2fa235cc2a6261452e4.tar.bz2
libdbusmenu-15c11261bd45e2732a31b2fa235cc2a6261452e4.zip
Adding in handling of the child moved event
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index ab5951f..f4c1dcb 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -323,6 +323,13 @@ menuitem_child_removed (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, Dbu
return;
}
+static void
+menuitem_child_moved (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint newpos, guint oldpos, DbusmenuServer * server)
+{
+ g_signal_emit(G_OBJECT(server), signals[LAYOUT_UPDATE], 0, TRUE);
+ return;
+}
+
/* Connects all the signals that we're interested in
coming from a menuitem */
static void
@@ -330,6 +337,7 @@ menuitem_signals_create (DbusmenuMenuitem * mi, gpointer data)
{
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED, G_CALLBACK(menuitem_child_added), data);
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(menuitem_child_removed), data);
+ g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(menuitem_child_moved), data);
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menuitem_property_changed), data);
return;
}
@@ -341,6 +349,7 @@ menuitem_signals_remove (DbusmenuMenuitem * mi, gpointer data)
{
g_signal_handlers_disconnect_by_func(G_OBJECT(mi), G_CALLBACK(menuitem_child_added), data);
g_signal_handlers_disconnect_by_func(G_OBJECT(mi), G_CALLBACK(menuitem_child_removed), data);
+ g_signal_handlers_disconnect_by_func(G_OBJECT(mi), G_CALLBACK(menuitem_child_moved), data);
g_signal_handlers_disconnect_by_func(G_OBJECT(mi), G_CALLBACK(menuitem_property_changed), data);
return;
}