Commit 09b96eea authored by Tristan Van Berkom's avatar Tristan Van Berkom

Delete dangling submenus when moving children around in the menu editor


	* plugins/gtk+/glade-gtk.c: Delete dangling submenus when moving children
	  around in the menu editor (bug 560145).


svn path=/trunk/; revision=2026
parent 6732db24
......@@ -4,6 +4,9 @@
* plugins/gnome/glade-gnome.c: Fixed build breakage (bug 560668).
* plugins/gtk+/glade-gtk.c: Delete dangling submenus when moving children
around in the menu editor (bug 560145).
2008-11-12 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/glade-gtk.c: Fixed loading of images and only set image
......
......@@ -5815,12 +5815,22 @@ glade_gtk_menu_shell_move_child (GladeBaseEditor *editor,
gpointer data)
{
GObject *parent = glade_widget_get_object (gparent);
GladeWidget *old_parent = gchild->parent;
GList list = {0, };
if (GTK_IS_SEPARATOR_MENU_ITEM (parent)) return FALSE;
if (GTK_IS_MENU_ITEM (parent))
gparent = glade_gtk_menu_shell_item_get_parent (gparent, parent);
/* Delete dangling menus */
if (GTK_IS_MENU (old_parent->object) &&
old_parent->parent && GTK_IS_MENU_ITEM (old_parent->parent->object))
{
GList del = { 0, };
del.data = old_parent;
glade_command_delete (&del);
}
if (gparent != glade_widget_get_parent (gchild))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment