Commit 61782c35 authored by Tristan Van Berkom's avatar Tristan Van Berkom

Make undoing increasing notebook size work properly (needed to destroy the


	* plugins/gtk+/glade-gtk.c: Make undoing increasing notebook size work properly
	  (needed to destroy the added tab label project widget and remove it from the
	  project).



svn path=/trunk/; revision=1514
parent 046723ba
2006-06-25 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/glade-gtk.c: Make undoing increasing notebook size work properly
(needed to destroy the added tab label project widget and remove it from the
project).
2006-06-24 Tristan Van Berkom <tvb@gnome.org>
* src/glade-window.c: Set custom label on the property editor sensitive/insensitive
......
......@@ -194,14 +194,6 @@ This is where all of that really usefull miscalanious stuff lands up.
@Returns:
<!-- ##### FUNCTION glade_util_queue_draw_nodes ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION glade_util_container_get_all_children ##### -->
<para>
......
......@@ -125,6 +125,13 @@ GladeProjectView
@widget:
@Returns:
<!-- ##### FUNCTION glade_util_queue_draw_nodes ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION glade_util_widget_pastable ##### -->
<para>
......
......@@ -2726,18 +2726,28 @@ glade_gtk_notebook_set_n_pages (GObject *object, const GValue *value)
*/
while (old_size > new_size) {
/* Get the last widget. */
GladeWidget *gtab;
child_widget = gtk_notebook_get_nth_page (notebook, old_size-1);
tab_widget = gtk_notebook_get_tab_label (notebook, child_widget);
/*
* If we got it, and its not a placeholder, remove it
* from project.
/* Ok there shouldnt be widget in the content area, that's
* the placeholder, we should clean up the project widget that
* we put in the tab here though (this happens in the case where
* we undo increasing the "pages" property).
*/
if (glade_widget_get_from_gobject (child_widget) ||
glade_widget_get_from_gobject (tab_widget))
break;
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);
g_object_unref (gtab);
}
old_size--;
}
}
......
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