If we manually enter an unaccessible path in the entry, e.g
"/root/foo.txt", we should receive an error saying that the
folder is not accessible instead of showing the replace
confirmation dialog.
https://bugzilla.gnome.org/show_bug.cgi?id=753969
We only load thumbnails when we find that the row is in the visible
range of the treeview. It seems that animated scrolling makes it so
that the bottommost row stays out of the visible range until it is
too late. To work around this, extend the range by one row in each
direction.
http://bugzilla.gnome.org/show_bug.cgi?id=753142
Interpret a unmodified primary click on the selection like a double
click. This makes it possible to activate a file or open a folder
without using double-click.
Make GtkSearchHit carry a GFile instead of an uri. Most of the
search engines already have the object around, and converting
to an uri and back is unnecessary extra work.
It is a bit pointless to have the file chooser get a uri from an
existing GFile to put in the query, only to have some of the search
engines reconstruct a GFile from it.
When using the location popup to complete to a directory name
(with a trailing /), we should not punish the user by making the
Open button insensitive and preventing the Enter key from doing
the expected thing (switching to that directory).
https://bugzilla.gnome.org/show_bug.cgi?id=752708
The save_widgets_create function was not safe against
being called multiple times in save mode, calling
gtk_file_chooser_set_create_folders was a way to trigger
this crash.
We generally have const getters for strings, and the two users
of this API were promptly leaking the (unexpected) copy they
got from gtk_query_get_location and gtk_query_get_text.
I forgot to clean up the long press gesture, and in additon, creating
the rename popover from the ui template was causing the tree view
to not be disposed when the file chooser goes away. Work around this
by manually unsetting the relative-to widget of the popover in dispose.
With the name entry being in the header bar now, we no longer
get bindings working by just letting the key event bubble up,
we have to explicitly apply them on key events that the save
entry is not handling.
Previous patch modified places sidebar widget to stop handling
fixed devices by adding an "Other Locations..." item. Up to now,
however, these changes are isolated from each other since the
bundled file manager widgets ignore the sidebar requests for
external management of fixed devices and networks.
To fix that, make the file chooser widget be aware of the
GtkPlacesSidebar::show-other-locations signal and, when requested,
show places view to manage the fixed devices and networks.
https://bugzilla.gnome.org/show_bug.cgi?id=752034
With the previous approach, we could only show the spinner
before we had any results. With the new approach, we can just
leave the timeout in place and always show the spinner until
the search is done.
We were showing things like "Searching in (null)" if the current
folder is not in the sidebar. Avoid that by falling back to using
current_folder.
Pointed out by Carlos Soriano.
Even if we only ever hit the code with a singleton selection,
calling gtk_tree_selection_get_selected is not ok if the tree
selection mode allows multi-selection. Replace all calls to
gtk_tree_selection_get_selected in the file chooser code with
callback loops iterating over the selection. This problem
was introduced with the recently added rename and delete
menuitems.
Whenever we change directories, we unset the model, and then
we set a new model. This causes several emissions of
GtkTreeSelection::changed, for each of which we do a bunch
of work to update the path bar, the location entry, etc.
We can savely ignore some of these signals, and do less work.
There is no need to animate things when we are just setting up
the startup mode, so disable transitions in the revealer and
the stack. Pointed out by Carlos Soriano
The warning is not intended to disable the Create button and must only be shown
when the folder is not found, so this is implemented in the folder name exists
callback.
A "name" entry was added to FileExistsData to pass the filename to the callback
https://bugzilla.gnome.org/show_bug.cgi?id=751800