When debugging, knowing the file uri might be helpful. Generally it is
not helpful though, as it might faciliate users exposing private file
names in bug reports.
- stylise the whole indicator to be like a sidebar item
- adjust the spacing and padding and pixel-size in the UI file
(Ammended by António Fernandes <antoniof@gnome.org>)
The changes in commit c653f880 ("list-base: Don't inherit
from NautilusFilesView"), broke our gestures on the empty status page
which is still a child of files-view. Rather than attempt to fix this
through files view, as done in commit 95f3db44 ("files-view: Add
gestures to open background menu in empty view"), which fixed the click
gestures, but not the dnd gestures, let's make the more appropriate
change of making the empty status page a child of list-base.
Having the empty status page as a child of the list-base is more logical
because it represents the view, and ultimately our goal is to remove
all view components for files-view (despiste its name).
The empty page is still managed externally, to make it reusable accross
view mode changes. Being an overlay also allows its visibility to be
externally controlled.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3309
(Commit message originally by Corey Berla)
This reverts commit 95f3db44c8.
As suspected, this isn't enough. The DnD gestures also need to work
on the empty view. Revert this fix and in the next commit we'll move
the empty view to be a child (within a stack) of the list-base.
When navigating to an invalid location (i.e. through the location
entry, a bad bookmark, etc), the file add/changed handlers are no
longer present in the view until another location change (or reload)
happens. The existing call to nautilus_window_slot_set_viewed_file()
is not enough to fully reestablish the handlers which were removed from
the call to nautilus_window_slot_stop_loading() (which
ultimately calls disconnect_directory_handlers() in files-view).
There's an explicit comment introduced at [1] which makes it clear
that we want to remove these handlers early for performance and search
reasons. Otherwise we could have delayed removing the handlers which
would have allowed us to not call nautilus_window_slow_force_reload() at
all. But since this invalid location is just a corner case which
most likely won't happen, let's keep the typical case optimized.
Alternatively, we could create a new function in files-view to
only reconnect the handlers but that too seems to open up a can of
worms for little return.
This bug was introduced in [1]
[1] 9e1e14db2f