Meson builds out-of-tree, these ignored files will never get created in
these directories. If they do, it indicates a build configuration error
and should not be hidden.
In some parts of the code, operations_button was considered as a member
of the child class of class GtkToggleButton. Which is incorrect in gtk4.
Using visibility of popover gives the intended functionality.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2313
We have multiple empty state .ui files, which make little sense now
that they are so simple, thanks to AdwStatusPage.
So, instead, add a single UI file for the whole view.
The places view had placeholders in a popover and for search. These
are both use cases where we can and should use AdwStatusPage, now that
we no longer keep this code in sync with GTK.
libadwaita provides a widget for status/empty pages. Instead
of rolling our own lookalike, we can now use the original
since we have a GtkStack instead of a GtkOverlay managing
views.
The port to GTK4 allows us to rework how we structure the view
to use a more modern view management widget: GtkStack. Now instead
of managing visibility with `show()`/`hide()`, we use
`GtkStack:visible-child`.
We've been setting background click gestures on the view_ui widget,
which is either GtkGridView or GtkColumnView.
But this means the empty state widgets don't get to handle these
clicks. And the situation would get worse with AdwStatusPage, which
fills the whole area.
So, follow the lead of the background drop target and set the gestures
on the NautilusFilesView container itself. This has the side effect
of clicks on the floating status bar working like clicks on the empty
space. But it's not a big problem.
Single action for creating a link can be either enabled and visible or disabled and invisible. Creating separate action allows hiding entry in context menu without disabling a shortcut.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2315
gtk4-builder-tool tries to port uses of `can_focus` to `focusable`,
but in real code you generally don't need to set `focusable` - the
defaults are always sensible, and removing the explicit property
means less code without any behavior change.
The view can receive focus, which causes it to draw an unnecessary
ring when focused and requires an extra focus step to get into the
items.
The view itself should not be focusable. This was set as a translation
of `can-focus`, but the semantics are different, and you generally
don't want to manually set `focusable` as the widgets set proper
defaults.
When you the navigation buttons to go back and forth very quickly
you can reliably get Nautilus to crash. This happens because there
is an idle timer set to scroll to the item to be selected. If you
change the view before the scroll has happened, the handler will
attempt to scroll to a non-existent item.
Clear scroll_to_file_handle_id before clearing all view items
in real_clear().
Opening a new tab from the main view and side bar is set with
NAUTILUS_OPEN_FLAG_DONT_MAKE_ACTIVE. Prior to
022867e3d3 this was the same for tabs opened
from the pathbar. It appears that the change was unintentional
(GTK Open Flags don't have a "don't make active" flag).
Set new tabs as not active from the path bar.
Middle click should open a new tab. This is consistent with
the main view, sidebar, and pathbar. When opening the new tab
set the location preemptively to either one location forward or
back.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1490
Add function like nautilus_window_back_or_foward(), but instead
of acting on the current slot, open a new tab. This will be used
when middle clicking the navigation buttons in the toolbar.
valign property of the widget responsible for the folder content was
set to GTK_ALIGN_START. This widget was moved to the top part of
the parent if this widget receives enough space. However, this
is not needed in this situation, since GridView already placing
folders and files from top to bottom. Also, the height of
the GridView was bounded by parent height and by some linear
function of the number of elements in a folder.
Changing valign will force the GridView to fill all allowed vertical space.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2301
It's possible that nautilus_clipbaord_from_string() receives an
empty string. When an empty string is received nautilus crashes
because g_str_equal() cannot handle the null value returned from
g_strsplit(). We could simply change g_str_equal() to g_strcmp0()
but that opens up the possibility for the for loop to give
unexpected results (it only checks for NULL starting at index=1).
Check if the results from g_strsplit()[0] == NULL and return early.
Now that we are bringing the gnome-user-share extension
into Nautilus itself, we need the ability to check
if gnome-user-share is installed. GNOME Settings
does this by checking the schema. Let's use the same
code that Settings uses.
This doesn't work within sandboxes, so if we are
sandboxed always return TRUE;
When running Nautilus in a flatpak, the format option
is not available on the sidebar. Use dbus_launcher
to check / run gnome disks for stability and flatpak
integration.
With the trash-bar the "settings" button opens Settings via
commandline which doesn't work within a flatpak. Use dbus-launcher
to open settings for flatpak integration and stability.
Nautilus launches external programs (i.e. Settings & gnome-disks)
directly via the commandline which doesn't work in flatpaks.
Create new module nautilus-dbus-launcher to allow for launching
these programs via DBus. nautilus-application holds ono a
singleton instance of the dbus launcher (similar to undo manager
and tag manager) so we don't need to create proxies over and over again.
Nautilus shows incorrect statistics for the root volume when
running in a flatpak. Don't show volume information when the
/.flatpak-info file exists
Related to: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1997
Exchange the adjustable GtkPaned widget for AdwFlap. We lose a
resizable sidebar, but gain an adaptive one. For windows narrower
than 600px, we fold the sidebar.
The loss of the resizable sidebar means that all settings related
to it are removed.
Fixes#2156