file chooser: Improve keynav

Some internal containers were erroneously taking focus, interrupting
the flow of tab keynav, and using arrow keynav to go from the file
list to the sidebar did not work anymore, after the recent sidebar
rewrite.
This commit is contained in:
Matthias Clasen 2015-06-27 12:23:48 -04:00
parent 710d193f91
commit 1883c5fb28
2 changed files with 3 additions and 9 deletions

View File

@ -1227,8 +1227,8 @@ browse_files_key_press_event_cb (GtkWidget *widget,
if (key_is_left_or_right (event))
{
gtk_widget_grab_focus (priv->places_sidebar);
return TRUE;
if (gtk_widget_child_focus (priv->places_sidebar, GTK_DIR_LEFT))
return TRUE;
}
if ((event->keyval == GDK_KEY_Return

View File

@ -11,11 +11,10 @@
<child>
<object class="GtkPaned" id="browse_widgets_hpaned">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkPlacesSidebar" id="places_sidebar">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<property name="hscrollbar_policy">never</property>
<property name="local_only">True</property>
<property name="show_enter_location">True</property>
@ -50,7 +49,6 @@
<child>
<object class="GtkStack" id="browse_header_stack">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="transition-type">crossfade</property>
<child>
<object class="GtkBox">
@ -60,7 +58,6 @@
<child>
<object class="GtkPathBar" id="browse_path_bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="path-clicked" handler="path_bar_clicked" after="yes" swapped="no"/>
</object>
<packing>
@ -70,7 +67,6 @@
<child>
<object class="GtkMenuButton" id="browse_new_folder_button">
<property name="tooltip-text" translatable="yes">Create Folder</property>
<property name="can_focus">True</property>
<property name="use_underline">True</property>
<property name="popover">new_folder_popover</property>
<signal name="notify::active" handler="new_folder_popover_active"/>
@ -148,12 +144,10 @@
<child>
<object class="GtkScrolledWindow" id="browse_files_swin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkTreeView" id="browse_files_tree_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_tooltip">True</property>
<property name="enable-search">False</property>
<child internal-child="accessible">