diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-01-31 22:50:42 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-01-31 22:50:42 (GMT) |
commit | f6eb49749d627de7d556139a392f73f0ca2862e8 (patch) | |
tree | df84f4c54f9f4f59e9b392b66d4d3ee1ce8633c0 /src/gui/menus/menubar.c | |
parent | 7ba93e4d9e3e722d8771d665c5217510105375d2 (diff) |
Provided the current active object in display panels.
Diffstat (limited to 'src/gui/menus/menubar.c')
-rw-r--r-- | src/gui/menus/menubar.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/gui/menus/menubar.c b/src/gui/menus/menubar.c index 32a8f20..989d964 100644 --- a/src/gui/menus/menubar.c +++ b/src/gui/menus/menubar.c @@ -308,21 +308,13 @@ static void update_menu_bar_for_view(GMenuBar *bar, GtkDisplayPanel *panel) static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkDisplayPanel *panel) { - GBufferLine *line; /* Ligne de position courante */ - const mrange_t *range; /* Couverture en mémoire */ const vmpa2t *addr; /* Position courante */ GEditorItem *item; /* Autre version de l'élément */ - if (panel != NULL && gtk_display_panel_get_position(panel, &line, NULL)) - { - range = g_buffer_line_get_range(line); - addr = get_mrange_addr(range); - } + if (panel != NULL) + addr = gtk_display_panel_get_caret_location(panel); else - { - line = NULL; addr = NULL; - } item = G_EDITOR_ITEM(bar); @@ -332,9 +324,6 @@ static void notify_focus_change_for_menu_bar(GMenuBar *bar, GtkDisplayPanel *pan update_access_in_menu_binary(item->ref, panel); - if (line != NULL) - g_object_unref(G_OBJECT(line)); - } |