diff options
Diffstat (limited to 'src/editor.c')
-rw-r--r-- | src/editor.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/editor.c b/src/editor.c index 284b16c..936b9a1 100644 --- a/src/editor.c +++ b/src/editor.c @@ -143,7 +143,7 @@ void update_debug_menu_items(GObject *, gboolean); /* Réagit au changement d'onglet d'un panneau quelconque. */ -static void on_dock_item_switch(GtkDockPanel *, GDockItem *, GObject *); +static void on_dock_item_switch(GtkDockPanel *, GtkWidget *, GObject *); /* Met en concordance les menus avec l'édition courante. */ static void refresh_editor_menus(GObject *, GOpenidaBinary *, GtkBinView *); @@ -263,6 +263,8 @@ GtkWidget *create_editor(void) /* Intégration des menus */ editem = g_menu_bar_new(ref, accgroup); + register_editor_item(editem); + menuboard = g_editor_item_get_widget(editem); gtk_box_pack_start(GTK_BOX(vbox1), menuboard, FALSE, FALSE, 0); @@ -463,7 +465,7 @@ GtkWidget *create_editor(void) { GtkWidget *support; - support = init_panels2(); + support = init_panels2(G_CALLBACK(on_dock_item_switch), ref); gtk_box_pack_start(GTK_BOX(vbox1), support, TRUE, TRUE, 0); load_main_panels(); @@ -1416,14 +1418,11 @@ void update_debug_menu_items(GObject *ref, gboolean stopped) * * ******************************************************************************/ -static void on_dock_item_switch(GtkDockPanel *panel, GDockItem *item, GObject *ref) +static void on_dock_item_switch(GtkDockPanel *panel, GtkWidget *widget, GObject *ref) { - GtkWidget *widget; /* Support réel à traiter */ GOpenidaBinary *old_binary; /* Ancien binaire édité */ GOpenidaBinary *binary; /* Binaire en cours d'édition */ - widget = g_dock_item_get_panel(item); - if (GTK_IS_SCROLLED_WINDOW(widget)) widget = gtk_bin_get_child(GTK_BIN(widget)); @@ -1439,15 +1438,15 @@ static void on_dock_item_switch(GtkDockPanel *panel, GDockItem *item, GObject *r if (old_binary != binary) { - notify_panels_of_binary_change(binary); + //notify_panels_of_binary_change(binary); change_editor_items_current_binary(ref, binary); } change_editor_items_current_view(ref, GTK_VIEW_PANEL(widget)); - refresh_editor_menus(ref, binary, GTK_BIN_VIEW(widget)); + //refresh_editor_menus(ref, binary, GTK_BIN_VIEW(widget)); - notify_panels_of_view_change(GTK_VIEW_PANEL(widget), false); + //notify_panels_of_view_change(GTK_VIEW_PANEL(widget), false); } |