summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-09-17 20:49:05 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-09-17 20:49:05 (GMT)
commitf32b173243cf46f8a9cf84b610139b3d4bd20803 (patch)
treea91c4bf2371a2ded8bd8605f979cb89664567b61 /src
parent944fc0a5638bfe77fc65e514fbdd945d8a652635 (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')
-rw-r--r--src/gtkext/gtkdockstation.c12
-rw-r--r--src/gui/panels/panel.c2
2 files changed, 8 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));
}
diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c
index dc6a89f..b101f4b 100644
--- a/src/gui/panels/panel.c
+++ b/src/gui/panels/panel.c
@@ -467,6 +467,8 @@ static void attach_panel_node_to_paned(panel_node *parent, panel_node *node, boo
else
parent->second = node;
+ node->parent = parent;
+
/* Raccordement graphique */
widget = GET_PANEL_NODE_WIDGET(node);