Commit graph

22092 commits

Author SHA1 Message Date
António Fernandes 6bb582ca18 README: Clarify the status of the "nautilus" name
The proper name of the application is "Files".

Don't use the project name when referring to the app. Also prefer the 
lowercase "nautilus", matching the project name with the program name.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1673
2021-01-12 18:36:22 +00:00
Andre Klapper ac9be83e01 README: Replace a redirect by direct link
See #1673
2021-01-11 13:23:29 +01:00
Marek Černocký 141eb7f7b9 Updated Czech translation 2021-01-10 22:56:14 +01:00
Maxim Mikityanskiy f29b483918 file-operations: Preserve mtime of non-empty directories on move
Nautilus follows this algorithm when copying or moving directories:

1. Create the destination directory.
2. Copy/move the old directory contents recursively.
3. g_file_copy_attributes from the old directory to the new.
4. Delete the old directory.

The issue is that when moving a non-empty directory, step 2 leads to
modification of the old directory's mtime, so g_file_copy_attributes
copies the attributes that were already lost at that point.

This commit fixes it by splitting g_file_copy_attributes into two steps.
It depends on glib!1449.

Closes: gvfs#471
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
2021-01-09 16:33:49 +02:00
Ondrej Holy 96b4668770 Post release version bump 2021-01-08 16:45:11 +01:00
Ondrej Holy a09befcd04 Release version 40.alpha 2021-01-08 16:45:11 +01:00
Hugo Carvalho 652865d57f Update Portuguese translation 2021-01-08 15:21:49 +00:00
Yuri Chornoivan f97e7590fc Update Ukrainian translation 2021-01-08 13:47:53 +00:00
Florentina Mușat f1c3d99f88 Update Romanian translation 2021-01-08 12:50:42 +00:00
António Fernandes ee77cd41c4 properties-window: Truncate name in window title
We display the a file's basename in the properties window title.

    exmaple.txt Properties

If a file has a really long name, this makes the dialog way too wide.

    example_of_a_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_name.txt Properties

Yes, that went past the 72 characters limit for a commit message lines,
which proves the point.

Instead, let's truncate the basename to a reasonable limit.
The full name is available in the Basic tab of properties dialog anyway.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=754388
2021-01-08 12:34:21 +00:00
António Fernandes d2be38db90 file-conflict-dialog: Set max width for labels
Files with very long names, or verbose translations, can make this
dialog window too large.

To ensure a sane width, set a maximum width for the labels.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=786701 as well as the
issue reported in https://gitlab.gnome.org/GNOME/nautilus/-/issues/1727#note_998181
2021-01-08 12:34:19 +00:00
Apoorv Sachan ed6b8de612 properties-window: Add created row to the basic page
The NautilusFile backend now supports birth-time parameter.
It is now leveraged to display the date-created for a file
in properties dialogue.

Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1566
2021-01-05 14:03:49 +00:00
António Fernandes 6b92435c7c column-utilities: Add Created date column
Now that we have backend support for showing and sorting by btime, add
an optional "Created" column to the list view.

This enables using the attribute as caption for icon view too.
2021-01-05 14:03:49 +00:00
António Fernandes 22d2c30d5f general: Support sorting by creation date
No user visible changes yet.
2021-01-05 14:03:49 +00:00
António Fernandes 99d034af6c file: Add "date_created" attribute
GIO 2.66 introduces support for Linux statx stx_btime.[0]

First, let's add support for this attribute in our file models.
No user-visible changes yet.

[0] a396fa9027
2021-01-05 14:03:48 +00:00
António Fernandes 39e05c2368 list-view: Don't leak container array
When converting the array into a list, the list takes the data. But the
original container is leaked.

Get the array inside the helper function and free it after its data is
taken. Also rename the helper funcion appropriately.
2021-01-05 08:50:25 +00:00
António Fernandes 90a58d972d application: Don't leak container array
We extract an array constant strings from a GVariant dict using the
"^a&s" format string, which is equivalent to g_variant_get_strv() [0]
g_variant_get_srtv() is "(transfer container)", meaning the caller
owns the array.

However, we don't free the array, resulting in a memory leak. [2]

Use autocleanup to fix the leak.

