Commit graph

25541 commits

Author SHA1 Message Date
Khalid Abu Shawarib 0b04bb6942 file: Use symbolic mount icons for emblems 2024-08-04 23:52:23 +00:00
Peter Eisenmann 6f60c33304 file: cleanup metadata list directly
Instead of allocating a new list, directly edit the list in the cleanup
function. Query the next list node before potentially changing the list.

Also, inline parameter declarations.
2024-08-04 23:52:23 +00:00
Peter Eisenmann 463b4d9d61 file: simplify the metadata cleanup function
As only one metadata keyword is ever excluded, there is no need for a
vector of excluded keywords. Instead, return early if the exclusion is
not needed and compare with the keyword if it is.
2024-08-04 23:52:23 +00:00
Sam Hewitt df1d93e32e file: Use symbolic assets for emblems box
- update UI file for emblems box to use symbolics
- new icon assets for symbolic emblems

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3135
2024-08-04 23:52:23 +00:00
Khalid Abu Shawarib 9d5d647319 file: Remove trailing whitespace 2024-08-04 23:52:23 +00:00
Khalid Abu Shawarib c3dae1776d file: Remove unused emblem definitions 2024-08-04 23:52:23 +00:00
Corey Berla d532a295d1 query-editor: Popdown popover on button click
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3524
2024-08-04 22:50:03 +00:00
Khalid Abu Shawarib 53c788e13b query-editor: Bail out on cancelled async call
This call will be cancelled when the editor is disposed. It should
not use the editor reference until it verifies that it wasn't
cancelled.
2024-08-04 21:34:35 +00:00
Martin 58ea7fca6f Update Slovenian translation 2024-08-04 09:45:21 +00:00
Martin 677ec735b7 Update Slovenian translation 2024-08-04 09:43:49 +00:00
Alice Mikhaylenko e257145b87 style: Change file view accent color to grey
Same as file chooser, we'll need this in case 47 ships without the new
grid.
2024-08-04 07:48:45 +00:00
Automeris naranja b79a3ba034 nautilus-search-types-dialog: Make the headerbar buttons to have the same width 2024-08-04 01:59:49 +00:00
Automeris naranja 5356ea0d6a nautilus-search-types-dialog: Add AdwStatusPage:description
Add a description to the "No Results Found" status page saying
"Try a different search", as this pattern is widely used in
several GNOME apps.
2024-08-04 01:59:49 +00:00
Automeris naranja 29655e0c4d nautilus-search-types-dialog: Don't use compact AdwStatusPage
.compact AdwStatusPage is usually used in very small spaces such
as sidebars or popovers:
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#compact-status-page
2024-08-04 01:59:49 +00:00
Automeris naranja e98f3a68c1 nautilus-preferences-window: Rename to nautilus-preferences-dialog
NautilusPreferencesWindow is a dialog since the previous commit.
2024-08-04 00:28:31 +00:00
Automeris naranja 75e5225be0 nautilus-preferences-window: Port to AdwPreferencesDialog 2024-08-04 00:28:31 +00:00
Corey Berla 1ce6e187a1 window-slot: Update back forward actions upon restore
After commit [1], back and forward actions are not correctly
reenabled after restoring a tab.  The actions were previously
reenabled after restoring a tab due to the fact that the
restored tab was not automatically active.  Once the tab
was created and the user switched to the newly restored tab
that would fire a location change which in turn called
nautilus_window_sync_location_widgets() where the back and
forward actions would get enabled.  Now that the actions live
in the slot, this no longer happens.  Reenable the actions
after the back and forward lists have been restored.

