summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-04-04README: Add hello worldadding-hello-worldCarlos Soriano
The README was not welcoming enough Add hello world to the README Closes https://gitlab.gnome.org/GNOME/nautilus/issues/973
2019-03-19window-slot: Don't initialize extra widgets if content view is not yet setAndrea Azzarone
The signal 'trash-state-changed' could be emitted by NautilusTrashMonitor while a NautilusWindowSlot is still initializing the content view. In this case, don't show/hide extra location widgets to avoid deferencing invalid memory. They will be created anyway once the content view has been set. Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/890 Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/862
2019-03-18bookmark-list: Fix memory leakYi-Soo An
According to the documentation[1], GFileMonitor object must be freed when it is not necessary. g_file_monitor_cancel() doesn't free the object. [1]: https://developer.gnome.org/gio/stable/GFile.html#g-file-monitor-file
2019-03-18bookmark-list: Clean up codeYi-Soo An
Clean up do_finalize method to use NautilusBookmarkList object instead of casting to itself every lines.
2019-02-25canvas-container: Remove unused signalCarlos Soriano
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
2019-02-22search-engine-simple: Make some modifications to previous commitCarlos Soriano
* Cleaner separation of phases * Avoid some races * Fix some leaks
2019-02-22nautilus-search-engine-simple: Only spawn one idle each timeXiang Fan
To avoid clogging up the main loop.
2019-02-22Apply suggestion to src/nautilus-directory-async.cCarlos Soriano
2019-02-22nautilus-directory: Implement monitor list with hash tableXiang Fan
The original linked list can be O(n^2) (n = the number of files) in the worst case.
2019-02-22file: replace eel_ref_str with GRefStringJordan Petridis
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
2019-02-19nautilus-list-view: Clear selection and cursor in clear()Xiang Fan
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.
2019-02-19search-popover: Make search-popover modalGeorge Mocanu
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
2019-02-11properties-window: Logic for displaying Modified and Accessed timesTimothy OBrien
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
2019-02-11toolbar: Fix search button and search entry state desyncGeorge Mocanu
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
2019-02-11properties-window: Remove never set variablesBastien Nocera
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
2019-02-06toolbar: Improve menu actions discoverability and dispositionCarlos Soriano
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".
2019-02-05nautilus-canvas-container.c : Shorten Long Names in Last Row of Canvas ViewSumaid
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
2019-02-05toolbar: Improve pathbar discoverabilityCarlos Soriano
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
2019-02-04files-view: Use tracked directories for starCarlos Soriano
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.
2019-01-29nautilus-mime-actions.c: No Application Installed dialog not closed on ↵Timothy OBrien
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
2019-01-24nautilus-toolbar.ui: Improve the alignment with the HighContrast themeJordan Petridis
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.
2019-01-24nautilus-batch-rename: batch rename with long file namesTimothy OBrien
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
2019-01-23nautilus-batch-rename-dialog-menu.ui: Convert .ui files that use GMenu to a ↵Sumaid Syed
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
2019-01-22places-view: Update to latest gtk codeCarlos Soriano
2019-01-22gtk code: Update to the gtk-3-24 branchCarlos Soriano
Instead of using the old 3-32.
2019-01-22nautilus-canvas-dnd.c: destroy drag_info.selection_cache on drag_end_callback()Timothy OBrien
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
2019-01-22Add a script for updating gnome-desktop sourcesTimothy OBrien
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
2019-01-18gnome-desktop: update to latest version of upstream thumbnail codeTimothy OBrien
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
2019-01-14Adwaita.css: Sidebar Unmount Icon Color StyleTimothy OBrien
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
2019-01-14adwaita.css: Apply new style to path-bar DnD TargetsTimothy OBrien
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
2019-01-10Adwaita.css: Remove custom development stylingChristopher Davis
GTK now includes it's own styling for development versions, so Nautilus doesn't need to include it's own.
2019-01-04nautilus-pathbar.c: Rename path-bar class nameVaibhav Yadav
path-bar class name was clashing with the one in gtk. Hence renaming the same to nautilus-path-bar.
2019-01-02list-view: Align column title with cells textAntónio Fernandes
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/388
2018-12-16file: Initialize sort to order to defaultErnestas Kulik
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
2018-12-14main: Call g_set_prgname() with app IDErnestas Kulik
As per https://gnome.pages.gitlab.gnome.org/gtk/gtk/gtk-migrating-3-to-4.html#id-1.6.4.3.13.
2018-12-12query: Port MIME type filter to GPtrArrayAntónio Fernandes
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.
2018-12-12query: Drop unused ::add_mime_type() APIAntónio Fernandes
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.
2018-12-12general: Null-initialize some more auto variablesErnestas Kulik
2018-12-11file: Null-initialize autofree variableErnestas Kulik
2018-12-07file: Drop NAUTILUS_FILE_SORT_NONEAntónio Fernandes
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.
2018-12-07file: Centralize getting default sort orderAntónio Fernandes
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.
2018-12-07file: Sync sort types with settingsAntónio Fernandes
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
2018-12-05location-entry: Use event handler return value macros consistentlyErnestas Kulik
2018-12-05location-entry: Chain up to parent ::event handlerErnestas Kulik
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
2018-12-05location-entry: Do not attempt auto-completion on ESC pressesErnestas Kulik
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.
2018-11-30bookmark-list: Add an error handler of saving bookmark listYi-Soo An
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.
2018-11-30bookmark-list: Use G_FILE_MONITOR_NONE flagYi-Soo An
Using the enum makes developers understand it just by looking at it.
2018-11-27search-engine-recent: keep track of the running state using a booleanMarco Trevisan (Treviño)
We were using the cancellable to check if the engine was running, but let's make this more explicit using a specific variable
2018-11-27search-engine-recent: wait the search thread finish to change the run stateMarco Trevisan (Treviño)
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.
2018-11-27search-engine-recent: only do IO operations if name comparision matchesMarco Trevisan (Treviño)
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.