[0] https://developer.gnome.org/glib/stable/gvariant-format-strings.html#gvariant-format-strings-convenience
[1] https://developer.gnome.org/glib/stable/glib-GVariant.html#g-variant-get-strv
2021-01-05 08:50:24 +00:00
António Fernandes 61063868fa tag-manager: Release home GFile in ::finalize 2021-01-05 08:50:24 +00:00
António Fernandes 3680bb07f5 tag-manager: Don't leak stamp path string
Also respect code style (return type in different line).
2021-01-05 08:50:24 +00:00
António Fernandes 4f6013e734 tag-manager: Don't leak singleton references
We are leaking references to the singleton object in multiple places.

It's not a problem during runtime, but this means it's not properly
finalized when the application quits, leaking the tracker connection,
which is detected by valgrind.

Add g_autoptr() and g_clear_object() where missing. Also, to prevent
future leaks, document nautilus_tag_manager_get() and uniformize its
use as either an autovariable initializer or a field initializer.
2021-01-05 08:50:24 +00:00
António Fernandes de4d100359 bookmark-list: Unref obj on each loop iteration
Autocleanup works only at the end of the scope it's declared.

So, it must be declared inside the loop to work as intended here.
2021-01-05 08:50:24 +00:00
António Fernandes 400f6d499d window: Don't leak bookmark location GFile 2021-01-05 08:50:24 +00:00
António Fernandes 85e40ce77f toolbar: Don't leak builder object 2021-01-05 08:50:24 +00:00
António Fernandes 9b62be1e1e toolbar: Don't leak menu models
g_object_get() returns a ref to the property object. We must unref it.
2021-01-05 08:50:24 +00:00
António Fernandes 342207ef66 window-slot: Don't leak menus on destruction
We hold a ref since commit 6b16de613d

But we never release it on slot destruction, so it leaks.

Release it on destruction.
2021-01-05 08:50:24 +00:00
António Fernandes 76b8abd872 window-slot: Don't leak icon reference
g_value_set_object() increases the reference count of the passed object

But we already own a reference, so we end up leaking it.

Use g_value_take_object() to reuse the owned reference instead.
2021-01-05 08:50:24 +00:00
António Fernandes 44c1b9f3b5 meson.build: Don't suffix VERSION with '-stable'
It is visible in the about dialog and may be wrong.

Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/940
2021-01-05 07:07:57 +00:00
Stephen Ransom 787a835f01 progress-info-widget: Make button circular, not elliptical
When copying file(s), the Operations 'stop' button is elliptical, but it
should be circular.

So, replace our custom .nautilus-cirular-button class with .circular,
for which GTK employs the necessary stylesheet magic.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1483
2020-12-31 19:34:00 +00:00
Jeff Miller 4823069715 preferences-window: Change label ids
Label ids are employed to describe relations between widgets for
accessibility support.

However, we are using numbers for ids, which is harder for human
readers.

To make it easier, change the ids to meaningful names.

Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1420
2020-12-31 00:11:03 +00:00
Jordi Mas 6e6fe6a0e9 Update Catalan translation 2020-12-29 23:05:58 +01:00
ignapk 475684ac9e window: Don't change default tab closing behaviour
Currently when closing the currently focused slot, the next slot to gain
focus is the earliest created. This is because the default behaviour,
which is to open the next tab at the same position or the new last tab
if the previous tab was closed, used in other gnome apps like epiphany
and terminal is overriden by manually setting active slot to earliest
inactive one.

To provide consistent behaviour, remove code that overwrites the default
gtk notebook tab closing behaviour.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1567
2020-12-29 00:26:47 +00:00
António Fernandes c750a870d9 properties-window: Use g_clear_*()
They cut on boilerplate and improve readability.
2020-12-22 09:58:52 +00:00
António Fernandes 0f7ecf26c0 properties-window: Use modern GList code patterns
- Use GList API instead of reimplementing it:
    - g_list_copy_deep()
    - g_list_foreach()
    - g_list_delete_link()
- NULL-initialize fully-owned lists.
- Don't reimplement nautilus_mime_get_default_application_for_file()
2020-12-22 09:58:52 +00:00
António Fernandes 10d82fc892 properties-window: Stop multi-file GAppInfo leak
When showing the properties for multiple files with the same MIME type,
The app_info variable is reassigned multiple times in a for loop to
the return value of nautilus_mime_get_default_application_for_file(),
which returns a caller-owned refference.

So, we leak a reference on each reassignment.

