summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* canvas-container: Remove unused signalCarlos Soriano2019-02-252-15/+0
| | | | | | | To be honest I don't know when it was used and where, but it's unused now. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/801
* search-engine-simple: Make some modifications to previous commitCarlos Soriano2019-02-221-69/+62
| | | | | | * Cleaner separation of phases * Avoid some races * Fix some leaks
* nautilus-search-engine-simple: Only spawn one idle each timeXiang Fan2019-02-221-23/+103
| | | | To avoid clogging up the main loop.
* Apply suggestion to src/nautilus-directory-async.cCarlos Soriano2019-02-221-1/+1
|
* nautilus-directory: Implement monitor list with hash tableXiang Fan2019-02-223-74/+187
| | | | | The original linked list can be O(n^2) (n = the number of files) in the worst case.
* file: replace eel_ref_str with GRefStringJordan Petridis2019-02-225-98/+88
| | | | | | | | | | | | | | | | | glib now offers a reference counted api. This allows us to replace a lot of legacy code and get rid of eel_ref_str. GRefString [1] is almost a drop-in replacement. nautilus-file-operations.c was indirectly depending upon eel/eel-string.h from nautilus-file-private.h and thus a new include was added. This bumps the minimum version of glib to 2.58 Close #781 https://gitlab.gnome.org/GNOME/nautilus/issues/781 [1] https://developer.gnome.org/glib/stable/glib-Reference-counted-strings.html
* nautilus-list-view: Clear selection and cursor in clear()Xiang Fan2019-02-191-0/+31
| | | | | | | | | | | | | | | | | | When the current cursor's row gets deleted, GTK will move the cursor to the next row, and when setting the cursor it also selects the new cursor's row, thereby triggering selection signals. The new cursor will soon be deleted again and the loop repeats. Since clear() removes all entries, those selections are useless but they take up most of the time in clear(). For example, when a search returns a large list, exiting from the search view would make nautilus hang. At the time simply removing the cursor solves the problem, but to be future-proof in case GTK does anything fancy with the current selection, this commit also removes the selection. Because GTK internally seeking the cursor takes time, only blocking the selection signal like everywhere else will not remove that overhead.
* search-popover: Make search-popover modalGeorge Mocanu2019-02-191-1/+1
| | | | | | | | | | | | Currently, the search popover is not dismissed when clicking outside. Clicking anywhere other than on popover should close the popover. This patch fixes this behaviour by making the search-popover modal. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/528
* properties-window: Logic for displaying Modified and Accessed timesTimothy OBrien2019-02-111-2/+17
| | | | | | | Modified times were not displaying when viewing directory properties. Added logic to show the Accessed and Modified fields at appropriate times when either files or folders are selected. Fixes #723
* toolbar: Fix search button and search entry state desyncGeorge Mocanu2019-02-112-1/+40
| | | | | | | | | | | Sometimes the search button and search entry state can get out of sync. This will lead to the need of pressing the search button twice to display the search entry again. This patch solves this behavior by binding the "searching" property between toolbar and window-slot. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/570
* properties-window: Remove never set variablesBastien Nocera2019-02-111-5/+2
| | | | | | The total_count and total_size struct members were read but never set. This has been the case since the original "multi-file" support was added for the size reporting in commit 70f0260
* toolbar: Improve menu actions discoverability and dispositionCarlos Soriano2019-02-062-115/+255
| | | | | | | | | | | | | | We have some background menu items available in the pathbar buttons such as "Select All" or "New Folder", however we decided to duplicate some of them into the hamburguer menu for better discoverability. Not sure if this is a long term plan, but for now it will fix the issue of discoverability of those actions. Since the hamburguer menu now mixes actions from different contexts, we can rearrange a few other menu items from the view menu to the hamburguer menu, specially those that are not related to the view like "show hidden files".
* nautilus-canvas-container.c : Shorten Long Names in Last Row of Canvas ViewSumaid2019-02-051-1/+1
| | | | | | | | | | | Files in last row in canvas view have thier full names names, even if name is very long. Attribute 'whole-text' is set to FALSE for last lines also. Follows setting text-ellipsis-limit. https://gitlab.gnome.org/GNOME/nautilus/issues/843
* toolbar: Improve pathbar discoverabilityCarlos Soriano2019-02-053-115/+242
| | | | | | | | | | | | | | | | | | For 3.30 Nautilus implemented a new path bar design that provided a the view background menu in the path bar labels that was usually unavailable in list view. While this is a good step forward, the discoverability of the path bar buttons was not good, users didn't figure out those are actual buttons and they can click in them. This work tries to fix that by buttinizing again the path bar, while matching better with the new gtk stylesheet. Changes are the style of the path bar buttons and adding a "New Folder" to the hamburguer menu. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/734
* files-view: Use tracked directories for starCarlos Soriano2019-02-047-12/+155
| | | | | | | | | | | | | | We were using the xdg directories to check whether we can star a file or not, since the star feature only works on directories that are tracked by tracker. Tracker is usually shipped in distributions tracking the xdg-directories, so we check that as a stop gap solution for 3.30 since we didn't have time to actually query what directories tracker is tracking and match that. This work makes it so that we show the star action on tracked directories.
* nautilus-mime-actions.c: No Application Installed dialog not closed on ↵Timothy OBrien2019-01-291-8/+0
| | | | | | | | | GTK_RESPONSE_YES The "There is no application installed for “foo” files. Do you want to search for an application to open this file?" dialog that appears when there is no application installed to open the specific file type is not closed after clicking Yes. Instead, it reopens again. This patch removes code that was causing the file to be activated after the user clicked Yes; relaunching the dialog. Resolves #842
* nautilus-toolbar.ui: Improve the alignment with the HighContrast themeJordan Petridis2019-01-241-44/+56
| | | | | | | | | | While adwaita takes care of centering the buttons and alignment, HighContrast doesn't and everything is misaligned and differently sized making the toolbar look horribly broken. This patch sets valignment for the affected widgets to center in order to fix that. It should not have any effect with to the current version of adwaita.
* nautilus-batch-rename: batch rename with long file namesTimothy OBrien2019-01-241-1/+4
| | | | | | | The batch rename dialog (NautilusBatchRenameDialog) is a fixed-size window. Therefore, ellipsized names and changes may become ambiguous to the user. This patch makes the dialog resizable so that the user can reveal the full file names. Fixes #819
* nautilus-batch-rename-dialog-menu.ui: Convert .ui files that use GMenu to a ↵Sumaid Syed2019-01-234-92/+103
| | | | | | | | | | | | | | separate file The UI file nautilus-batch-rename-dialog.ui uses GMenu. Glade currently does not support <menu> sections but UI files with <menu> sections need to be edited. Seperate Menu files into a different file nautilus-batch-rename-dialog-menu.ui. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/566
* places-view: Update to latest gtk codeCarlos Soriano2019-01-224-137/+72
|
* gtk code: Update to the gtk-3-24 branchCarlos Soriano2019-01-221-3/+3
| | | | Instead of using the old 3-32.
* nautilus-canvas-dnd.c: destroy drag_info.selection_cache on drag_end_callback()Timothy OBrien2019-01-221-0/+2
| | | | | | | When the user is dragging items between locations, a drag_info.selection_cache is initialized within drag_begin_callback(). However, unlike other caches, the drag_info.selection_cache is never destroyed by drag_end_callback() once the drag operation is complete. This patch frees the drag_info.selection_cache once the user drag action is complete. Fixes #787
* Add a script for updating gnome-desktop sourcesTimothy OBrien2019-01-221-0/+45
| | | | | | | Nautilus depends on thumbnail source code files from the gnome-desktop project. Therefore, when the upstream https://gitlab.gnome.org/GNOME/gnome-desktop project releases a new version of the files, they should be downloaded and merged into the nautilus project. The script downloads the latest gnome-desktop project files to the developer's local nautilus source folder so that the developer can commit the updated files to the nautilus project. Fixes: #839
* gnome-desktop: update to latest version of upstream thumbnail codeTimothy OBrien2019-01-182-6/+52
| | | | | | | The thumbnail code in gnome-desktop had recent bug fixes that needed to be carried across to the Nautilus implementation. Issues for the three related upstream fixes can be found at: https://gitlab.gnome.org/GNOME/gnome-desktop/issues/4 | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/89 | https://gitlab.gnome.org/GNOME/gnome-desktop/issues/87 This patch includes the latest thumbnail code from the gnome-desktop repository to include the fixes. Fixes #836
* Adwaita.css: Sidebar Unmount Icon Color StyleTimothy OBrien2019-01-141-0/+1
| | | | | The unmount icon for a device was displayed in inverted color when the device was selected in the sidebar. Applied styling to use the same theme color as other selected icons. Fixes #645
* adwaita.css: Apply new style to path-bar DnD TargetsTimothy OBrien2019-01-141-0/+2
| | | | | path-bar DnD targets were using the 'green border' style when targeted. This style is inconsistent with the 'solid bottom border' style of the other path-bar actions. This commit updates the target style to show a 'solid bottom border' in the theme's drop target color. Fixes #765
* Adwaita.css: Remove custom development stylingChristopher Davis2019-01-101-7/+0
| | | | | GTK now includes it's own styling for development versions, so Nautilus doesn't need to include it's own.
* nautilus-pathbar.c: Rename path-bar class nameVaibhav Yadav2019-01-042-4/+4
| | | | | | path-bar class name was clashing with the one in gtk. Hence renaming the same to nautilus-path-bar.
* list-view: Align column title with cells textAntónio Fernandes2019-01-021-1/+1
| | | Closes https://gitlab.gnome.org/GNOME/nautilus/issues/388
* file: Initialize sort to order to defaultErnestas Kulik2018-12-161-4/+15
| | | | | | | | | If get_attributes_for_default_sort_type() returns FALSE, nautilus_file_get_default_sort_type() will return garbage, as retval will remain uninitialized. This commit initializes it by default to the default GSettings value. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/794
* main: Call g_set_prgname() with app IDErnestas Kulik2018-12-141-1/+1
| | | | | As per https://gnome.pages.gitlab.gnome.org/gtk/gtk/gtk-migrating-3-to-4.html#id-1.6.4.3.13.
* query: Port MIME type filter to GPtrArrayAntónio Fernandes2018-12-129-49/+67
| | | | | | | | | | We have been using doubly-linked lists to store MIME type names strings. But this is not a great container for strings, and we are copying the lists multiple times. So, use GPtrArray instead. This avoids copies thanks to reference counting, and enables autocleanup thanks to built-in data freeing.
* query: Drop unused ::add_mime_type() APIAntónio Fernandes2018-12-122-12/+0
| | | | | | | Unused since cb7c77a8acf857c3bf16e73bc7beba4b9d09faac So, let's limit the MIME type filter API to a setter and a getters. This will allow porting to an immutable, refcounted GPtrArray next commit.
* general: Null-initialize some more auto variablesErnestas Kulik2018-12-121-1/+1
|
* file: Null-initialize autofree variableErnestas Kulik2018-12-111-1/+1
|
* file: Drop NAUTILUS_FILE_SORT_NONEAntónio Fernandes2018-12-074-22/+6
| | | | | | | | This was needed for manual layout, which was still used for handling desktop icons. Non-desktop views still have code to gracefully handle this value. With the refactoring from the last commit, we can finally drop this.
* file: Centralize getting default sort orderAntónio Fernandes2018-12-075-73/+33
| | | | | | | | | | | | nautilus_file_get_default_sort_type() has a misleading name. It doesn't actually get the default sort type for any folder, but only for certain special folders. For regular folders, the default comes from GSettings keys, but this is implemented in the views instead, with a lot of reduncant code. So, let's do that in nautilus_file_get_default_sort_type() directly, and clearly document it.
* file: Sync sort types with settingsAntónio Fernandes2018-12-071-7/+15
| | | | | | | | | | | | | | | | | | | The org.gnome.nautilus.preferences default-sort-order key is a currently hidden-from-UI preference that should be honored by all views, if no custom order is specified in the current location's metadata. However, for this to work, two enums must be kept in sync between the code and the schemas. This has not been happening since the introduction of the Starred files feature. To fix this, restore the sort order according to settings, and make starred take the place of trash-time, which is non-sensical as default for all folders. Forthermore, to prevent this from breaking again, add documentation to both enums. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/636
* location-entry: Use event handler return value macros consistentlyErnestas Kulik2018-12-051-1/+1
|
* location-entry: Chain up to parent ::event handlerErnestas Kulik2018-12-051-3/+4
| | | | | | | | Simply propagating the event if it’s not a key press causes the parent handler to not be invoked and things like activating entry icons will stop working. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/768
* location-entry: Do not attempt auto-completion on ESC pressesErnestas Kulik2018-12-051-0/+3
| | | | | | | Currently, if org.gnome.nautilus.preferences.always-use-location-entry is enabled, pressing Escape will be treated as if it would insert text and trigger auto-completion. This is inconsistent with when the location entry is conditionally visible.
* bookmark-list: Add an error handler of saving bookmark listYi-Soo An2018-11-301-1/+18
| | | | | | For arbitrary reasons, g_mkdir_with_parents can be failed. That could lead to an error that fails to replace contents of new bookmark list.
* bookmark-list: Use G_FILE_MONITOR_NONE flagYi-Soo An2018-11-301-1/+1
| | | | Using the enum makes developers understand it just by looking at it.
* search-engine-recent: keep track of the running state using a booleanMarco Trevisan (Treviño)2018-11-271-1/+6
| | | | | We were using the cancellable to check if the engine was running, but let's make this more explicit using a specific variable
* search-engine-recent: wait the search thread finish to change the run stateMarco Trevisan (Treviño)2018-11-271-5/+1
| | | | | | | | | | Don't unset the cancellable on stop and only consider its validity to check if the search engine is running, otherwise if we'd nullify the instance when the search thread is still running, we might end up in starting a new search, while the thread has still to return its values through the idle. Now, we rely only on the fact that the search thread will eventually join with main thread via search_thread_add_hits_idle to notify that the search is over.
* search-engine-recent: only do IO operations if name comparision matchesMarco Trevisan (Treviño)2018-11-271-22/+22
| | | | | | Avoid to do more expensive IO operations on a file if its name does not matches the query. Those computations are quicker than IO ops, thus better to delay them.
* search-engine-recent: use g_autoptr to manage self unref in idleMarco Trevisan (Treviño)2018-11-271-3/+1
| | | | Use the same pattern we're using in recent_thread_func
* search-engine-recent: use g_autoptr for GThreadMarco Trevisan (Treviño)2018-11-271-3/+1
|
* search-engine-recent: make sure we ref self before each idleMarco Trevisan (Treviño)2018-11-271-5/+6
| | | | | | | | | | Always ref self engine in case we fire a new search_add_hits_idle, otherwise we'll wrongly unref it in the idle callback. This happens when skipping the search engine because recursive search is not enabled. Similar thing was done in commit 3eecada7ad7db8d66be24cfc4ba6677e33c7d6e1, but that might have caused a leak in case an idle was already set up.
* freedesktop-dbus: Use g_autoptrYi-Soo An2018-11-231-8/+3
| | | | Use g_autoptr instead of manually freeing resources.