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
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>
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
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.
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
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.
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.
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.
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
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
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
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.
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.
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.
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
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
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.