From e0dac33fc96a338e13547af3edfc5d4e914b67a2 Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Fri, 28 Jul 2017 17:33:20 +0200 Subject: Fixed another bug by removing another nested function. --- ChangeLog | 5 +++++ src/gui/editor.c | 47 ++++++++++++++++++++++++++++++++--------------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05b4dea..8917a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 17-07-28 Cyrille Bagard + * src/gui/editor.c: + Fix another bug by removing another nested function. + +17-07-28 Cyrille Bagard + * src/gui/menus/project.c: * src/gui/menus/view.c: Fix compilation warnings. diff --git a/src/gui/editor.c b/src/gui/editor.c index 5e8717a..5bab5d3 100644 --- a/src/gui/editor.c +++ b/src/gui/editor.c @@ -193,6 +193,9 @@ void on_panel_item_undock_request(GPanelItem *, void *); /* Réagit au changement d'onglet d'un panneau quelconque. */ static void on_dock_item_switch(GtkDockStation *, GtkWidget *, GObject *); +/* Encastre comme demandé un panneau dans l'éditeur. */ +static void dock_panel_into_current_station(GtkCheckMenuItem *, GPanelItem *); + /* Réagit à une demande de menu pour rajouter des panneaux. */ static void on_dock_menu_request(GtkDockStation *, GtkWidget *, GObject *); @@ -1390,6 +1393,35 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, GObj /****************************************************************************** * * +* Paramètres : menuitem = élement de menu actionné. * +* item = panneau à ajouter à l'interface graphique. * +* * +* Description : Encastre comme demandé un panneau dans l'éditeur. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void dock_panel_into_current_station(GtkCheckMenuItem *menuitem, GPanelItem *item) +{ + GtkWidget *parent; /* Menu parent avec chemin */ + const char *new_path; /* Nouveau chemin à appliquer */ + + parent = gtk_widget_get_parent(GTK_WIDGET(menuitem)); + + new_path = g_object_get_data(G_OBJECT(parent), "path"); + + gtk_panel_item_set_path(item, new_path); + + g_panel_item_dock(item); + +} + + +/****************************************************************************** +* * * Paramètres : station = panneau de support des éléments concerné. * * button = bouton à l'origine de la procédure. * * ref = adresse de l'espace de référencement global. * @@ -1420,21 +1452,6 @@ static void on_dock_menu_request(GtkDockStation *station, GtkWidget *button, GOb /* Ajout des panneaux uniques */ - void dock_panel_into_current_station(GtkCheckMenuItem *menuitem, GPanelItem *item) - { - GtkWidget *parent; /* Menu parent avec chemin */ - const char *new_path; /* Nouveau chemin à appliquer */ - - parent = gtk_widget_get_parent(GTK_WIDGET(menuitem)); - - new_path = g_object_get_data(G_OBJECT(parent), "path"); - - gtk_panel_item_set_path(item, new_path); - - g_panel_item_dock(item); - - } - bool add_side_panel_to_menu(GPanelItem *panel, GtkContainer *support) { const char *name; /* Désignation de l'entrée */ -- cgit v0.11.2-87-g4458