[1] 2d6f4b8280
2024-08-04 00:10:06 +00:00
Anuraag Reddy Patllollu c685a44496 query-editor: Display popover information for non-indexed folders
The popover now displays information when a folder is not indexed or
contains subfolders that are not indexed.
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu 28d3b5c4bb query-editor: Display popover information for remote and external drives
The popover now displays information when a folder is is a remote or an
external drive.
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu 303ea85314 query-editor: Add search information popover to query editor
The original design for providing search information used a banner,
which does not align with modern conventions. This commit introduces a
new popover to display the same information inside an adwaita status
page
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu c39507ec46 tracker-utilities: Check whether directory is tracked
The functionality to check if a directory is indexed was removed in
commit bd30a21a. We need to restore this feature to notify users whether
their folders are indexed when they perform searches within those
folders.
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu fe111a53e0 global-preferences: Add preferences for localsearch
Global preferences for localsearch (formerly tracker) were removed in a
previous commit. To check whether a folder is indexed or not, this
setting is needed.
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu d7b2c22e16 move: Move is_external_volume function to file-utilities
The is_external_volume function is commonly used and will be useful in
multiple places. Move this function from gtk/nautilusgtkplacessidebar.c
to file-utilities for easy importing
and reuse across different components.
2024-08-03 22:33:46 +00:00
Anuraag Reddy Patllollu e84b6532ab window-slot: Remove search information banner
The banner displaying information about the folder being searched is now
redundant. With the introduction of the new popover that follows the
latest design guidelines, the banner can be safely removed.
2024-08-03 22:33:46 +00:00
Automeris naranja cca184b316 nautilus-new-folder-dialog: Port to AdwDialog 2024-08-03 21:53:04 +03:00
Automeris naranja a43967e77c nautilus-new-folder-dialog: Improve feedback text UI
- Add .warning style class to the feedback and to the name entry
when a feedback text appears
- Add .caption style class to the feedback text
- Use the same top margin from the feedback text of
NautilusCompressDialog
- Remove the bottom margin to avoid triggering an unnecessary
scrollbar
2024-08-03 13:51:26 -03:00
Automeris naranja 142c6b79c6 new-folder-dialog: Use AdwPreferencesPage/Group and AdwEntryRow 2024-08-03 13:31:46 -03:00
Automeris naranja 523901c16a new-folder-dialog: Port to AdwToolbarView 2024-08-03 13:31:46 -03:00
António Fernandes 071a0c1ec9 application: Initialize service channel display
This is going to allow the upcoming FileChooser portal implementation
to attach its window as a modal dialog to client applications, even
if they use different display servers (X11 and Wayland).

If this initialization fails somehow, we gracefully fallback to no
interoperable parenting between X11 and Wayland clients.
2024-08-03 16:22:10 +01:00
António Fernandes b4e5133ac9 general: Add xdp-gnome imported code to the build
Make it a private static library to be used in commming commits.

Contrary to upstream, we use the imported *.impl.* definitions.

For convenience (not to move a lot of meson code around), define
the HAVE_GTK_WAYLAND and HAVE_GTK_X11 in config.h instead of
compiler flags.
2024-08-03 16:22:10 +01:00
António Fernandes 8cdead2863 xdp-gnome/data: Import portal impl interface defs
These are copied from [xdp-desktop-portal], to avoid adding it and all
its dependencies as buildtime dependencies of our own (and to the
flatpak manifest).

[xdp-desktop-portal]: https://github.com/flatpak/xdg-desktop-portal/
2024-08-03 16:22:10 +01:00
António Fernandes b4af70b6ba externalwindow-wayland: Gracefully fallback if no X11 interop
If we are a wayland client and:

- mutter is not patched to allow us to use the ServiceChannel;
- or the compositor is not mutter-based,

We should not even try parenting our dialog over an X11 client,
instead falling back to no parenting at all.
2024-08-03 16:22:10 +01:00
António Fernandes b73a014a33 externalwindow-wayland: Use our own service channel client id
This private mutter protocol requires each client to have a unique
hard-coded enum id.

Requires mutter patch to add this enum value on that side.
2024-08-03 16:22:10 +01:00
António Fernandes ca4632ced3 externalwindow-wayland: Ignore shadowed variable
`x11_interop` is the symbol of a global variable, but gets reused for
a local one.

We should try to keep this code in sync with xdp-desktop-porta-gnome
so, instead of chaning the symbol, ignore the compiler error.
2024-08-03 16:22:10 +01:00
António Fernandes 73206843e1 general: Copy code from xdg-desktop-portal-gnome
This is code copied from xdg-desktop-portal-gnome repository today[0].

We need it to implement the FileChooser portal ourselves.

It's not included in the build yet, as it needs modifications first.

[0] b92a8cc5f6
2024-08-03 16:22:10 +01:00
António Fernandes 9bc52c1045 window-slot: Fix implementation of :selection
It's missing a case in get_property() despite being readable. We
haven't been reading it so far, which is why this has gone unnoticed.
But the upcoming FileChooser implementation will read it.

Also, we have been explicitly notifying it, so flag it as such to
avoid double notification. While here, drop obsolete nick and blurb.
2024-08-03 15:21:39 +00:00
Corey Berla 69f89a6d3a Revert "list-base: Don't notify selection-changed on every call to remove_file"
This effectively reverts [1] and [2] in favor of [3].

