The EventControllerFocus on the list item, updates the list base focus
tracker and scrolled to position any time the list item enters focus.
This works when interacting within a single window, but has unexpected
results when changing focus between multiple windows.
Instead of using the focus controller workaround, just make
gtk_list_base_update_focus_tracker the set_focus_child vfunc
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5433
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5432
Try to get a native file:// URI instead of any other GVFS
scheme, for interoperability with apps only handling file:// URIs.
This is what GTK3 Nautilus and Thunar do, so apps should be tuned
for this behavior.
See also https://bugzilla.xfce.org/show_bug.cgi?id=13845Fixes: #5422
The path bar does a lot of manual management of buttons, mostly to
be able to show navigation arrows when there's not enough space to
show the full path.
Since the GTK4 migration, this is slightly broken in some cases, due
to the 'need_sliders' variable being always set to TRUE. Furthermore,
after the introduction of the Recent button as a special cased fake
root, the allocation of the buttons is generating warnings.
Reimplement the path bar as a GtkBox, inside a GtkScrolledWindow.
This mimics what Nautilus does, and allows us to make navigation more
predictable, and remove most of the complexity from GtkPathBar. It
also prevents it from generating allocation warnings.
The path bar itself now doesn't override GtkWidget.measure nor
GtkWidget.allocate; instead, it delegates layout to the GtkBinLayout
layout manager.
CSS is adjusted to account for the changed hierarchy of buttons.
It's positioned and looks exactly like the browse_toggle_view_button,
but due to the way things are organized, we cannot simply reuse that
button.
Add a clone of browse_toggle_view_button in the search entry page of
the toolbar stack. Make it toggle the same action as of the original
button, and bind the icon name and tooltip texts to it too.
Most of the pointer comparisons against 'browse_files_column_view'
should actually be performed against the current view widget. As
it turns out, it weren't that many places after all.
Add a grid view outside of the widgetry tree. The grid view mimics
the column view using bindings, so we only need to manage the column
view.
Also add a button in the path bar section to toggle the view. This
is handled as a new 'toggle-view' action in the file chooser.
The way switching between views currently work is by setting either
the column or grid view as the child of the GtkScrolledWindow. This
has the benefit of unmapping the unused view, which is nice and can
avoid some tricky situations with thumbnails.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/233
Notifications are not going to be emitted during the finalization, and
GObject will warn if you try to acquire and release a reference to the
notification queue when the reference count of an object has reached
zero.
Fixes: #5420
Recommend that scope implementations should fall
back to or derive from GtkBuilderCScope in order
to not lose GTK's type-guessing machinery.
Related: #5398