To fix this, declare the variable inside the loop block, to ensure
autocleanup after each loop iteration.
2020-12-22 09:58:52 +00:00
António Fernandes 4a50c7dbeb properties-window: Use autocleanup variables more
Also fixes a few leaks:
 *uri in setup_volume_usage_widget()
 *error in set_as_default_clicked_cb()
 *message in set_as_default_clicked_cb()
2020-12-22 09:58:52 +00:00
Apoorv Sachan a8d64a8fe0 properties-window: Use autocleanup variables
Use modern GLib utilities for memory management.
2020-12-22 09:58:52 +00:00
António Fernandes 82e8545fc1 properties-window: Set boolean object data correctly
It's wrong to set a pointer to an object as data without incrementing
its refcount.

But there is actually no need to pass a real pointer as data here, as
we actually want a boolean.

Use a pointer conversion macros instead.
2020-12-22 09:58:52 +00:00
Apoorv Sachan 791ccf8380 properties-window: Instance symbol renaming
Use "self" as symbol name for the NautilusPropertiesWindow* instance
in methods and signal handlers.
2020-12-22 09:58:52 +00:00
Apoorv Sachan f2abec4495 properties-window: Removed unused macros
ROW_PAD was a macro used by code the UI creation
code which has been removed in previous commits.
Now It's not useful.
2020-12-22 09:58:52 +00:00
António Fernandes 176d99be4b global-preferences: Drop unused tracker settings
Unused since commit bd30a21a0c
2020-12-22 09:48:44 +00:00
António Fernandes 6f3b7f8b00 Revert "search: Remove special characters from FTS searches"
This reverts commit e3031953e4

It worked around an issue in tracker, which is fixed now:
https://gitlab.gnome.org/GNOME/tracker/-/issues/252
2020-12-22 09:48:44 +00:00
António Fernandes dab88ac58d tag-manager: Inline previously shared code
get_query_status() is a wrapper for tracker_sparql_cursor_next_finish()
and it's weird for _finish() not to be called directly by the
GAsyncReadyCallback function.
2020-12-22 09:48:44 +00:00
Sam Thursfield 136e97e388 tracker-utilities: Update copyright
See https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/553#note_989920
2020-12-21 13:05:10 +00:00
Ondrej Holy 5b0301b0d6 gtkplacesview: Update to latest code
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1319
2020-12-19 23:33:13 +00:00
Ondrej Holy 84708915aa file-utilities: Do not use default location instead of root
The default location (i.e. g_mount_get_default_location) should be
used when opening mounted, but we should not use it instead of the root
button in the path bar. Because it is currently impossible to navigate
to parent folders if default location is set. Let's change
nautilus_get_mounted_mount_for_root logic and return mount only for
root path so we can see the real root in the path bar.

https://gitlab.gnome.org/GNOME/nautilus/issues/1319
2020-12-19 23:33:13 +00:00
Akarshan Biswas f02652167d Update Bengali (India) translation
(cherry picked from commit 8e67058fb3)
2020-12-18 14:18:24 +00:00
Elias Projahn ac73fb7dd4 window: Refactor nautilus_window_save_geometry
Replace a guard check if/else statement with an early return and
minimize unnecessary function calls.
2020-12-17 22:49:40 +01:00
Elias Projahn 31a01278be window: Don't save state when tiled
The saved window state (whether the window is maximized and its initial
size) should be the state, that the user would most likely want the next
opened window to start with. As the tiled state doesn't make sense
without other windows and because it's not really possible to properly
restore it, it will not be saved anymore.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1685
2020-12-17 22:45:20 +01:00
Ondrej Holy b4cc41af0b files-view: Use fallback in case of xdp_portal_set_wallpaper failure
Since commit ece6b825, xdg-desktop-portal is used to set wallpapers. This
introduced the following build warning: "‘set_wallpaper_fallback’ defined
but not used", because the fallback is used only if it is built without
libportal support and it is not guraded by #ifdef. Let's use the fallback
also in the case of xdp_portal_set_wallpaper portal failure, which fixes
the warning as well.
2020-12-17 16:10:34 +01:00
Bastien Nocera 43b356b03b Revert "ci: Use Fedora latest instead of rawhide temporarily"
GNOME CI runners have been updated to the latest libseccomp so the
problem should no longer happen.

This reverts commit ab55380f20.
2020-12-11 13:49:55 +01:00