diff options
author | Ted Gould <ted@gould.cx> | 2011-01-26 16:28:21 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-26 16:28:21 -0600 |
commit | 0046e86a60080c84c6da758ad94e38e45b857f5f (patch) | |
tree | efab1d48a6ee3e24f4feb3a7fd6f207166b9e178 /libdbusmenu-gtk | |
parent | 708be7960d2df928bedddd7f7311dc81f0cb7477 (diff) | |
parent | e5078ed1027e8c466d081183eeee6888b10ef510 (diff) | |
download | libdbusmenu-0046e86a60080c84c6da758ad94e38e45b857f5f.tar.gz libdbusmenu-0046e86a60080c84c6da758ad94e38e45b857f5f.tar.bz2 libdbusmenu-0046e86a60080c84c6da758ad94e38e45b857f5f.zip |
* Upstream Merge
* Only activate at the top level
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/parser.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 07da2b9..46d214a 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -119,15 +119,17 @@ parse_menu_structure_helper (GtkWidget * widget, RecurseContext * recurse) * * Note that this will not force menuitems in submenus to be updated as well. */ - GList *children = gtk_container_get_children (GTK_CONTAINER (widget)); + if (recurse->parent == NULL) { + GList *children = gtk_container_get_children (GTK_CONTAINER (widget)); - for (; children != NULL; children = children->next) { - gtk_menu_shell_activate_item (GTK_MENU_SHELL (widget), - children->data, - TRUE); - } + for (; children != NULL; children = children->next) { + gtk_menu_shell_activate_item (GTK_MENU_SHELL (widget), + children->data, + TRUE); + } - g_list_free (children); + g_list_free (children); + } if (recurse->parent == NULL) { recurse->parent = dbusmenu_menuitem_new(); |