diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-09-17 20:49:05 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-09-17 20:49:05 (GMT) |
commit | f32b173243cf46f8a9cf84b610139b3d4bd20803 (patch) | |
tree | a91c4bf2371a2ded8bd8605f979cb89664567b61 /src/gtkext | |
parent | 944fc0a5638bfe77fc65e514fbdd945d8a652635 (diff) |
Fixed a bug when splitting panels.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@263 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext')
-rw-r--r-- | src/gtkext/gtkdockstation.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c index ba17788..49f4fa1 100644 --- a/src/gtkext/gtkdockstation.c +++ b/src/gtkext/gtkdockstation.c @@ -222,8 +222,7 @@ void gtk_dock_panel_add_widget(GtkDockStation *station, GtkWidget *widget, const gtk_dock_panel_update_title(station, widget, caption); - if (gtk_notebook_get_n_pages(station->notebook) == 1) - g_signal_emit_by_name(station, "switch-widget", widget); + gtk_notebook_set_current_page(station->notebook, -1); } @@ -255,13 +254,13 @@ void gtk_dock_panel_change_active_widget(GtkDockStation *station, GtkWidget *wid old = gtk_notebook_get_nth_page(station->notebook, index); label = gtk_notebook_get_tab_label(station->notebook, old); - gtk_widget_ref(old); - gtk_widget_ref(label); + g_object_ref(G_OBJECT(old)); + g_object_ref(G_OBJECT(label)); gtk_notebook_remove_page(station->notebook, index); gtk_notebook_insert_page(station->notebook, widget, label, index); - gtk_widget_unref(label); + g_object_unref(G_OBJECT(label)); gtk_notebook_set_current_page(station->notebook, index); @@ -293,7 +292,8 @@ void gtk_dock_panel_remove_widget(GtkDockStation *station, GtkWidget *widget) gtk_notebook_remove_page(station->notebook, index); if (gtk_notebook_get_n_pages(station->notebook) == 0) - gtk_container_remove(gtk_widget_get_parent(GTK_WIDGET(station)), GTK_WIDGET(station)); + gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(GTK_WIDGET(station))), + GTK_WIDGET(station)); } |