| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
When files are moved into and out of the trash, it causes
NautilusDirectory to emit a file_changed on the Directory itself.
Within list-base we don't care about changes to the directory itself
so silently ignore.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2063
|
|
|
|
|
|
|
|
|
|
| |
We assume that the item associated with the given file in file_changed
always exists. That assumption might fail, for example if renaming
"a" to ".a" and then attempting an undo operation. If the item
doesn't exist in the current model, simply fallback to add the
item.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1513
|
|
|
|
|
|
|
|
|
| |
We are still leaking NautilusViewItem in several places. Essentially
every NautilusViewItem (and thus every NautilusFile) ever created is
leaked. In list-base, the queue in real_add_files is freed, but not
the items themselves. Make sure to also free the results of
g_list_model_get_item() and our macro listitem_get_view_item which now
calls gtk_tree_list_row_get_item.
|
|
|
|
|
|
|
| |
view-item holds a reference for the cell and the cell holds a ref
to the item. In order to break this cycle, let's make item_ui
a weak pointer in view-item. The cell will get freed by the
list factory.
|
| |
|
|
|
|
|
|
|
|
| |
* Update gpl to match project
* Update authors to match about page (otherwise it says "unknown author")
* Update website so it doesn't show a blank site
* Add logo
* Add dependencies
|
|
|
|
|
|
| |
We are generating the docs, so lets make them accessible online.
See: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/941
|
| |
|
|
|
|
|
|
| |
As part of 42c195897c9e7cf9c80b01446466b4f535a354b2 uncrustify was being
built from source to address a bug that is now fixed in the current release
0.75.
|
| |
|
|
|
|
|
|
|
| |
We have a docs options, but we are generating the docs regardless
of if it is set. This was a regression in d47403bcede0f331c04c7fb28cec2583fed16724.
`gi_docgen.found()` is redundant because when 'docs' is set to true
gi_docgen is a requirement.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
GtkTreeExpander includes a built-in "expand on drag hover" feature.
But our own "open on drag hover" feature competes (and often wins)
over it, making it hard to reliably expand rows on hover without
opening the folder.
So, separate the content and the expander. Trigger "expand on drag
hover" only if over the expander, and "open on drag hover" only if
over the rest.
|
|
|
|
|
|
| |
No functional change in this commit, but this is going to make it
possible for each view to pick the areas which trigger the hover
timeout, to be done in the next commit.
|
|
|
|
|
|
|
|
| |
A property binding is unfit for our use case because directory
loading is async, so the expander arrow is temporarily hidden,
which is wrong and looks like a glitch.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2791
|
|
|
|
|
|
|
| |
When using the collapse shortcut (Left arrow in LTR locales), if the
row is already collapsed, we want to move to the parent row.
Currently we select the parent but don't move focus. Fix that.
|
|
|
|
|
|
|
|
|
| |
They have been set on the cell in commit 728bec15a184ae31225499297284f07027716110
But they don't work because the focus is never in the cell.
So, set them in the view instead, and trigger them in the capture phase
to prevent GtkListBase's cursor movement shortcuts taking priority.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Toggling sort directories first in list view causes a crash.
This is a regression in commit b9ac68eb6fb1f7aa5f815f9b15cd789758d62cba
gtk_sort_list_model_set_sorter() first unrefs the old sorter, then refs
the new sorter. The crash happens because the new sorter is the new
sorter. It gets destroyed by the unref, and therefore we crash when
trying to ref a destroyed object. (It's arguably a GTK API bug too.)
The solution (from our side) is for us to hold a temporary reference to
keep the object alive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an item is moved, we are still showing it in the old location as a
regression caused by commit 510a4202d25b82323a1307918b382aab603190eb
With the introduction of tree model, we maintain multiple list stores
(one for each TreeListRow when the TreeListRow is a directory) and the
item is associated with a directory store upon creation by checking
nautilus_file_get_parent(). When removing an item, we again find the
directory store to remove from, by checking directory_reverse_map for
the parent file.
But, when an item has been moved, the parent file is no longer the same
as when it was added. This means we try to remove the file from the new
parent instead of the old one.
Fortunately we already have a solution for this from the old list view:
NautilusFilesView.remove_file() gets passed the directory to remove the
file from. Let's use it instead of the current parent.
Heavily based on diagnosis and commit message from patch by Corey Berla
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2784
|
|
|
|
|
|
|
|
|
|
| |
Tooltips are not showing up for long file names that have Pango markup
characters. This is happening because the cell widget label is set using
`set_text`, but is retrieved in the `query-tooltip` signal handler using
`get_label`. While `get_label` can return Pango markup, it is not
guaranteed to return text with markup characters escaped. Avoid this
problem by fetching the file name from label and setting tooltip using
text.
|
|
|
|
|
|
|
|
|
|
|
| |
The `org/freedesktop/FileManager1` interface is not currently exported
from the `dbus_register` vfunc. This causes issues for projects (e.g.
desktop-icons extension) that want to use all the Nautilus intefaces
over the `org.gnome.Nautilus` connection. Let's use the already established
connection and export the `FileManager1` interface from the `dbus_register`
vfunc.
https://bugzilla.redhat.com/show_bug.cgi?id=2150894
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3014f69485a120bedf0eec5af441346a95fe27f7 and part of
the commit a1751d3d870c6cdc092f893755623c4ff20e1ef3. This extra handling
was needed because `NautilusFreedesktopDBus` methods might be called before
establishing its own D-Bus connection. The follow-up commit is going to use
the already established connection from the `dbus_register` vfunc. It
should be ensured that the `dbus_register` vfunc is called before the
`window_added`, `window_removed`, or `startup` vfunc. Consequently, this
extra handling is going to be redundant. Let's remove it as a preparation
for the next commit.
|
|
|
|
|
|
|
| |
This reverts commit 23ae53870a39afe43548111b6432db39511a6e97. This
change was needed for split of desktop-related functionality, but it
seems no more needed to me. Let's revert those changes to make the
code a bit easier as a preparation for the next commits.
|
|
|
|
| |
needed for adw_tab_bar_set_extra_drag_preload
|
|
|
|
|
| |
The updated version of uncrustify didn't like this style,
the new style doesn't look great either.
|
| |
|
|
|
|
|
|
|
| |
In some cases, an action that was disabled when opening the tab menu
might stay disabled when you close the tab menu because of an
early return. Make sure to reenable all of the actions when the
tab menu is closed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The gtk bookmark file stores bookmarks as follows:
<encoded file 1 uri> <file 1 label (optional)>
<encoded file 2 uri> <file 2 label (optional)>
...
File names (uri's) with newlines actually function "correctly" because
the newlines get encoded as %0A. The label however is not encoded
and it would be problematic to start encoding it at this point.
Since the sidebar entries should be 1 line anyways, let's just use
our existing eel_str_replace_substring() to change the newline to a
space.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1502
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Tree expander uses SHIFT+Right/Left because the right/left
keys may be used to switch focus between columns. We are just showing
labels, so there's no use for the Right / Left keys. Also,
Nautilus has special behavior for the left key when the folder
is already collapsed (or a file which cannot be expanded) where it
selects the parent folder (if available). Bring back this behavior
with GtkTreeExpander and improve it for RTL languages.
|
| |
|
|
|
|
|
| |
Noticed this when working on the previous commit. It doesn't seem
to be causing problems now, but could in the future.
|
|
|
|
|
| |
We have to reload the view in order to show the expanders, so
lets do it for the user.
|
|
|
|
|
| |
Now that we have a spinner on the name cell, let's wait for the directory
to be completely loaded before showing it, when expanding a tree.
|
|
|
|
| |
To prevent multiple clearing of the same handle
|
|
|
|
|
|
| |
Before 1a1f2b50778e03ac14bea7ee684bb9bddc563bc1 we only returned
non-NULL items in get_items_from_files. Fix this regression
that causes crashes in some situtations
|
|
|
|
|
|
|
|
|
|
| |
The code for get_selection_for_file_transfer was abstracted from
view_icon_controller which didn't account for the issues of selecting
files with tree expanders. Reimplement get_selection_for_file_transfer
to exclude children when the immediate parent is selected. As noted in
7ac81c87c84149b421a6869837deb852876e3d12 this is not a perfect solution
because other ancestors (i.e. grandparents) could be selected, but at least
it matches the behavior we had previously.
|
|
|
|
|
|
| |
Bind n_items in the children model to the hide-expander
property of TreeExpander in order to hide the expander icon
when the fold is empty.
|
|
|
|
|
| |
The handler warns that NAUTILUS_IS_NAME_CELL fails. Clean up
the handler to match others in the signal group.
|
|
|
|
|
| |
If we unexpanded a row, then the item would no longer be available.
Return early
|
|
|
|
|
|
| |
If the view is no longer available i.e. switched to the GridView,
this crashes. Simply move the call to nautilus_list_base_get_model()
after the NULL check.
|
|
|
|
|
| |
The spinner is shown only after 1 second without the directory having
finished loading, to avoid visual noise when directories loads quickly.
|
|
|
|
| |
Starred, Recent and Search still not supported due to bugs
|
|
|
|
|
|
|
|
|
| |
This is going to allow us to reuse the model for a GtkColumnView-based
list view with expanding trees support.
As documented, GtkTreeViewRow:item may be NULL when the item it held
is destroyed. So, we must take care to handle the NULL case when
expected and also warn and return when not expected.
|
|
|
|
|
| |
The view doesn't see any difference yet, but this prepares for
tree expansion support later.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a required step in order to use GtkTreeListModel later.
GtkTreeListModel doesn't work well when its internal models get
resorted: it assumes the items are gone, not reordered, causing
the row objects to get destroyed and the view to lose track of
things.
This might not be as efficient, but we've got no other option
other than implementing a custom tree list model...
|
|
|
|
|
| |
nautilus-window-slot-dnd was shared between the path-bar and the
tabs, but now its only used for the pathbar, so lets simplify
|
|
|
|
|
|
|
|
|
|
|
| |
We only call clipboard_clear_if_colliding_uris() from a dnd operation.
Previous to the gtk4 port, this was called from the
canvas view 2d1deaac2dd12b0ba16446bfbf3498b266e60338
and tree view 6708861ed174e2b2423df0500df9987cdaf2adc0
Also, we are calling nautilus_clipboard_clear_if_colliding_uris()
for any copy/move operation. Copy/Link don't negatively impact the
clipboard, so lets just call this on GDK_ACTION_MOVE
|
|
|
|
|
| |
This functions clears the clipboard if any of its contents becomes
potentially invalid.
|