diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-01-17 13:45:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-01-17 19:06:08 (GMT) |
commit | d13bccd74759cd1c63a2036c279f04d9f052ecf3 (patch) | |
tree | adbd0b9d915748a2b46070282c07b3f16033d89e /src/gui/menus/menubar.c | |
parent | 52ac5b1b340335f56ceb599dba63164a26f10b10 (diff) |
Updated access to the Edition menu based on the current selection.
Diffstat (limited to 'src/gui/menus/menubar.c')
-rw-r--r-- | src/gui/menus/menubar.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/menus/menubar.c b/src/gui/menus/menubar.c index 1fc1b6f..cbb6ae2 100644 --- a/src/gui/menus/menubar.c +++ b/src/gui/menus/menubar.c @@ -80,6 +80,9 @@ static void manage_view_in_menu_bar(GMenuBar *, GtkViewPanel *, bool); /* Lance une actualisation du fait d'un changement de vue. */ static void update_menu_bar_for_view(GMenuBar *, GtkViewPanel *); +/* Met à jour les accès aux menus en fonction de la position. */ +static void track_caret_address_for_menu_bar(GMenuBar *, GtkBufferView *, const vmpa2t *); + /* Lance une actualisation relative à l'étendue du projet. */ static void update_menu_bar_for_project(GMenuBar *, GStudyProject *); @@ -115,6 +118,7 @@ static void g_menu_bar_class_init(GMenuBarClass *klass) editem->manage_view = (manage_item_view_fc)manage_view_in_menu_bar; editem->update_view = (update_item_view_fc)update_menu_bar_for_view; + editem->track_caret = (track_caret_in_view_fc)track_caret_address_for_menu_bar; editem->update_project = (update_project_fc)update_menu_bar_for_project; } @@ -345,6 +349,31 @@ static void update_menu_bar_for_view(GMenuBar *bar, GtkViewPanel *view) /****************************************************************************** * * +* Paramètres : bar = barre de menus à actualiser. * +* addr = nouvelle adresse du curseur courant. * +* info = barre de statut présentant les informations. * +* * +* Description : Met à jour les accès aux menus en fonction de la position. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void track_caret_address_for_menu_bar(GMenuBar *bar, GtkBufferView *view, const vmpa2t *addr) +{ + GEditorItem *item; /* Autre version de l'élément */ + + item = G_EDITOR_ITEM(bar); + + update_access_in_menu_edition(item->ref, view, addr); + +} + + +/****************************************************************************** +* * * Paramètres : bar = barre de menus à actualiser. * * project = projet visé par la procédure. * * * |