summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkdockstation.c12
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));
}