GNOME Bugzilla – Bug 764219
Using the TAB-key for navigation does not focus correctly
Last modified: 2016-12-24 11:24:54 UTC
When you go to settings -> Version Control you type your Author name and when you press TAB you should be in the text field of Email
Created attachment 342046 [details] [review] Preferences: navigate to next GtkEntry with single tab/arrow Earlier, on TAB/arrow the focus was shifted from GtkEntry to next GtkListBoxRow. This required one more tab/arrow key press to focus the required GtkEntry. Continued work on an implementation by Sébastien Lafargue (https://paste.fedoraproject.org/506997/). Implemented single tab_backward to navigate to previous GtkEntry. This was achieved with the help of 'focus' signal. If (GtkEntry is focused and direction=TAB_BACKWARD) then shift focus to GtkListBoxRow of that GtkEntry
Review of attachment 342046 [details] [review]: ::: libide/preferences/ide-preferences-group.c @@ +286,3 @@ + self->last_focused_tab_backward = (dir == GTK_DIR_TAB_BACKWARD); + + child = gtk_bin_get_child (GTK_BIN (row)); if we're not on a IdePreferencesEntry, we get: CRITICAL: ide_preferences_entry_get_entry_widget: assertion 'IDE_IS_PREFERENCES_ENTRY (self)' failed you need to check that before casting: if (IDE_IS_PREFERENCES_ENTRY (child)) { @@ +292,3 @@ + if (gtk_widget_is_focus (entry) && dir == GTK_DIR_TAB_BACKWARD) + gtk_widget_grab_focus (GTK_WIDGET (row)); + use && better than cascading the condition: if (a && b && c) { ... } @@ +356,3 @@ + G_CALLBACK (ide_preferences_group_row_grab_focus), + self, + G_CONNECT_AFTER | G_CONNECT_SWAPPED); params are misaligned
Created attachment 342401 [details] [review] Preferences: navigate to next GtkEntry with single tab/arrow Earlier, on TAB/arrow the focus was shifted from GtkEntry to next GtkListBoxRow. This required one more tab/arrow key press to focus the required GtkEntry. Continued work on an implementation by Sébastien Lafargue (https://paste.fedoraproject.org/506997/). Implemented single tab_backward to navigate to previous GtkEntry. This was achieved with the help of 'focus' signal. If (GtkEntry is focused and direction=TAB_BACKWARD) then shift focus to GtkListBoxRow of that GtkEntry
Attachment 342401 [details] pushed as ae543d5 - Preferences: navigate to next GtkEntry with single tab/arrow