diff -uprN glade3-3.7.1.orig/plugins/gtk+/glade-gtk.c glade3-3.7.1/plugins/gtk+/glade-gtk.c
--- glade3-3.7.1.orig/plugins/gtk+/glade-gtk.c	2010-06-24 19:43:19 +0200
+++ glade3-3.7.1/plugins/gtk+/glade-gtk.c	2010-07-13 12:57:42 +0200
@@ -3348,9 +3348,12 @@ glade_gtk_frame_post_create (GladeWidget
 		gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (galignment->object));
 		gtk_widget_show (GTK_WIDGET (galignment->object));
 	}
-
-	/* Chain Up */
-	GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor, frame, reason);
+	else
+		/* XXX: Try not to create two instances of the same label in the project.
+		 *      This seems to work, but only for the first GtkFrame added to the
+		 *      the project. */
+		/* Chain Up */
+		GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor, frame, reason);
 }
 
 void
@@ -3823,6 +3826,8 @@ glade_gtk_notebook_post_create (GladeWid
 {
 	GladeWidget *gwidget = glade_widget_get_from_gobject (notebook);
 
+	if (reason != GLADE_CREATE_USER) return;
+	
 	gtk_notebook_popup_disable (GTK_NOTEBOOK (notebook));
 
 	g_signal_connect (G_OBJECT (gwidget), "notify::project",
@@ -3870,7 +3875,7 @@ glade_gtk_notebook_set_n_pages (GObject
 	notebook = GTK_NOTEBOOK (object);
 	g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
 
-	widget = glade_widget_get_from_gobject (GTK_WIDGET (notebook));
+	widget = glade_widget_get_from_gobject (object);
 	g_return_if_fail (widget != NULL);
 
 	new_size = g_value_get_int (value);
@@ -3887,10 +3892,13 @@ glade_gtk_notebook_set_n_pages (GObject
 			GtkWidget *placeholder = glade_placeholder_new ();
 			gchar *str;
 
+			gtk_notebook_insert_page (notebook, placeholder,
+						  NULL, position);
+
 			GladeWidget *glabel =
 				glade_widget_adaptor_create_widget
 				(wadaptor, FALSE,
-				 "parent", widget, 
+				 "parent", NULL, 
 				 "project", glade_widget_get_project (widget), 
 				 NULL);
 			str = g_strdup_printf ("page %d", i + 1);
@@ -3898,16 +3906,13 @@ glade_gtk_notebook_set_n_pages (GObject
 			g_free (str);
 			
 			g_object_set_data (glabel->object, "special-child-type", "tab");
-			gtk_widget_show (GTK_WIDGET (glabel->object));
 			
-			gtk_notebook_insert_page (notebook, placeholder,
-						  NULL, position);
-
-			/* Must tell the project that were adding a widget (so that
-			 * saving works properly & it appears in the inspector properly)
-			 */
-			glade_project_add_object (glade_widget_get_project (widget), NULL, glabel->object);
+			// XXX: Done below when add_child is called
+			//gtk_notebook_set_tab_label (notebook, gtk_notebook_get_nth_page (notebook, i),
+			//				GTK_WIDGET (glabel->object));
 
+			gtk_widget_show (GTK_WIDGET (glabel->object));
+			
 			/* Must pass through GladeWidget api so that packing props
 			 * are correctly assigned.
 			 */
@@ -3936,16 +3941,20 @@ glade_gtk_notebook_set_n_pages (GObject
 		if (glade_widget_get_from_gobject (child_widget))
 			g_critical ("Bug in notebook_set_n_pages()");
 		
-		gtk_notebook_remove_page (notebook, old_size-1);
-
 		/* Cleanup possible tab widgets
 		 */
 		if ((gtab = glade_widget_get_from_gobject (tab_widget)) != NULL)
 		{
-			glade_project_remove_object (glade_widget_get_project (gtab), gtab->object);
+			GList *widgets = g_list_prepend (NULL, gtab);
+			
+			glade_command_delete (widgets);
 			g_object_unref (gtab);
+			
+			g_list_free (widgets);
 		}
 
+		gtk_notebook_remove_page (notebook, old_size-1);
+
 		old_size--;
 	}
 }
