[gimp] Use gtk_container_get_children() instead of menushell->children



commit 3e500a4f7f7c56e8f4f76211d916a3df132316b6
Author: Michael Natterer <mitch gimp org>
Date:   Fri Oct 9 11:13:51 2009 +0200

    Use gtk_container_get_children() instead of menushell->children

 app/actions/debug-commands.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/actions/debug-commands.c b/app/actions/debug-commands.c
index 52b6ae0..5f1a266 100644
--- a/app/actions/debug-commands.c
+++ b/app/actions/debug-commands.c
@@ -388,9 +388,12 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
                                gint       depth,
                                gchar     *path)
 {
+  GList *children;
   GList *list;
 
-  for (list = GTK_MENU_SHELL (menu)->children; list; list = g_list_next (list))
+  children = gtk_container_get_children (GTK_CONTAINER (menu));
+
+  for (list = children; list; list = g_list_next (list))
     {
       GtkWidget *menu_item = GTK_WIDGET (list->data);
       GtkWidget *child     = gtk_bin_get_child (GTK_BIN (menu_item));
@@ -424,6 +427,8 @@ debug_dump_menus_recurse_menu (GtkWidget *menu,
           g_free (full_path);
         }
     }
+
+  g_list_free (children);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]