diff options
author | Aurelien Gateau <aurelien.gateau@canonical.com> | 2010-03-03 12:29:28 +0100 |
---|---|---|
committer | Aurelien Gateau <aurelien.gateau@canonical.com> | 2010-03-03 12:29:28 +0100 |
commit | 761cd05f56dd236e787ce7da56740b7e0c6ae399 (patch) | |
tree | 25816f38fee0e3b6bf926ceefcccf1cc02b10e53 /libdbusmenu-gtk | |
parent | ffc0d5b49e0d12c8d1f3701951c3abfb5ee2ad8a (diff) | |
download | libdbusmenu-761cd05f56dd236e787ce7da56740b7e0c6ae399.tar.gz libdbusmenu-761cd05f56dd236e787ce7da56740b7e0c6ae399.tar.bz2 libdbusmenu-761cd05f56dd236e787ce7da56740b7e0c6ae399.zip |
Started to implement about-to-show support
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index 781326e..77d971e 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -116,6 +116,14 @@ menu_pressed_cb (GtkMenuItem * gmi, DbusmenuMenuitem * mi) return TRUE; } +/* This is called when submenu gm of menuitem mi gets shown. */ +static gboolean +menu_shown_cb (GtkMenu * gm, DbusmenuMenuitem * mi) +{ + dbusmenu_menuitem_send_about_to_show(mi); + return TRUE; +} + /* Process the visible property */ static void process_visible (DbusmenuMenuitem * mi, GtkMenuItem * gmi, const GValue * value) @@ -323,6 +331,7 @@ new_child (DbusmenuMenuitem * mi, DbusmenuMenuitem * child, guint position, Dbus /* Oh, we don't have a submenu, build one! */ menu = GTK_MENU(gtk_menu_new()); g_object_set_data(G_OBJECT(mi), data_menu, menu); + g_signal_connect(G_OBJECT(menu), "show", G_CALLBACK(menu_shown_cb), mi); GtkMenuItem * parent = dbusmenu_gtkclient_menuitem_get(gtkclient, mi); gtk_menu_item_set_submenu(parent, GTK_WIDGET(menu)); |