From 529595311bd518a3e7368263b9c3244159c85e41 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sat, 6 Aug 2016 10:05:22 +0200 Subject: Closed the right side panel when requested. --- ChangeLog | 5 +++++ src/gui/editor.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index de2ce21..de5469c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 16-08-06 Cyrille Bagard + * src/gui/editor.c: + Close the right side panel when requested. + +16-08-06 Cyrille Bagard + * src/gtkext/gtkstatusstack.c: Define initial content and size for the status bar. Fix compilation warnings. 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")); -- cgit v0.11.2-87-g4458