Commit graph

24391 commits

Author SHA1 Message Date
Peter Eisenmann 678836bbfc vfs-extensions: don't allow whitespaces in extension
Whitespaces in file extensions are not (commonly) used, it's more
likely in cases where a whitespaces occurs after a dot, that the
dot does not indicatie an extension at all.

This change prevents such incorrect extension detections by
checking for whitespaces, and adjusts a self-check test that tested
for the previous behavior.
2023-10-27 23:54:53 +00:00
Khalid Abu Shawarib 530fb19c2e file-operations: Set new mtime when copying from a template
Sets the file modified time as default when creating a file from a
template so that it appears as a new file.

Also bump glib dependency to 2.79 to insure the API for the default
modification time is supported.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1686
2023-10-27 23:37:37 +00:00
Automeris naranja bccd4f2399 properties-window: Add mnemonic to change_permissions_button 2023-10-27 23:26:10 +00:00
Automeris naranja db550d95f6 properties-window: Add tooltips to some buttons 2023-10-27 23:26:10 +00:00
velsinki 0cd2966188 window: Do not leak in show operation notification
If the Nautilus window is inactive, the new AdwToast is not added but
never freed. By slightly refactoring
nautilus_window_show_operation_notification, this is prevented. Although
the strings were properly freed, change them to g_autofree inside the if
statement for consistency with other functions here.
2023-10-27 15:34:21 +01:00
velsinki 7094e2f3d7 window: Parse toast title as plain text
Pango markup is enabled by default for the AdwToast title for operation
notifications. This means symbols like "&" cause issues. So let's
disable the markup on the toast altogether.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/3085
2023-10-27 15:34:21 +01:00
Марко Костић a070876f39 Update Serbian translation
(cherry picked from commit 1d91b46981)
2023-10-26 05:48:04 +00:00
kramo a3f3052cd7 dnd: Capitalize "Image" 2023-10-25 18:42:05 +00:00
Peter Eisenmann 04721b5ebd compress-dialog-controller: remove unused variable
Fixes a warning that 0d7ccf0364
accidentally introduced.
2023-10-24 22:57:12 +02:00
Eric Daigle 182a7865bf compress-dialog-controller: update password field encryption text
The current writing style in the placeholder of the password field in the
compress-dialog-controller is oddly formal. This commit replaces the text with
"Enter a Password."
2023-10-22 09:23:23 +00:00
Eric Daigle 0d7ccf0364 compress-dialog-controller: add password confirmation entry
As described in #3128, the compress-dialog currently does not ask the user
to confirm the password when creating an encrypted archive. This could lead
to typos in the password and potentially data loss if the original files are
deleted after compression.

This MR adds a password confirmation entry to the compress-dialog, preventing typos
and matching the example password entry from the GNOME HIG.

