summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-11-11 21:50:23 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-11-11 21:50:23 (GMT)
commitb36b57e81623194ba56d4862d2fba49d944a2793 (patch)
treebeda865a71237b4632cac77a70eaa09b12cd05e2 /src/gtkext
parent2e5d98e2367a90e5b258c30dc68e5981d1f63339 (diff)
Fixed a bug by saving the title of a panel when changing its active widget.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@282 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/gtkdockstation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c
index 69544f7..2a0d188 100644
--- a/src/gtkext/gtkdockstation.c
+++ b/src/gtkext/gtkdockstation.c
@@ -259,6 +259,7 @@ void gtk_dock_panel_change_active_widget(GtkDockStation *station, GtkWidget *wid
gint index; /* Indice de l'onglet actif */
GtkWidget *old; /* Ancien composant */
GtkWidget *label; /* Etiquette d'onglet */
+ char *str; /* Titre des prochaines fois */
index = gtk_notebook_get_current_page(station->notebook);
@@ -270,11 +271,13 @@ void gtk_dock_panel_change_active_widget(GtkDockStation *station, GtkWidget *wid
g_object_ref(G_OBJECT(old));
g_object_ref(G_OBJECT(label));
+ str = g_object_get_data(G_OBJECT(old), "title");
gtk_notebook_remove_page(station->notebook, index);
gtk_notebook_insert_page(station->notebook, widget, label, index);
g_object_unref(G_OBJECT(label));
+ g_object_set_data(G_OBJECT(widget), "title", str);
gtk_notebook_set_current_page(station->notebook, index);