summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/editor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 22c6df9..926201a 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -1281,10 +1281,13 @@ static void on_dock_menu_request(GtkDockStation *station, GtkWidget *button, GOb
static void on_dock_close_request(GtkDockStation *station, GtkWidget *button, GObject *ref)
{
+ gint index; /* Indice de la page courante */
GtkWidget *active; /* Composant actif modèle */
GPanelItem *panel; /* Panneau encapsulé */
- active = gtk_notebook_get_nth_page(GTK_NOTEBOOK(station), 0);
+ index = gtk_notebook_get_current_page(GTK_NOTEBOOK(station));
+
+ active = gtk_notebook_get_nth_page(GTK_NOTEBOOK(station), index);
panel = G_PANEL_ITEM(g_object_get_data(G_OBJECT(active), "dockable"));