Commit graph

24377 commits

Author SHA1 Message Date
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
Peter Eisenmann
0db04f4e09 special-location-bar: use AdwBanner
GtkInfoBar is deprecated in GTK 4.10. Use AdwBanner introduced in
libadwaita 1.3 instead.

This makes having a custom struct to store all the information
redundant, so drop the NautilusSpecialLocationBar class and provide
a method to create an AdwBanner instead.

Part of #2722.
2023-10-06 10:19:58 +01:00
Peter Eisenmann
304b8990d4 special-location-bar: Buttonize "Learn More" link in Templates
Make it consistent with other infobars with a button and add mnemonic.

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

(Factored out by António Fernandes <antoniof@gnome.org> from Peter's
original commit)
2023-10-06 10:18:50 +01:00
Peter Eisenmann
a22f86f679 special-location-bar: Factor out Settings launch code
We are going to change from GtkInfoBar to AdwBanner.

So, the GtkInfoBar::response signal is going away. In preparation,
isolate the reusable parts of its callback in functions that can
be used as calbacks to the AdwBanner::button-clicked signal.

(Factored out by António Fernandes <antoniof@gnome.org> from Peter's
original commit.)
2023-10-05 20:36:35 +01:00
Cheng-Chia Tseng
6a20c86588 Update Chinese (Taiwan) translation
(cherry picked from commit e33c6fc991)
2023-10-05 07:25:44 +00:00
Peter Eisenmann
5a4fc5664e build: autappdata build version
As suggested by @naheemsays on Matrix and inspired by
775dbec2e6
2023-10-05 08:26:07 +02:00
António Fernandes
d23e6bf085 files-view: Restore searched location state
When switching view mode, a new view is created. If we are in a search,
the new view has no previous location to go back to when canelling
search, so it falls back to the user home directory.

In order to improve this situation, let's have the new view assume that
the queried location is the original location.

(This fails for global search, but the proper fix requires larger
changes, which are not suited for a bugfix in the stable branch.)
2023-10-05 02:05:26 +00:00
António Fernandes
3a8e0a6043 files-view: Restore search state on view switch
As follow-up to not treating search as a navigation node[0], I've
removed some intrincate logic to handle the case where we go back or
forward to a search directory.[1]

Except... this logic was also needed for the case where we reload a
search directory in a new view during view mode (grid/list) change.

As a consequence, switching view mode during search results in an
empty results view, even if there were some before.

So, let's restore the important bits that were removed in [0].

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

[0] commit d06b4d6a81
[1] commit 570e5c59c3
2023-10-05 02:05:26 +00:00
Sebastian Keller
ffde5d91e1 file: Fix crash when opening properties dialog while using admin backend
The properties dialog of a file or directory accessed using the admin
backend allows changing its owner. The list of possible users for this
gets populated from passwd. If one of the users in passwd has an empty
GECOS field, this will cause get_real_name() to use g_strsplit() on an
empty string, which means geco_parts[0] is NULL, leading to a crash when
passed to g_utf8_validate().

Fix this by not doing anything when we encounter an empty GECOS field.

Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3111
2023-10-04 09:08:08 +00:00
Stefan Hansson
165164de5e thumbnails: Fix compilation on 32-bit musl
%lu probably works in most cases, but on 32-bit musl (not sure
about glibc) it complains about that %lu expects
"long unsigned int" but time_t is "long long int". As such, work
around this by copying what gnome-desktop does for this case.
2023-10-03 01:32:17 +00:00
Sabri Ünal
e90b86707e Update Turkish translation 2023-10-01 18:31:03 +00:00
Rafael Fontenelle
5c311a8d8e Update Brazilian Portuguese translation
(cherry picked from commit 9e8cdd4873)
2023-09-25 14:03:16 +00:00
Khalid Abu Shawarib
46568edd7d gtk/placessidebar: Use list box for coordinates translation 2023-09-24 21:09:01 +00:00
Peter Eisenmann
5cf288a93e general: Remove nautilus-profile
With tools like sysprof that use the kernels perf functionality, there
is no need to maintain an in-tree profiling solution.
2023-09-24 21:06:08 +00:00
António Fernandes
250853856d files-view: Rename model to directory
In preparation for handling NautilusViewModel in the parent class,
which is going to use the "model" name.
2023-09-24 19:18:47 +00:00