summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* list-base: Ignore changing to the Directory in file_changedwip/corey/issue-1513Corey Berla2023-01-171-0/+8
| | | | | | | | | 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
* list-base: Fallback to add_files in file_changedCorey Berla2023-01-161-1/+12
| | | | | | | | | | 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
* general: Stop leaking NautilusViewItemCorey Berla2023-01-163-6/+8
| | | | | | | | | 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: Make item_ui a weak pointerCorey Berla2023-01-161-19/+2
| | | | | | | 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.
* star-cell: Remove unused variableCorey Berla2023-01-161-1/+0
|
* docs: Several improvements to docs siteCorey Berla2023-01-162-1/+278
| | | | | | | | * 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
* ci: Publish docs to nautilus pagesCorey Berla2023-01-162-0/+19
| | | | | | We are generating the docs, so lets make them accessible online. See: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/941
* ci: Docker image add dependencies to build nautilus for docsCorey Berla2023-01-161-0/+21
|
* ci: Docker image use uncrustify binaryCorey Berla2023-01-161-12/+2
| | | | | | As part of 42c195897c9e7cf9c80b01446466b4f535a354b2 uncrustify was being built from source to address a bug that is now fixed in the current release 0.75.
* ci: Remove old incorrect commandCorey Berla2023-01-161-1/+0
|
* build: Only generate docs when 'docs' option enabledCorey Berla2023-01-161-1/+1
| | | | | | | 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.
* docs: Fix ColumnProvider type in nautilus-columnCorey Berla2023-01-161-1/+1
|
* name-cell: Don't open on hover expander icon.António Fernandes2023-01-166-10/+40
| | | | | | | | | | | | 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.
* list-base: Setup cell hover controller separatelyAntónio Fernandes2023-01-154-1/+12
| | | | | | 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.
* list-view: Don't hide expander while loadingAntónio Fernandes2023-01-151-17/+19
| | | | | | | | 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
* list-view: Set focus when moving to parent in the treeAntónio Fernandes2023-01-153-6/+5
| | | | | | | 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.
* list-view: Actually make tree shortcuts workAntónio Fernandes2023-01-151-22/+42
| | | | | | | | | 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.
* view-model: Stop crashing on sort-directories-first changeAntónio Fernandes2023-01-141-3/+7
| | | | | | | | | | | | | 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.
* view-model: Remove moved item from old storeAntónio Fernandes2023-01-143-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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
* grid-cell: Set tooltip values using text, not markupAthul Iddya2023-01-131-1/+1
| | | | | | | | | | 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.
* application: Export FileManager1 iface from dbus_register vfuncOndrej Holy2023-01-133-38/+138
| | | | | | | | | | | 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
* Revert "freedesktop-dbus: Defer D-Bus property setting"Ondrej Holy2023-01-131-78/+3
| | | | | | | | | | | | 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.
* Revert "application: add common startup code"Ondrej Holy2023-01-132-27/+6
| | | | | | | 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.
* build: require libadwaita >= 1.3.alphaJeremy Bicha2023-01-121-1/+1
| | | | needed for adw_tab_bar_set_extra_drag_preload
* general: Fix style for updated version of uncrustifyCorey Berla2023-01-121-9/+9
| | | | | The updated version of uncrustify didn't like this style, the new style doesn't look great either.
* Update Turkish translationSabri Ünal2023-01-111-592/+605
|
* window: Reset actions when tab menu is closedCorey Berla2023-01-101-8/+8
| | | | | | | 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.
* gtkbookmarkmanager: Don't allow newlines in the bookmark labelCorey Berla2023-01-101-1/+2
| | | | | | | | | | | | | | | | | 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
* Post-release version bumpAntónio Fernandes2023-01-101-1/+1
|
* Release version 44.alpha44.alphaAntónio Fernandes2023-01-102-1/+41
|
* list-view: Reimplement Right/Left keys for tree expanderCorey Berla2023-01-101-1/+64
| | | | | | | | | | 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.
* list-view: Don't leak NautilusViewItemCorey Berla2023-01-101-2/+3
|
* list-view: Disconnect list-view-preferences from column_settingsCorey Berla2023-01-101-0/+3
| | | | | Noticed this when working on the previous commit. It doesn't seem to be causing problems now, but could in the future.
* list-view: Reload the view when tree expander setting is changedCorey Berla2023-01-101-3/+18
| | | | | We have to reload the view in order to show the expanders, so lets do it for the user.
* files-view: Wait to load expander subdirectory until all files loadedCorey Berla2023-01-101-1/+22
| | | | | 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.
* name-cell: Set loading_timeout_id to 0 in timeoutCorey Berla2023-01-101-0/+2
| | | | To prevent multiple clearing of the same handle
* view-model: Don't return non-existent items in get_items_from_filesCorey Berla2023-01-101-1/+4
| | | | | | Before 1a1f2b50778e03ac14bea7ee684bb9bddc563bc1 we only returned non-NULL items in get_items_from_files. Fix this regression that causes crashes in some situtations
* list-base: Reimplement get_selection_for_file_transferCorey Berla2023-01-101-7/+33
| | | | | | | | | | 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.
* list-view: Bind the number of children to hide-expanderCorey Berla2023-01-101-1/+47
| | | | | | 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.
* name-cell: Cleanup handler on_item_is_loading_changed()Corey Berla2023-01-101-9/+3
| | | | | The handler warns that NAUTILUS_IS_NAME_CELL fails. Clean up the handler to match others in the signal group.
* list-view: Check for NULL row in unbind_name_cell()Corey Berla2023-01-101-0/+5
| | | | | If we unexpanded a row, then the item would no longer be available. Return early
* list-view: Check if self is NULL before getting listbaseCorey Berla2023-01-101-1/+3
| | | | | | 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.
* list-view-item-ui: Show spinner while loading subfoldersAntónio Fernandes2023-01-105-0/+112
| | | | | The spinner is shown only after 1 second without the directory having finished loading, to avoid visual noise when directories loads quickly.
* list-view: Support expanding as a treeAntónio Fernandes2023-01-107-77/+262
| | | | Starred, Recent and Search still not supported due to bugs
* view-model: Expose row objects to the viewAntónio Fernandes2023-01-105-17/+26
| | | | | | | | | 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.
* view-model: Use GtkTreeViewModel internallyAntónio Fernandes2023-01-102-58/+199
| | | | | The view doesn't see any difference yet, but this prepares for tree expansion support later.
* view-model: Use GSortListModel internallyAntónio Fernandes2023-01-092-48/+43
| | | | | | | | | | | | 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...
* pathbar: Bring dnd code into nautilus-path-barCorey Berla2023-01-094-269/+163
| | | | | nautilus-window-slot-dnd was shared between the path-bar and the tabs, but now its only used for the pathbar, so lets simplify
* files-view: Use clipboard_clear_if_colliding_uris consistentlyCorey Berla2023-01-092-3/+5
| | | | | | | | | | | 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
* clipboard: Reimplement clipboard_clear_if_colliding_urisCorey Berla2023-01-093-27/+19
| | | | | This functions clears the clipboard if any of its contents becomes potentially invalid.