[1] be43bd279d
[2] 6981ad8777
[3] 254c357ade21ffadf48f81bfd90865958b1716aa
2024-08-03 15:21:39 +00:00
António Fernandes c3a4463b25 files-view: Make ::notify::selection reliable
The changes notifications on the NautilusView:selection property are
not reliable. E.g. when the view switches to a new location, it
empties the model, which effectively clears selection, but this is
not notified as a selection change.

This happens because we have been incorrectly relying exclusively on
the ::selection-changed signal from the view model. As documented on
GtkSelectionModel, and contrary to intuition, this signal  doesn't
notify about changes to the selection set; instead, it notifies about
changes to the selection state of individual items! In other words,
it doesn't notify us if a selected item is removed from the model.

The FileChooser dialog is going to rely on NautilusWindowSlot to get
the current selection. The slot currently caches the selection from
the view. So, we need to invalidate that cache correctly, and for
this we need the view to reliably notify any changes to selection.

The correct way to effectively track changes to the selection set is
to listen to ::items-changed in addition to ::selection-changed.
Instead of reinventing the wheel, rely on GtkSelectionFilterModel to
do the job for us. Then we can just listen to changes in that model.

As it turns out, this is also the correct fix for
https://gitlab.gnome.org/GNOME/nautilus/-/issues/2338 and
https://gitlab.gnome.org/GNOME/nautilus/-/issues/3354

In the future we may want to further refactor our get_selection()
logic around this filter list model, perhaps with GtkMapListModel to
have NautilusFile as item-type, to use proper reference-counted
contained instead of going around doing deep copies of GLists, but
that's for another time.
2024-08-03 15:21:39 +00:00
António Fernandes e32cb6b1f1 filename-validator: Support NULL current-directory
There is no need to treat this as a programming error. Simply don't
validade filename without a directory.

This is going to be needed by the FileChooser in SAVE_FILE mode, if
neither the client app nor the user has set a target directory yet.
2024-08-03 15:21:39 +00:00
António Fernandes 742197ae62 filename-validator: Introduce :allow-overwrite
This property is going to be set to TRUE by the upcoming FileChooser.

If turned on, the validator will still provide feedback on duplated
names, but it will accept them nonetheless if otherwise valid. It's
up to the FileChooser to confirm the user wants to replace the
existing file.
2024-08-03 15:21:39 +00:00
António Fernandes 590be9df9d filename-validator: Cache processing
Instead of using out parameters and local variables, store booleans
in the instance structure.

This is required to introduce more nuanced behaviors, like allowing
to override existing files on FileChooser dialog.
2024-08-03 15:21:39 +00:00
António Fernandes ee971fee43 view-item-filter: Introduce filter for FileChooser
Instead of reimplementing GtkFileFilter, which conveniently takes
the GVariant format from the FileChooser portal interface, let's
wrap it with a filter of our own which translates NautilusViewItem
into a dummy GFileInfo.
2024-08-03 15:21:39 +00:00
António Fernandes 04b143ea14 window-slot: Introduce :filter property
This will allow the FileChooser window to indirectly set the filter
on the view model, through an internal binding.
2024-08-03 15:21:39 +00:00
António Fernandes f247bde17d view-model: Introduce :filter property
This is going to be used in the FileChooser.

Also document the internal model structure.
2024-08-03 15:21:39 +00:00
Corey Berla 820432138b floating-bar: Stop notifying twice
Set G_PARAM_EXPLICIT_NOTIFY on all the properties, since the setters
are notifying.  While we are at it, remove the nicks and blurbs.
2024-08-03 15:10:18 +00:00
Peter Eisenmann c19ed96a66 floating-bar: Remove unused orientation property 2024-08-03 15:10:18 +00:00
Corey Berla 5f7822625c floating-bar: Use AdwSpinner and UI file binding
Use an AdwSpinner that does not require to start/stop it spinning. Bind
the visibility of the spinner to the loading property of the view.
2024-08-03 15:10:18 +00:00
Peter Eisenmann c59d545269 general: Use AdwSpinner
New widget from libadwaita 1.6 with modern animation and without a
'spinning' property.
2024-08-03 15:10:18 +00:00
Martin d17e1fd0f8 Update Slovenian translation 2024-08-03 14:06:07 +00:00
Automeris naranja 3d49eba0f2 window: Port to AdwAboutDialog 2024-08-03 14:59:09 +02:00