summaryrefslogtreecommitdiff
path: root/src/editor.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-01-16 01:29:18 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-01-16 01:29:18 (GMT)
commitd487ea54850c85ea22df22af3b21b57d9ad0fd2f (patch)
treee84eefa64d8845cb97ca98c95cc9acf713ccfcf8 /src/editor.c
parent725304423eccf57b8e829542670b5abe7b00eeb4 (diff)
Updated menus on view change.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@227 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/editor.c')
-rw-r--r--src/editor.c17
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);
}