glade3 r2002 - in trunk: . gladeui
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2002 - in trunk: . gladeui
- Date: Sun, 26 Oct 2008 03:50:47 +0000 (UTC)
Author: tvb
Date: Sun Oct 26 03:50:47 2008
New Revision: 2002
URL: http://svn.gnome.org/viewvc/glade3?rev=2002&view=rev
Log:
* gladeui/glade-command.c: Fixed a crasher in project conversions.
Modified:
trunk/ChangeLog
trunk/gladeui/glade-command.c
Modified: trunk/gladeui/glade-command.c
==============================================================================
--- trunk/gladeui/glade-command.c (original)
+++ trunk/gladeui/glade-command.c Sun Oct 26 03:50:47 2008
@@ -994,8 +994,6 @@
cdata->parent = glade_placeholder_get_parent (placeholder);
else if (GTK_IS_WINDOW (widget->object) == FALSE)
cdata->parent = parent;
- if (cdata->parent == NULL && GTK_IS_WINDOW (widget->object) == FALSE)
- g_message ("Parentless non GtkWindow widget in Add");
/* Placeholder */
if (placeholder != NULL && g_list_length (widgets) == 1)
@@ -2261,7 +2259,7 @@
static gint
-find_format_only_object (GObject *object, gpointer fmtptr)
+find_format_rejected_object (GObject *object, gpointer fmtptr)
{
GladeWidget *widget = glade_widget_get_from_gobject (object);
GladeProjectFormat fmt = GPOINTER_TO_INT (fmtptr);
@@ -2275,7 +2273,7 @@
/* ... and widget is a non GtkWidget object */
!GTK_IS_WIDGET (widget->object) ||
/* ... and its a non-window toplevel */
- (!widget->parent && !GTK_IS_WINDOW (widget->object)))))
+ (!widget->parent && !GTK_IS_WINDOW (widget->object) && !widget->internal))))
return 0;
return -1;
@@ -2291,12 +2289,12 @@
GList *l;
/* List safely delete widgets */
- while ((l =
- g_list_find_custom ((GList *)glade_project_get_objects (project), GINT_TO_POINTER (fmt),
- (GCompareFunc)find_project_only_object)) != NULL)
+ while ((l = g_list_find_custom ((GList *)glade_project_get_objects (project), GINT_TO_POINTER (fmt),
+ (GCompareFunc)find_format_rejected_object)) != NULL)
{
GList delete = { 0, };
- delete.data = l->data;
+ widget = glade_widget_get_from_gobject (l->data);
+ delete.data = widget;
glade_command_delete (&delete);
}
@@ -2308,7 +2306,6 @@
glade_command_convert_cleanup_props (widget->properties, fmt);
glade_command_convert_cleanup_props (widget->packing_properties, fmt);
}
- g_list_free (objects);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]