aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-08-26 16:24:58 -0500
committerTed Gould <ted@canonical.com>2009-08-26 16:24:58 -0500
commita7a3cd7d3ec49a25febf58d63b704a4b0287ad8e (patch)
treeb038e61da0193ee2c24943decec7b6c9ff43dc63 /libdbusmenu-gtk
parent9afd4dc68692b573582c3bd57489f9b5a541eb3a (diff)
downloadlibdbusmenu-a7a3cd7d3ec49a25febf58d63b704a4b0287ad8e.tar.gz
libdbusmenu-a7a3cd7d3ec49a25febf58d63b704a4b0287ad8e.tar.bz2
libdbusmenu-a7a3cd7d3ec49a25febf58d63b704a4b0287ad8e.zip
Having new children processed on realization
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/menu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libdbusmenu-gtk/menu.c b/libdbusmenu-gtk/menu.c
index 6e78a04..b6f8061 100644
--- a/libdbusmenu-gtk/menu.c
+++ b/libdbusmenu-gtk/menu.c
@@ -64,6 +64,7 @@ static void set_property (GObject * obj, guint id, const GValue * value, GParamS
static void get_property (GObject * obj, guint id, GValue * value, GParamSpec * pspec);
/* Internal */
static void build_client (DbusmenuGtkMenu * self);
+static void child_realized (DbusmenuMenuitem * child, gpointer userdata);
/* GObject Stuff */
G_DEFINE_TYPE (DbusmenuGtkMenu, dbusmenu_gtkmenu, GTK_TYPE_MENU);
@@ -188,9 +189,7 @@ static void
root_child_added (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint position, DbusmenuGtkMenu * menu)
{
g_debug("Root new child");
- DbusmenuGtkMenuPrivate * priv = DBUSMENU_GTKMENU_GET_PRIVATE(menu);
- gtk_menu_shell_insert(GTK_MENU_SHELL(menu), GTK_WIDGET(dbusmenu_gtkclient_menuitem_get(priv->client, child)), position);
- gtk_widget_show(GTK_WIDGET(menu));
+ g_signal_connect(G_OBJECT(child), DBUSMENU_MENUITEM_SIGNAL_REALIZED, G_CALLBACK(child_realized), menu);
return;
}