Commit c3506c2e authored by Tristan Van Berkom's avatar Tristan Van Berkom

Remember notebook page when reconstructing (Fixes bug 394382)


	* plugins/gtk+/glade-gtk.c: Remember notebook page when 
	  reconstructing (Fixes bug 394382)


svn path=/trunk/; revision=1378
parent b2589bb6
2006-06-20 Tristan Van Berkom <tvb@gnome.org>
* plugins/gtk+/glade-gtk.c: Remember notebook page when
reconstructing (Fixes bug 394382)
2006-06-20 Vincent Geddes <vincent.geddes@gmail.com>
* doc/gladeui-docs.sgml, doc/gladeui.types, doc/gladeui-sections.txt,
......
......@@ -390,6 +390,7 @@ handle_accel(GladeParseState *state, const xmlChar **attrs)
if (!state->accels)
state->accels = g_array_new(FALSE, FALSE,
sizeof(GladeAccelInfo));
g_array_append_val(state->accels, info);
}
......
......@@ -939,9 +939,11 @@ glade_property_read_accel_prop (GladeProperty *property,
g_value_init (gvalue, GLADE_TYPE_ACCEL_GLIST);
g_value_take_boxed (gvalue, accels);
if (property)
GLADE_PROPERTY_GET_KLASS
(property)->set_value (property, gvalue);
if (free_value)
{
......
......@@ -2124,6 +2124,7 @@ glade_gtk_frame_add_child (GladeWidgetAdaptor *adaptor,
typedef struct
{
gint pages;
gint page;
GList *children;
GList *tabs;
......@@ -2274,6 +2275,7 @@ glade_gtk_notebook_extract_children (GtkWidget *notebook)
nchildren = g_new0 (NotebookChildren, 1);
nchildren->pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook));
nchildren->page = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
/* Ref all the project widgets and build returned list first */
for (list = children; list; list = list->next)
......@@ -2357,6 +2359,9 @@ glade_gtk_notebook_insert_children (GtkWidget *notebook, NotebookChildren *nchil
g_object_unref (G_OBJECT (page));
g_object_unref (G_OBJECT (tab));
}
/* Stay on the same page */
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), nchildren->page);
/* Free the original lists now */
if (nchildren->children)
......
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