glade3 r2026 - in trunk: . plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2026 - in trunk: . plugins/gtk+
- Date: Thu, 13 Nov 2008 19:36:26 +0000 (UTC)
Author: tvb
Date: Thu Nov 13 19:36:26 2008
New Revision: 2026
URL: http://svn.gnome.org/viewvc/glade3?rev=2026&view=rev
Log:
* plugins/gtk+/glade-gtk.c: Delete dangling submenus when moving children
around in the menu editor (bug 560145).
Modified:
trunk/ChangeLog
trunk/plugins/gtk+/glade-gtk.c
Modified: trunk/plugins/gtk+/glade-gtk.c
==============================================================================
--- trunk/plugins/gtk+/glade-gtk.c (original)
+++ trunk/plugins/gtk+/glade-gtk.c Thu Nov 13 19:36:26 2008
@@ -5815,12 +5815,22 @@
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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]