summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mime-actions: Use more obvious nameCarlos Soriano2018-09-261-4/+4
| | | | | I'm not gonna say how much of the day I spent on this code because I read it the other way around because of the misleading function name.
* search-engine: Query file system to determine remotenessErnestas Kulik2018-09-254-16/+36
| | | | | | | | | | | Querying the file cache in is_recursive_search() does not guarantee that the file system field will be populated with a value, and somehow results in data races, in turn resulting in random crashes/file list corruption. Hopefully fixes https://gitlab.gnome.org/GNOME/nautilus/issues/640, closes https://gitlab.gnome.org/GNOME/nautilus/issues/632 and resolves https://gitlab.gnome.org/GNOME/nautilus/issues/602
* general: Fix some leaks catched by ValgrindCarlos Soriano2018-09-242-3/+5
| | | | | This is by just opening and closing the app, we will definitely have more by regular usage...
* list_view: Fix key events regressionAntónio Fernandes2018-09-231-4/+1
| | | | | | | | | | | | | Since f692a93d, the left/right keys do not expand/collapse trees. Also, the [Spacebar] key opens the file instead of previewing it. This is because we return earlier when we get a state field. This is a typo, because it should be the reverse. But actually, it is safe to assume it is always TRUE, because at this point we got a keval field already. So, skip the condition checking. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/639
* mime-actions: fix unhandled type dialog contentChristopher Hargarten2018-09-211-2/+7
| | | | | | | | | | | The 'Could not display' dialog, is, admittedly pretty ugly. The line break in the secondary text is tough to read through, and, YES/NO button actions aren't apparent to the user. This commit removes the linebreak in the secondary text and gives the buttons relevant names for the user. https://gitlab.gnome.org/GNOME/nautilus/issues/583
* mime-actions: fix unhandled type dialog headerChristopher Hargarten2018-09-201-1/+1
| | | | | | | | | | | The 'Could not display' dialog is, admittedly, pretty ugly. It's not properly capitalized, and, full stops do come across as rude to the user. This properly cases & removes the full stop from the unhandled type dialog header. https://gitlab.gnome.org/GNOME/nautilus/issues/583
* tests: don't require installed gsettings schemas for nautilus testJeremy Bicha2018-09-191-0/+3
|
* Adwaita: Use variant-agnostic stylingAntónio Fernandes2018-09-141-4/+4
| | | | | | | | | | | | | We use unsaturated selection style for sidebar rows to make it grab less attention. Since we use the light variant of Adwaita, we do this by making the colors darker using the shade() CSS color expression. However, this assumption breaks if the dark variant is explicitly set in Tweaks. While nautilus is not developed for the dark variant, this commit makes it work by deriving shading from other theme colors instead. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/630
* monitor: Remove unused variableYi-Soo An2018-09-101-3/+1
|
* main: Remove leftover xmp_init()Chris Mayo2018-09-061-3/+0
| | | | Use of exempi was removed in 23eacd3155.
* places-view: Override newly-added interface propertiesErnestas Kulik2018-08-291-0/+20
| | | | | Otherwise we’ll keep getting warnings about it, and when NautilusWindowSlot tries to add a binding to those.
* progress-info: Remove cast from g_clear_pointer()Ernestas Kulik2018-08-291-1/+1
| | | | It’s superfluous and now causes GLib to throw warnings.
* Revert "Search filter popover on [Ctrl]+[F]"António Fernandes2018-08-293-42/+3
| | | | | | | | | | | | | | | | | | | This reverts commit 543f5ae369213f90238466e6366a0d2e09260e05. When this feature was originally proposed, the use cases when <Ctrl><F> is required because "just typing" doesn't do the trick were not considered. Two such cases are searching for a ~ (tilde) and pasting text to search with <Ctrl><V>. Both are now impractical because the filter popover steals the focus. Furthermore, we have a few inconsistent state bugs related to this. Instead of shipping version 3.30 with these regressions and bugs, let's withdraw this change. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/597 Closes https://gitlab.gnome.org/GNOME/nautilus/issues/570 And closes https://gitlab.gnome.org/GNOME/nautilus/issues/571
* preferences-window: Avoid ulgy 2px auraAntónio Fernandes2018-08-281-0/+6
| | | | | | | | | | | | | | | | Glade has been used to change the .ui definition of the Preference dialog in commit f2061e94093a33072e792181433b0618bf68d1b2 It has removed the "border-width" property, resulting in a 2px padding being added around the notebook widget, which wasn not intended and looks bad. This issue will be gone in GTK+4, but we need to explicitly set this style property to 0px in the meantime. Do it in the code instead, where Glade cannot erase it. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/563
* preferences-window.ui: Restore accessible rolesAntónio Fernandes2018-08-281-4/+54
| | | | | | | | | | | These were introduced in 8c9203d6a8fa5622c739261c5c59bd56c9c7f0f6 However, due to a bug in Glade 3.22, they were lost when saving and, as a result, removed since commit f2061e94093a33072e792181433b0618bf68d1b2 Restore these roles. Also, fix wrong label-for/labelled-by relationship. https://gitlab.gnome.org/GNOME/nautilus/issues/563
* files-view: Fix clearance of the wrong propertyAntónio Fernandes2018-08-281-8/+2
| | | | | | | | | We are clearing &priv->extensions_background_menu when we actually want to set priv->templates_menu. This looks like an edition overight from 544c1cca5692c5dc81a14ce8176b197f671c966c Fix it. Also, remove != NULL guards because g_clear_object already handles that case (doing nothing, as per documentation).
* pathbar-context-menu: Make "Add to Bookmarks" workAntónio Fernandes2018-08-281-1/+1
| | | | | | | | It was bound to an inexisting action. Just bind it to the same action as the <Ctrl><D> shortcut. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/552
* pathbar-context-menu: Don't show Star/UnstarAntónio Fernandes2018-08-281-10/+1
| | | | | | | | | | | These actions are applying to the selected files, not the current folder. Also, if fixed to apply to the current location, they overlap with "Add to Bookmarks" in intent, making it hard for a person to decide. Since we can't Star all location, favor "Add to Bookmarks" for now. https://gitlab.gnome.org/GNOME/nautilus/issues/552
* Undo/redo, search tests, test library and moreAlexandru Fazakas2018-08-286-58/+164
|
* pathbar: Show trash iconYi-Soo An2018-08-271-0/+12
| | | | | | | | | | | Currently the pathbar in trash shows a slash instead of the trash icon at the start. It could cause a misunderstanding of where users are now. To fix this issue, it shows the icon. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/567
* trash-monitor: Add a symbolic icon getterYi-Soo An2018-08-272-1/+18
| | | | | The symbolic icon of the trash is used somewhere. To provide an access to it, this getter is added.
* toolbar.ui:Fix keyboard access to buttonsCarlo Lobrano2018-08-261-3/+3
| | | | | | | | | | Currently back_button, forward_button and app_button (hamburger button) are not accessible via keyboard. This commit fixes this changing the property `can_focus` from False to True for the above mentioned buttons. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/569
* search-directory-file: Drop g_type_class_add_private()Ernestas Kulik2018-08-262-37/+14
| | | | One of the simpler offenders to fix.
* pathbar: Make type finalErnestas Kulik2018-08-262-207/+124
| | | | | There is absolutely no reason for it to be derivable at this time, plus the extra typing is endlessly annoying.
* pathbar: Use gesture for context menusAntónio Fernandes2018-08-241-29/+61
| | | | | | | | | | | | | | | | | | | | Pathbar context menus for non-current location were reimplemented as popovers in commit ce3a5c721fdc9fab2179eb257f216c0757f4d920 However, since then, we listen to GtkWidget::button-press-event" instead of GtkButton::clicked. However, despite its name, the later is emited whenever the GtkButton is activated, including using the keyboard. As a result, we lost the ability to change location with the keyboard. Reversely, we gained the (undesirable) ability to change location whenever a mouse button is pressed, even if that gesture would not be handled by GtkButton. Example: when dragging to move the window. Instead, partially revert these changes and use a GtkGesture to popup context menus, like we already do for middle click. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/568 and https://gitlab.gnome.org/GNOME/nautilus/issues/588
* dbus-manager: Provide undo statusCarlos Soriano2018-08-181-2/+29
| | | | | This is interesting for the desktop icons integration, so it can hide the undo/redo menu items appropriately.
* pathbar: Dim separator slashesAntónio Fernandes2018-08-091-1/+5
| | | | | | | | Separator slash labels have the same color and opacity as folder name labels. This makes the path look too heavy. Instead, set the "dim-label" style class. This also improves their role as separators, by giving more focus to the folder's names.
* css: Add background color to path-bar-boxAntónio Fernandes2018-08-091-1/+4
| | | | | | | | The bare outline around the pathbar feels unfinished. So, fill the area with the theme's background color. Related to https://gitlab.gnome.org/GNOME/nautilus/issues/548
* toolbar: Remove pathbar border on small windowsAntónio Fernandes2018-08-093-1/+32
| | | | | | | | | | | | The border is necessary for the centered look in wide windows. However, in small windows, it's only visual noise. So, show borders only when the window is wide enough for the pathbar container to grow to the maximum width. Also, remove the margin after the search button, which looks weird now. Related to https://gitlab.gnome.org/GNOME/nautilus/issues/548
* container-max-width: Add width-maximized propertyAntónio Fernandes2018-08-092-2/+81
| | | | | | | It may be useful when we want to change look or behavior depending on whether the container has grown to maximum width. The next commit will make use of this.
* file-undo-operations: Get rid of g_type_class_add_private()Ernestas Kulik2018-08-092-652/+472
|
* dbus-manager: Fix not holding applicationCarlos Soriano2018-08-081-0/+4
| | | | | The code was releasing it on the callback but forgot to put the hold on the initial call.
* dbus-manager: Fix double freeCarlos Soriano2018-08-081-3/+3
| | | | | nautilus_undo_manager_get doesn't return a new reference, so we shouldn't use g_autoptr.
* dbus: Implement move operationCarlos Soriano2018-08-081-4/+31
| | | | Analog to the copy operation.
* dbus-manager: Drop copy file operationCarlos Soriano2018-08-073-86/+0
| | | | | | | | | It was truly unreliable and not working clearly. We have a more powerful and simpler API with CopyURIs, so there is no point to have this one. This commits drops the DBus API. Note that the DBus version is not bumped, I believe this DBus API is not used by any external service given how broken was it.
* dbus-manager: Keep application alive for operationsCarlos Soriano2018-08-071-3/+52
| | | | | | | | | | | Operations started from Nautilus windows have the persistence handler, however, when not using windows like when invoked through DBus the application could die after a timeout. This would stop the operation in the middle of its process, with possible data loss. Make sure we keep the application alive while this is happening.
* properties-window: Keep alive properties window if called through DBusCarlos Soriano2018-08-076-38/+103
| | | | | | | | | | | | | | The properties window can be used from within Nautilus, and therefore a dialog window makes sense, or from outside Nautilus, such as the FileManager dbus free desktop standard. In the later, used for integration with things like desktop icons extensions, we need to keep the application alive since GApplication would close the application if no application window is alive after a timeout. To fix this, this work makes the window hint a regular window if used from those cases.
* file-operations: Don't crash if source file not present on creationCarlos Soriano2018-08-071-19/+17
| | | | | | | | | | | | | | When creating a file it was checking if the file already exists, and if so it tried to give a new name based on the original file that was being duplicated from which is the case for the regular copy/paste and the template creation. However, creating a file is not only about duplicating from another one, it also can come from creating a folder, that although in the UI it prevents doing so, it can still be done through the dbus operation. Fix that by checking whether there is an actual source file, and if not, use the name provided as base name.
* dbus-manager: Use a more robust copy operationCarlos Soriano2018-08-071-9/+4
| | | | | | We were using the copy_file operation which seems to be quite buggy, Nautilus should probably drop that one soon, specially since no other part of Nautilus uses it.
* dbus-manager: Implement undo/redoCarlos Soriano2018-08-071-0/+35
| | | | For the integration with the desktop icons extension.
* dbus-manager: Implement creation of new foldersCarlos Soriano2018-08-071-0/+26
| | | | For the integration with the desktop icons extension.
* dbus-manager: Implement trashing filesCarlos Soriano2018-08-071-0/+24
| | | | So desktop icons extension can use it.
* clipboard: Fix commentErnestas Kulik2018-08-031-1/+1
| | | What.
* clipboard: Prevent crash when selection data is emptyErnestas Kulik2018-08-021-7/+13
| | | | | | | | | Somehow, magically, it can happen that the clipboard contains an empty string, which wreaks havoc in convert_selection_data_to_str_list(), since the loop counter goes from 0 to the number of lines in the data string minus one. This commit adds a check for the number of lines and returns early. Additionally, this introduces automatic cleanup for a variable and fixes mismatched types.
* window-slot: Go home instead of closing slot on failureErnestas Kulik2018-08-022-5/+28
| | | | | | | | | | Currently, the window slot is closed if there happens to be a failure while changing location. Additionally, that causes a crash in Mutter on Wayland, likely due to very unfortunate timing of opening a transient dialog and closing the window. The issue can be fixed by going home, instead, when there is an error. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/562
* file-utilities: Deduplicate max filename querying codeAntónio Fernandes2018-08-026-98/+73
| | | | | | | | | | | A method to query maximum filename length has been introduced by commit a5520fd8930910ffa686232f3fc92325fe47c64e However, Ernestas has noticed that another implementation was already present in nautilus-file-operations.c This commit will replace both with a file-utilities function, which takes ideas from both implementations.
* file-name-widget: Warn when name exceeds size limitAntónio Fernandes2018-08-025-8/+42
| | | | | | | | | An warning for names exceeding the size limit has been introduced in 122f201dcf356460a30a7b260730bcfc7246a614 for the rename popover. This would be useful for the compress and new folder dialogs as well. So, make all file name widget derivatives share this feature.
* file-name-widget: Clarify logic in name_is_valid()António Fernandes2018-08-024-23/+49
| | | | | | | | | | | We rely on the presence of an error_message to decide whether the name is valid. However, this is misleading, because we can have an invalid name with no error_message (the empty name case), and we can have a valid name with an error_message (the dotfile case), requiring 2 early returns. Instead, use an explicit return variable.
* clipboard: Use text based clipboard onlyCarlos Soriano2018-08-025-154/+102
| | | | | | | | Now that we have better integration with the shell extension, and it simplifies regular clipboard handling. A nice feature is that now you can perform operations on GEdit or any other text editor by writing the correct commands :D
* css: pathbar hover touchupsJakub Steiner2018-07-301-1/+1
| | | | | | - get rid of whitespace between border and the folder. https://gitlab.gnome.org/GNOME/nautilus/issues/548