We were always showing the starred item in the sidebar, with an empty
state in the resulting view if no starred file was present.
This is usually what we want for regular items. However, in 3.28 the
feature is not working as good as we expected for those not using
the tracker directories as heavily as other users.
In order to prevent being too annoying, we can hide the sidebar item if
no starred files are present, while still providing the context menu
to be able to use the feature.
This can be reverted once we are able to star any file, once tracker has
the required API to star a file and have a sync callback for its result.
Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/338
is_selected is a binary filed of NautilusCanvasIcon (thus its value is
modulo 2), while select is a gboolean, which is a typedef for gint.
We never pass integers to the icon_set_selected call as arguments, so
it's safe to remove these two g_asserts.
Currently, the code connects to GtkIconTheme::changed in class_init(),
which requires an active display in any test that tests the NautilusFile
API. Connecting to the signal during application startup instead makes
more sense.
nautilus_files_view_handle_scroll_event() is being called only once by nautilus_files_view_scroll_event() in the whole nautilus code base.
So remove it's declaration from it's header file, and move it's code to nautilus_files_view_scroll_event() directly.
Note - nautilus_files_view_handle_scroll_event() used to be used by compact view, which was removed in commit 241e462024
We no longer have a desktop view with manually sorted items, so there
is no need to guard it against the case of both XDG_DESKTOP_DIR and
XDG_DOWNLOAD_DIR being set to the same directory.
None of this is currently used.
Also, since the desktop_is_home_dir setting was removed in
commit 5ab3050f22, the desktop dir is
always XDG_DESKTOP_DIR. Thanks to that, we can simply use this instead:
nautilus_file_is_user_special_directory (file,
G_USER_DIRECTORY_DESKTOP)
Therefore, remove the obsolete API.
We disable trashing/deleting the Desktop directory. But we allow
trashing/deleting other XDG user dirs (Documents, Music,...).
If a person doesn't want to use an "icons on desktop" implementation,
this person may want to remove this folder from their Home directory.
To allow it, don't disable trashing/deleting the Desktop directory.
When using right-to-left (RTL) UI, files that start with neutral or weak
directional characters (like punctuation and numbers) while the rest of
file name is strong left-to-right (LTR) characters (like Latin
characters), the Pango layout base direction should be LTR for proper
display of such file names, and Pango can automatically detect that, but
canvas item disables automatic detection of base direction and forcing
the use of UI direction which leads to broken display if the UI locale
is RTL. The reverse can also happen for RTL file names in LTR UI.
The pango_layout_set_auto_dir (layout, FALSE) was introduced in commit
ade1f99c97 to fix “text drawing in RTL mode in text beside icons”, but
text besides icons is long gone AFAICT.
Selecting rows using CTRL/SHIFT with left click is different
to right click as GtkTreeView's default code does not support
SHIFT+CTRL selection.
We want consistency between the two behaviours.
We fixed this by replicating the left click behaviour in the
right click case. The GTK dependency is also bumped in order
to use GtkTreePath autocleanup.
Right now, right clicking an expander opens the context menu
without changing the selection.
This resulted in the context menu affecting other items than the
clicked one, which is counterintuitive and should not happen.
We fix this by isolating the case where an expander was clicked
and we change the selection to the clicked row.
Closes https://gitlab.gnone.org/GNOME/nautilus/issues/286
The problem is that upon entering "x-nautilus-search" in cli a crash is observed.
The solution is to explicitly check for "x-nautilus-search" in cli and error out before even opening the uri.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/237
f42979f0b0 changed the ellipsis to a
unicode one, which is one character in length, in turn changing the
expected output.
For cases where the truncation length is zero, the expected output is
changed to NULL, as 536505728e added an
assertion.