Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Thu, 25 Feb 2016 23:05:22 UTC Commit: 61582a42f9a7acb86a2b2b79b17fb5fc80e86755 https://github.com/geany/geany/commit/61582a42f9a7acb86a2b2b79b17fb5fc80e867...
Log Message: ----------- Always select the first item for better keyboard manipulation
Even when the user Ctrl+clicks to perform goto tag definition, it should be possible to select the item from the list using keyboard (and have the first item automatically selected so ctrl+click plus enter afterwards always gets you somewhere).
Modified Paths: -------------- src/symbols.c
Modified: src/symbols.c 24 lines changed, 4 insertions(+), 20 deletions(-) =================================================================== @@ -1935,26 +1935,10 @@ static void show_goto_popup(GeanyDocument *doc, GPtrArray *tags, gboolean have_b
gtk_widget_show_all(menu);
- /* FIXME: this should get the real event directly instead of looking it up */ - event = gtk_get_current_event(); - if (event && event->type == GDK_BUTTON_PRESS) - { - GdkEventButton *event_button = (GdkEventButton *) event; - /* FIXME: should this also use the position func? as the cursor must be on the location - * under the cursor at this point anyway, it might give prettier alignment. - * But might as well be farther from the pointer or otherwise misaligned with the - * pointer, so maybe not. */ - gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time); - } - else - { - if (first) /* always select the first item for better keyboard navigation */ - g_signal_connect(menu, "realize", G_CALLBACK(gtk_menu_shell_select_item), first); - gtk_menu_popup(GTK_MENU(menu), NULL, NULL, goto_popup_position_func, doc->editor->sci, - 0, gtk_get_current_event_time ()); - } - if (event) - gdk_event_free(event); + if (first) /* always select the first item for better keyboard navigation */ + g_signal_connect(menu, "realize", G_CALLBACK(gtk_menu_shell_select_item), first); + gtk_menu_popup(GTK_MENU(menu), NULL, NULL, goto_popup_position_func, doc->editor->sci, + 0, gtk_get_current_event_time ()); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).