filechooserwidget: Implement 'keynav-failed' for grid view

It's exactly the same as of the column view. Since we're sharing
the callback now, rename it to browse_files_view_keynav_failed_cb.
This commit is contained in:
Georges Basile Stavracas Neto 2022-10-22 12:42:09 -03:00
parent 0bb6377a3a
commit 1c5caf53b6
2 changed files with 6 additions and 5 deletions

View File

@ -6135,9 +6135,9 @@ list_items_changed (GListModel *model,
}
static gboolean
browse_files_column_view_keynav_failed_cb (GtkWidget *widget,
GtkDirectionType direction,
gpointer user_data)
browse_files_view_keynav_failed_cb (GtkWidget *widget,
GtkDirectionType direction,
gpointer user_data)
{
GtkFileChooserWidget *impl = user_data;
@ -6817,7 +6817,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, box);
/* And a *lot* of callbacks to bind ... */
gtk_widget_class_bind_template_callback (widget_class, browse_files_column_view_keynav_failed_cb);
gtk_widget_class_bind_template_callback (widget_class, browse_files_view_keynav_failed_cb);
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb);

View File

@ -152,7 +152,7 @@
<class name="complex"/>
</style>
<signal name="activate" handler="column_view_row_activated_cb" swapped="no"/>
<signal name="keynav-failed" handler="browse_files_column_view_keynav_failed_cb"/>
<signal name="keynav-failed" handler="browse_files_view_keynav_failed_cb"/>
<child>
<object class="GtkColumnViewColumn" id="column_view_name_column">
<property name="title" translatable="yes">Name</property>
@ -670,6 +670,7 @@
</object>
<object class="GtkGridView" id="browse_files_grid_view">
<signal name="activate" handler="column_view_row_activated_cb" swapped="no"/>
<signal name="keynav-failed" handler="browse_files_view_keynav_failed_cb"/>
<binding name="enable-rubberband">
<lookup name="enable-rubberband">browse_files_column_view</lookup>
</binding>