[gnome-panel/gtk3] Fix sealed field children
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] Fix sealed field children
- Date: Thu, 6 Jan 2011 06:29:13 +0000 (UTC)
commit 20ae5529e1aa2c82775ec24a6533f5809759af8f
Author: Germán Póo-Caamaño <gpoo gnome org>
Date: Wed Jan 5 22:24:39 2011 -0800
Fix sealed field children
Replaced iteration to destroy every menu children data
(which used menu->children->data) by the use of a
glist and gtk_container_get_children()
https://bugzilla.gnome.org/show_bug.cgi?id=627455
Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>
gnome-panel/menu.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gnome-panel/menu.c b/gnome-panel/menu.c
index f3c3c92..5b7f3a8 100644
--- a/gnome-panel/menu.c
+++ b/gnome-panel/menu.c
@@ -1589,9 +1589,13 @@ handle_gmenu_tree_changed (GMenuTree *tree,
GtkWidget *menu)
{
guint idle_id;
+ GList *list, *l;
- while (GTK_MENU_SHELL (menu)->GSEAL(children))
- gtk_widget_destroy (GTK_MENU_SHELL (menu)->GSEAL(children)->data);
+ /* Remove existing items */
+ list = gtk_container_get_children (GTK_CONTAINER (menu));
+ for (l = list; l; l = l->next)
+ gtk_widget_destroy (l->data);
+ g_list_free (list);
g_object_set_data_full (G_OBJECT (menu),
"panel-menu-tree-directory",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]