| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Use action-name properties to avoid repeating shortcut assignments.
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2882
|
|
|
|
|
|
| |
This doesn't give us anything currently, but it's the direction that
GtkColumnView is going in, so let's use it. Some minor modifications
are necessary to list-base where GridView and ColumnView share code.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When moving multiple files to trash, the toast currently
says: "%d files deleted". However, "deleted" implies permanent
loss of data. But, in this case, we are just moving files to the trash.
This commit corrects the string to show the actual action:
"%d files moved to trash".
Also correct Translators comments to make it consistent with the action.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2830
|
|
|
|
|
|
|
|
|
|
| |
Using the same icon as for closing windows and dialogs can lead to user
confusion and thus accidental cancellation of operations.
This adds and uses a new icon, inspired by Builder's use of it to stop
ongoing operations.
Fixes #985
|
| |
|
|
|
|
|
|
|
|
| |
The `NautilusFreedesktopDBus` class has a `connection` property, which
is not needed anymore after the commit 765b4d24. Let's drop that property
now. This effectively reverts a big part of commit 2293e813.
Related: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/1134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The callback function in delete_files_recursively() uses the results
from its GError to determine if it should call
nautilus_file_changes_queue_file_removed() (which ultimately calls the
list-base remove_file() function).
This normally, works as expected, except when one of the child
files fails to delete. We check for recursive deletion failures, but
we never get the error that caused that failure. This means that the
callback function will believe that the parent folder was deleted
(when it really wasn't), and the item will disappear from the view in
Nautilus because of the call to nautilus_file_changes_queue_file_removed().
If we weren't successful at deleting, but there's no error, that means
that a recursive call to delete failed. In that case let's generate
our own error.
Fixes: #517
|
| |
|
| |
|
|
|
|
| |
Pass new uncrustify criteria. No logic changes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 9ecd422cc78efad939d072e61c13e1c3a7726fc9.
Its commit message is misleading. Maybe it had such a side effect,
but the issue it fixed was actually a GTK bug which got fixed in the
meantime: https://gitlab.gnome.org/GNOME/gtk/-/commit/8455b9ac74d5337429a1a14eb>
Also, reverting it fixes a new bug: the first item is selected when
the item which was selected has been deleted. Next item should be
selected instead.
|
|
|
|
|
|
|
|
| |
In 098f6a43d782e7791caa4c443f6ab08a1310f4a0 the style was changed from
dim-label to caption. For consistency with list-view columns and to have
less visual noise, add the dim-label style class back.
Fixes #2876
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We present a new toast every time the undo action changed which
is confusing because you might have several undo toasts appearing
over each other. To complicate matters, the previous undo toasts
lie (undo'ing would actually undo a different action).
There was a proposal in #2350 to batch undo toasts, but that's problematic
because our undo manager is designed to undo exactly 1 action,
we do not have an undo stack.
The more straightforward solution seems to be simply dismissing the
old undo toasts, when we popup a new undo toast.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2350
|
|
|
|
|
|
|
|
|
|
| |
Whenever g_time_zone_new_local() is called it has to check the file
system for changes, because the system's time zone might have changed
since the last call. This function was called multiple times for each
file when generating the date string, which was causing some unnecessary
overhead.
This changes the code to re-use the local time zone from the first call.
|
| |
|
|
|
|
|
| |
Use g_set_object to simplify setter logic and avoid issues if
current_location == location.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nautilus crashes under d45b820d when we open a second window and
in both windows navigate to a common new location.
This is caused by incorrect reference management in action_clone_window,
where neither nautilus_window_slot_get_location nor
nautilus_window_slot_get_pending_location increases the ref count of
the GFile location. g_autoptr would cause location to be prematurely
freed.
Take the reference of location to allow g_autoptr to work correctly for
all branches of action_clone_window.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2858
|
|
|
|
| |
Fixes #2767
|
|
|
|
|
|
|
|
|
| |
Grid view selections feature a border for increased visibility.
Our list view lacks that because it adds custom padding, so we need
to add it as a custom style.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2909
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've added them because the colors assigned by the default stylesheet
were not adequate as per design review: d7b03656210d5feb300d5df74db9cd4601306991
Libadwaita 1.3 updated the stylesheet to use the design-choosen colors
by default in views. [0]
So, we should drop our overrides which are now unnecessary and even
harmful (they may be out of sync). Also, require the stable release of
the dependency, because 1.3.alpha didn't include [0].
[0] https://gitlab.gnome.org/GNOME/libadwaita/-/commit/fd83834f837baeb2650c75630de10ea5cdf032f2
|
|
|
|
|
|
|
|
|
|
|
|
| |
TrackerCursor returns NULL if it doesn't have information on the date.
https://gnome.pages.gitlab.gnome.org/tracker/docs/developer/method.SparqlCursor.get_string.html
We try to parse NULL as a date string. This is obviously wrong and
gets us a precondition failure warning, as it should.
So, if a string is NULL, just skip it.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2160
|
|
|
|
|
|
|
| |
This reverts commit 5f1680f9df8d6a62681a878975a1cec75a328a3d.
It avoids a warning from g_date_time_new_from_iso8601() by pushing
the code flow into another warning. A different solution is to follow.
|
|
|
|
|
|
|
|
| |
Correctly handle the cancellation of a clipboard update by checking
the return value of gdk_clipboard_read_value_finish() and returning
early on cancellation.
Fixes: #2868
|
|
|
|
|
|
|
| |
There was an issue selecting using ctrl+select which was fixed in
GTK. Our workaround is now making it break.
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/5669
|
|
|
|
|
|
|
|
|
|
|
| |
Under certain circumstances (i.e. moving a file), we end up adding
a non-existent file. This causes selection problems because the
non-existent file is selected and then removed (causing another file
to be selected). I'm not sure where the root cause is (between
directory-async, directory notify, etc), but lets simply not add
a file that we know shouldn't be added.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using tree expanders, we have special cases for the backing uri.
In GridView or ColumnView (without expanders), the backing uri is
always the current view directory. With tree expanders, the backing
uri is either the parent of the currently selected item, or the
currently selected item (if it is an expanded directory). The same
rules apply for multiple selection if there is a common parent.
This was the case in 42, and the code was dropped in
6708861ed174e2b2423df0500df9987cdaf2adc0, and as an oversight wasn't added
back in when tree expanders were reintroduced.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2888
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dead keys insert a provisional visual indication, which looks like a
text insertion, but is actually signaled as `::delete-text`. Unlike
regular emissions of `::delete-text`, here the start and end positions
are exactly the same (so you know nothing is actually deleted).
Nautilus deletes the neighbouring tag
When a dead key is entered into the batch rename entry, it deletes
the neighbouring tag. This occurs for just before, inside and just
after the tag.
This happens because our logic for knowing when to delete special
text tags is assuming end_position > start_position, which is not
the case with dead keys.
Add conditions to ensure intersecting selections cannot be zero-length.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2821
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nautilus-dropbox and probably other such extensions use emblems to
indicate sync status.
If these icons are installed as unthemed icons, then we don't
display them at all. This is because the way we are checking that
an icon exists ignores the unthemed icons completely, which is
arguably a GTK bug (https://gitlab.gnome.org/GNOME/gtk/-/issues/5709)
While the GTK inconsistency is not addressed, let's use a workaround
to check more effectively whether an icon exits.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2789
|
|
|
|
|
|
|
|
| |
Open properties on the search directory crashes Nautilus.
Exclude search, recent, and starred from opening
current directory properties when no file is selected.
Fixes #2903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the sidebar, when dragging to re-order bookmarks,
other bookmarked folders are automatically opening while hovering
over them as it happens during a drag-and-drop operation.
This action should not be permitted because it is inconceivable to
drag-and-drop a bookmark into another bookmark.
Implement a check to prevent automatically navigating
into the bookmarked folders if they are hovered on while dragging
a bookmark with the intent to just re-order them.
It achieves this behavior by not adding a navigation hover timeout
if we are dragging a row (bookmark) in the sidebar.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2820
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nautilus fails critical assertions if the user opens then closes a
new window in rapid succession in a large folder.
This is because the GSource created by
nautilus_path_bar_set_templates_menu to bind menu model to popover is
not removed even if the pathbar has already been finalized by the user
closing the window.
Keep track of the source id and remove source if the pathbar is
being disposed of.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2867
|
|
|
|
|
|
|
| |
Otherwise, due to some modular arithmetic artifacts, there is an
unsightly 1px transparent line between the picture and its css border.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the current location is marked as gone, Nautilus jumps to the
first existing parent currently (except for non-native locations and
mount roots). This is fine in most cases, but not for autofs locations
as Nautilus jumps to parent everytime autofs mount timeouted. It would
be better to stay in the same folder in this case. Let's try the current
location first even if it is marked as gone to ensure that. It would be
perhaps even better to prevent autofs locations somehow from timeouting
at all, or avoid immediate remounting at least, but those solutions
don't look easy to implement.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1514
|
|
|
|
|
|
|
|
| |
When copying these classes from GTK the translation domain was kept.
This causes issues with translations in libadwaita widgets, so remove
them.
Fixes #2890
|
|
|
|
|
|
|
|
| |
Changes in GTK (https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442)
require to use `gtk_switch_set_active` to flip a switch, otherwise it
ends up in an inconsistent state.
Fixes #2883
|
|
|
|
|
| |
gtk_window_get_focus can return NULL. Passing that directly into
gtk_widget_is_ancestor throws a GLib warning, so handle it explicitly.
|
|
|
|
|
|
|
|
|
| |
The `G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE` attribute doesn't have to
be always set. The commit 0e597803 added the
`G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE` fallback inside the
`NautilusFile` class, but not for other places. Let's fix this oversight.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2862
|
|
|
|
|
|
|
|
|
| |
The `Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"`
warning is shown during build currently. This is caused by the usage
of the `G_TYPE_INSTANCE_GET_PRIVATE` macro. However, the statement with
this macro doesn't have any effect. This looks to be an oversight in
the commit 335eabec. Let's drop the whole statement to get rid of this
warning.
|
|
|
|
|
|
|
| |
The `‘action’ may be used uninitialized` warning is shown during build
currently. It can really happen that uninitialized value is used when
dropping something else then the `GDK_TYPE_FILE_LIST` and `G_TYPE_STRING`
on the tab bar. Let's initialize the action to prevent this.
|
|
|
|
|
|
|
| |
The `‘action’ may be used uninitialized` warning is shown during build
currently. It can really happen that uninitialized value is used when
dropping something else then `GDK_TYPE_FILE_LIST` on the pathbar. Let's
initialize the action to prevent this.
|
|
|
|
|
|
|
|
| |
Currently, the `ignoring return value of ‘g_string_free_and_steal’
declared with attribute ‘warn_unused_result’` warning is shown during
build. This is because the `str` struct member is used instead of a
return value from the `g_string_free` function. Let's update the code
to use the return value in order to avoid this warning.
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit c1c7ccb0e23772d8cfb509eb133d7e522706c697 as it
turned out that the workaround is still needed. I've only updated the
obsolete comment a bit. The issue was initially fixed by the
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4831 merge request,
but it has been broken later.
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/5670
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2844
|
|
|
|
|
|
|
|
| |
The `G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE` attribute doesn't have to
be always set. This case is not handled by the `NautilusSearchEngineSimple`
class and the `NULL` pointer can be passed in the `g_content_type_is_a`
function currently. This is an error. Let's check the returned pointer
to prevent this situation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is not guaranteed that all `GFileInfo` attributes are always set when
requested. They used to be silently set to `NULL`, `FALSE`, or `0` earlier
when they were not provided by their implementations. However, some of the
helper functions now print critical errors when the attributes are not set
by their implementations even though they were requested. See the
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3261 merge request for
more details. So Nautilus now prints tons of critical errors when started.
The unset attributes can be detected over the `g_file_info_has_attribute`
function. But Nautilus doesn't care in most cases about the reason why the
attribute is `NULL`, `FALSE`, or `0`. There are also more generic helper
functions that don't print these critical errors. Let's use them for the
attributes that may not always be set to get rid of those critical errors.
I suppose that the `name`, `display_name`, `size`, `icon`, and `file_type`
attributes don't need this special handling, although it is not clearly
stated anywhere...
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2861
|
|
|
|
|
|
|
|
| |
We are already caching the preferences for thumbnailing. Since the
clock format is queried for every single file when loading a list view,
we should also cache the clock format setting.
Rename the flag from use_24 to use_24_hour for more clarity.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In nautilus_file_class_init, we are calling
thumbnail_limit_changed_callback() and show_thumbnails_changed_callback()
in order to cache the initial values for the static variables
cached_thumbnail_limit and show_file_thumbs. This has the unintended
side effect of also calling emit_change_signals_for_all_files_in_all_directories ()
which doesn't make sense at a point in time when there are no
NautilusFile's and NautilusDirectory may not even be ready.
Split out the updating of the setting from the emission of
all files changed.
|
|
|
|
|
|
|
|
|
| |
I see regularly the following debug print on Nautilus startup:
`GLib-CRITICAL **: 10:52:52.992: g_hash_table_foreach: assertion
'hash_table != NULL' failed`. This is because the
`emit_change_signals_for_all_files_in_all_directories` function is called
before the `directories` hash table is initialzed. Let's return early
to prevent usage of the uninitialized hash table.
|
|
|
|
|
|
|
|
|
|
| |
Currently, the `g_bus_own_name_on_connection` function is called for the
`org.freedesktop.FileManager1` name before exporting the
`/org/freedesktop/FileManager1` skeleton. This seemingly works fine in most
cases, but occasionally the name is acquired too early and D-Bus clients
can get `No such interface` error. This is regression caused by the commit
2293e813d3cd1cc47b2b8750f7140647aa066fc8. Let's try to own the nam until
after exporting the skeleton to avoid this error.
|
|
|
|
|
|
| |
This reverts commit d45b820d4a082287ef52f538fc001009ad5204e1.
This commit causes a crash.
|