diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-08-06 08:05:22 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-08-06 08:05:22 (GMT) |
commit | 529595311bd518a3e7368263b9c3244159c85e41 (patch) | |
tree | 19c2d421b99b6d0f06b3514c8fa6f6b68cacdd3c /src/gui | |
parent | dbf6ca9e108198f0ad79eaf377f5f229b14a4938 (diff) |
Closed the right side panel when requested.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/editor.c | 5 |
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")); |