Closes #3128
2023-10-22 09:23:23 +00:00
Peter Eisenmann 8add7b8914 file-utilities: only query content type when used 2023-10-22 06:01:54 +00:00
Peter Eisenmann 5c9b8b8af5 general: don't capitalize type descriptions
Since version 2.3 of xdg/shared-mime-info content type descriptions are
capitalized when they have to be, so we don't have to blindly capitalize
all of them.
2023-10-22 06:01:54 +00:00
Corey Berla 1b20327515 file: Disconnect unmounted signal before finalizing Directory
There's a rare crash where the ::unmounted callback is called
(before it's disconnected), but after the file's directory has been
finalized.  This ultimately causes a crash because the unmounted
callback, calls file_invalidate_attributes, which calls directory
functions.

We could move the existing code to disconnect the unmounted
handlder in nautilus_finalize before the call to
nautilus_directory_unref, but instead just use g_signal_connect_object
which will disconnect the handler in dispose rather than finalize.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3047
2023-10-21 13:30:47 +00:00
Sabri Ünal a5edd7a9fd Update Turkish translation 2023-10-21 09:15:42 +00:00
Florentina Mușat 7f658cc031 Update Romanian translation
(cherry picked from commit a9ef8465ec)
2023-10-18 18:12:41 +00:00
Khalid Abu Shawarib 3e21adc904 image-properties: Fix crash with null metadata tag
Handle the case where
gexiv2_metadata_try_get_tag_interpreted_string returns a null
pointer to avoid a crash.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3138
2023-10-18 16:32:09 +03:00
Varun Varada 0d299ef4a9 file-operations: adjust data speed units
Data rates are most commonly depicted with an "s" for seconds.
Similarly, kilobyte is "kB", not "kb". This updates all such
instances.
2023-10-16 23:37:09 +00:00
oscfdezdz a4f9cb13a0 general: Change AdwSwitchRow variable names ending
Now that they are not GtkSwitch and are a special type of row, use `_row`
instead of `_switch`.
2023-10-16 23:00:45 +00:00
oscfdezdz 7a3d5ee753 general: Port to AdwSwitchRow 2023-10-16 23:00:45 +00:00
Automeris naranja e0de64160a preferences-window: Allow searching for preferences 2023-10-15 23:50:36 +00:00
Sabri Ünal 29c9311a34 Update Turkish translation 2023-10-14 07:05:37 +00:00
Barnabás Pőcze f65c2921b0 window: Open location entry when current path is clicked
Make the location entry visible when the current path
is clicked in the path bar.

Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/85
2023-10-12 19:28:56 +00:00
António Fernandes 59aeabcf02 appdata: Remove mailing list, add discourse link
The mailing list is gone and the replacement is discourse.

As the update_contact tag expects an email address, remove it without
replacement. This tag is meant only for distributors[0], and our
distributors know well how to contact the GNOME project. Also, problems
with this metainfo can just be reported as bugs, so the bugtracker url
tag above is the obvious route.

The discourse is added as a new tag, meant for users to get in contact
with our community for any other reasons.

[0] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-update_contact
2023-10-12 14:20:18 +01:00
António Fernandes daee79d815 appdata: Remove links to the wiki
It's time to migrate away from wiki.gnome.org.[0]

The help link was wrong anyway. [1] And we already have a much better
home page at https://apps.gnome.org/Nautilus which doesn't require any
manual maintenance (it's generated automatically using this very file).

Resolves https://gitlab.gnome.org/GNOME/nautilus/-/issues/1175

[0] https://blogs.gnome.org/aday/2023/08/02/what-to-do-with-the-gnome-wiki/
[1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-url
2023-10-12 14:20:17 +01:00
Sabri Ünal 95d40049fa appdata: add vcs-browser support
This URL is visible on Flathub and GNOME Control Center.

Also update donation URL.

More information: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-url
2023-10-12 14:19:38 +01:00
Khalid Abu Shawarib ad865de618 window: Replace deprecated toplevel wayland function
Use gdk_wayland_toplevel_drop_exported_handle instead of the
deprecated no-op gdk_wayland_toplevel_unexport_handle. Also
bump the gtk dependency.
2023-10-12 00:11:50 +03:00
Khalid Abu Shawarib 6d0ccc66c9 image-properties: Don't read orientation with invalid metadata
Don't try to read the image orientation if the metadata is not ready.
2023-10-12 00:11:50 +03:00
Khalid Abu Shawarib 127d4a68ca gtk-side-bar-row: Don't write directly to file prop
File proprty is read only, and is initialized by the uri
property setter. Don't assign it at object creation.

Fixes the warnings in #3103
2023-10-12 00:11:50 +03:00
Khalid Abu Shawarib 059dfac462 floating-bar: Use graphene types
Simplify coordinates handling by using graphene-compatible
functions.
2023-10-12 00:11:50 +03:00
Khalid Abu Shawarib 94fc6becd2 general: Replace deprecated widget size calls
Replace gtk_widget_get_allocated_(width/height) and
gtk_widget_get_allocation with gtk_widget_get_(height/width).
2023-10-12 00:11:50 +03:00
Khalid Abu Shawarib b283228323 general: Fix leaks 2023-10-11 20:13:00 +00:00
Khalid Abu Shawarib 4b97eb3f7f placessidebar: Mark row reference in hover timer as weak
This avoids a crash that was previously masked by leaking rows.
2023-10-11 20:13:00 +00:00
Khalid Abu Shawarib 7f68d75834 general: Use gtk_widget_dispose_template
And set child property to NULL before calling it for bin-like
widgets.

Resolves https://gitlab.gnome.org/GNOME/nautilus/-/issues/2418
2023-10-11 20:13:00 +00:00
Alynx Zhou 6656cdb3a4 pathbar: Add menu item to enter location entry
We already have an action to show location entry via a keybinding,
however a new user may be confused because nowhere hints the keybinding.

ADd a menu item to the menu in pathbar so user can easily find it and 
then paste or edit the location.
2023-10-11 11:57:07 +00:00
Gary Li 497ed46f0e window-slot: Fix restoring scroll position from history
Nautilus does not scroll correctly for forward or backward navigation.

This is because the behaviour of the action "list.scroll-to-item" does
not put the specified position at the top of the view, but rather
scrolls the minimum amount to bring it to view, which usually leaves it
at the bottom of the view.

So, instead save the last visible item to scroll to.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2720

(Ammended by António Fernandes <antoniof@gnome.org>)
2023-10-10 17:35:10 +01:00
Florentina Mușat 1aa0bfdda3 Update Romanian translation 2023-10-09 16:08:13 +00:00
António Fernandes 8297825c62 location-banner: Import remove-old-trash-files monitoring
Complete the mission of the previous commit, removing the last
piece of banner-managing code from slot.
2023-10-06 22:17:06 +01:00
António Fernandes 03dd284356 location-banner: Import location matching code
This needs nothing from the slot other than the location.

So, let's make the slot file cleaner and gather banner code in
a single place.
2023-10-06 22:17:05 +01:00
Peter Eisenmann f2c9793e2c location-banner: adjust auto-emptied trash strings
Match propsed strings of #2527.

Part of #2527
2023-10-06 22:16:42 +01:00
Peter Eisenmann 4bcafcf2f0 window-slot: add banner for non-auto-emptied trash
Show a "Empty" button for the trash if it is not emptied automatically.

Part of #2527
2023-10-06 22:16:42 +01:00
Peter Eisenmann 5176499adc sidebar: add mnemonic for empty trash
As a side benefit the same string can later be used in a banner button.
2023-10-06 22:16:42 +01:00
Peter Eisenmann 0f049c070c location-banner: drop periods after some titles
According to the HIG banner texts shouldn't end in periods.
2023-10-06 22:16:39 +01:00
Peter Eisenmann 3d6df1a7fb file: add is_public_share_folder
Match the signature by moving the function from nautilus-window-slot to
nautilus-file.
2023-10-06 22:16:39 +01:00
Peter Eisenmann 86e80a8afa window-slot: simplify get_current_location()
The NULL check on self->location is not required, since NULL is returned
otherwise anyway.
2023-10-06 22:16:39 +01:00
Peter Eisenmann 6e07531f7b location-banner: sort cases alphabetically 2023-10-06 22:16:35 +01:00
António Fernandes 4a5d128a8b window-slot: Simplify banner setup code
- Use autocleanup.
- Replace NautilusDirectory methods with more convenient equivalents.
- Factor out scripts folder matching.
2023-10-06 21:47:26 +01:00
Peter Eisenmann 9e509de40d window-slot: Reuse banner
Banners are currently one of the "extra_location_widgets", which get
destroyed and recreated whenever the location changes. This setup
precludes the usage of the reveal functionality of AdwBanner, which
is desired by the design team.

Setup the banner separately from the extra location widgets (of which
x-content-bar is the only left possible element now). Make it a direct
child of the slot which can be reloaded as many times as needed.
2023-10-06 20:35:54 +01:00
Peter Eisenmann f73e542ed3 window-slot: remove redundant forward declarations 2023-10-06 20:30:04 +01:00
Peter Eisenmann cb60f91cd1 special-location-bar: Rename to nautilus-location-banner
Update name to reflect the fact it's an AdwBanner now.
2023-10-06 20:29:04 +01:00