summaryrefslogtreecommitdiff
path: root/src/nautilus-window-slot.c
Commit message (Collapse)AuthorAgeFilesLines
* window-slot: Prevent crashes caused by invalid pointersOndrej Holy2020-02-281-2/+2
| | | | | | | | | | | | | | Nautilus randomly crashes when g_object_bind_property is used to bind extensions-background-menu and templates-menu properties of NautilusFilesView and NautilusWindowSlot. Although, we don't have any reproducer, it seems that this is because NautilusWindowSlot uses g_object_ref when storing the property, but not g_object_unref, and NautilusFilesView does the opposite. It seems that NautilusFilesView can hold invalid references in certain cases because of that. The both objects should hold its own references to prevent this. Let's replace the custom codes by g_set_object to achive this behavior. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/813
* windows-slot: Handle CONNECTION_REFUSED error messageAthira Selvam2020-01-111-0/+9
| | | | | | | | | | | | When trying to connect to a machine in which server application is not installed or is inactive, nautilus shows a "Unhandled message error: Connection refused by server" message. The message is unhelpful, and there is no reason not to handle this case. So, handle the error and the give possible reasons for it. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/855
* window-slot: Change assert inside nautilus_window_slot_get_locationwhs2019-05-041-1/+1
| | | | Closes https://gitlab.gnome.org/GNOME/nautilus/issues/970
* window-slot: Use g_clear_object()Ernestas Kulik2019-04-051-2/+1
|
* window-slot: Don't initialize extra widgets if content view is not yet setAndrea Azzarone2019-03-191-1/+6
| | | | | | | | | | 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
* toolbar: Fix search button and search entry state desyncGeorge Mocanu2019-02-111-0/+6
| | | | | | | | | | | 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
* window-slot: Recreate trash bar for new filesErnestas Kulik2018-11-171-3/+10
| | | | | | | | Currently, the code only removes the bar when the trash monitor state changes to empty, but should also create it when files are freshly trashed. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/747
* meson.build: Enable -Werror=incompatible-pointer-typesErnestas Kulik2018-10-091-1/+1
|
* application: Check pending location on clone-windowErnestas Kulik2018-10-021-1/+12
| | | | | | | | | | Cloning the window while its location is null (i.e. the attributes of the pending location file are still being waited on) results in a failed assertion, which is less than desirable. That can be fixed by preemptively checking if there is a pending location on the slot and using that in the new window. Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/649
* window-slot: Focus view widget on search up or down arrow pressedCarlos Soriano2018-10-021-0/+25
| | | | | | | | | | | | | | | | This is a regression from 3.28, where the file items where being selected while searching if the user clicked either up or the down arrows. Since 3.30 we moved the query editor to the header bar, this automatic handling was lost. To fix it, do something similar as we do when activating the search, which is emitting a signal to inform the window slot and the views to perform an explicit action. In this case, we focus the views so further key events are handled by the views themselves and not by the query. Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/610
* Revert "Search filter popover on [Ctrl]+[F]"António Fernandes2018-08-291-29/+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
* window-slot: Go home instead of closing slot on failureErnestas Kulik2018-08-021-3/+24
| | | | | | | | | | 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
* shell: pass the full query to the slot to preserve all settingsMarco Trevisan (Treviño)2018-07-261-11/+8
| | | | | | | Instead of just opening a window with just the location and search terms, we should pass to the window slot the full nautilus query with all the shell search provider flags, so that they will be respected and that the results in the overview will respect the ones in nautilus
* nautilus-query-editor: set query recursive option as it isMarco Trevisan (Treviño)2018-07-261-2/+2
| | | | | | Just use settings_search_get_recursive_for_location to prompt to the user what's going to happen, although this might not be 100% certain, if a sub-dir is actually a network-mounted folder.
* query: Add flags for recursive search typesMarco Trevisan (Treviño)2018-07-261-2/+2
| | | | | | | | | | | | | Use a list of cases to define when the recursive search should be done, instead of a simple true/false boolean. A part from the self-explanatory cases `ALWAYS` and `NEVER`, the `IF_INDEXED` option permits to any search engine that uses an indexed-search to return results from subfolders of the search location. One case we want to address, is the shell-search provider, that should not perform recursive searches, but it could return values from subfolders of the user home if the search is executed by search engines like tracker.
* pathbar: Extend button menu with extensions and templatesCarlos Soriano2018-07-191-1/+124
| | | | | | | | | | | | One of the benefits of the new menu on the path bar buttons is that we show the background menu. This was the intended design since the start, but we didn't come to finalize it earlier on. Now with the 3.30 approaching, this work implements that. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/405
* window-slot: Free bindings on disposeCarlos Soriano2018-07-191-0/+2
| | | | We were leaking them.
* general: Provide search information on the view itselfCarlos Soriano2018-07-141-0/+86
| | | | | | | | | | | | | With the new search bar design, the search information displayed under they query editor was not working properly. Instead, the new design says that the information should be displayed in the view itself, as a top banner. This work implements the new design and fixes several issues of sizing due to the wrong position of the search information label. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/403
* window-slot: Disconnect from nautilus_preferencesCarlos Soriano2018-07-141-0/+2
| | | | Seems we forgot to do this on the past, it can cause crashes.
* window-slot: Remove obsolete searchbar styleCarlos Soriano2018-07-141-2/+0
| | | | With the new design this was not used, remove it.
* window: Use GdkEvent accessorsErnestas Kulik2018-05-281-4/+14
|
* Search filter popover on [Ctrl]+[F]andrei-stratila2018-05-181-3/+29
| | | | | | | | | | | | | | Currently using the [Ctrl]+[F] keyboard shortcut toggles the search bar visibility. Using the [Ctrl]+[F] keyboard shortcut shows the search filter popover (and gives it keyboard focus). To add this a new action "search-visible-popover" is added which in addition to the "search-visible" action adds the feature to focus and show the search dropdown menu. https://gitlab.gnome.org/GNOME/nautilus/issues/333
* general: Clean up headers and their inclusionsErnestas Kulik2018-05-181-2/+3
| | | | | | | This commit removes redundant header inclusions and tries to optimize headers by using forward declarations of types in headers. Such optimization should generally make builds speedier in that changes in certain headers will not cause unrelated sources to be rebuilt.
* file: Remove link info attributeAntónio Fernandes2018-05-141-3/+1
| | | | Leftovers from NautilusLink removal.
* general: Add actions to the toolbarCarlos Soriano2018-05-031-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Generally actions in Nautilus were accessed through context menus or keyboard shorcuts. However, those are not very discoverable and are not touch friendly. Even more, in list view it was not possible to access background actions since there is always a selection, making Nautilus UX quite poor in that case. Also some actions were placed in the app menu, which didn't was not as clear for some people given that we have most of actions in the toolbar. In all, we came with a new design that solves the main goals of discoverability, touch friendly and accessibility for background actions and app actions, and now are placed in the toolbar together with an overhaul of the looks of Nautilus path bar and search. There is still work to do, specifically finding a design that works for the selection actions and also to replace the current information floating bar. The later might be just a different goal. However this goes in the right direction. See https://gitlab.gnome.org/GNOME/nautilus/issues/322
* window-slot: Keep query editor ownership on the window-slotCarlos Soriano2018-05-031-1/+9
| | | | So it stays alive between uses.
* window-slot: Use properties for signaling active changesCarlos Soriano2018-05-031-65/+22
| | | | | | | We were using properties and signals, but properties have already built-in signals with notify:: for properties changes. Use that so we have a simple and single way to notify about changes.
* views: Proxy the view main values and statesCarlos Soriano2018-05-031-6/+88
| | | | | | So they can be accessed easily from outside the view or window-slot. This is useful for preventing layer violation, as we had in the past.
* Change show_error_dialog() to show_dialog()George Mocanu2018-04-231-1/+1
| | | | | Changed show_error_dialog() to show_dialog() so that multiple dialog types can be used.
* Revert "Merge remote-tracking branch 'upstream/master'"Carlos Soriano2018-04-231-1/+1
| | | This reverts commit 1f4bd55d1b9d5f701f2df8d1be7466df85a8669a
* Change show_error_dialog() to show_dialog()George Mocanu2018-04-231-1/+1
| | | | | Changed show_error_dialog() to show_dialog() so that multiple dialog types can be used.
* window-slot: Clear pending_selection after freeing itMarco Trevisan (Treviño)2018-04-201-5/+1
| | | | | | | This might not be the case when handling archive files, in fact we were freeing the list and assigning it to a new value for non-archive files, but in case of archives the list was just freed and the invalid pointer kept around, potentially causing a later crash.
* window-slot: Instantly apply "Use new views" preferenceAlexandru Fazakas2018-04-071-6/+31
| | | | | | | | | | | | | The use new views preference checkbox does not update the view. In order for it to take effect, one needs to toggle view. This behaviour is not intended, and this should work same as for other checkbox preferences. We're fixing this by recreating the view whenever the preference box is ticked/unticked. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/278
* window-slot: Don’t show query editor with no viewErnestas Kulik2018-03-191-2/+4
| | | | | Since the view can be null at the time the user is pressing keys, doing anything with it may lead to a crash.
* window-slot: move object dereferencing to dispose()Ernestas Kulik2018-03-161-23/+19
| | | | | | | | Generally, references to other objects should be dropped in dispose(). This is doubly important with widgets, as some get finalized before out finalize() override. Closes https://gitlab.gnome.org/GNOME/nautilus/issues/305
* window-slot: Move object cleanup to finalizeMarco Trevisan (Treviño)2018-03-131-18/+19
|
* nautilus-window-slot: clear and unset window action group on disposeMarco Trevisan (Treviño)2018-03-131-1/+6
|
* general: don’t mix code with declarationsErnestas Kulik2018-03-011-5/+4
| | | | | While not technically relevant anymore, we’re continuing to use that style.
* files-view: Avoid leaking selection list and dataAlexandru Fazakas2018-02-271-13/+8
| | | | | | | | | | | | | | Sometimes, while working with the files_view_get_selection function, the freeing is not done properly. We leak a lot of objects as of this and we need a way to fix it. To avoid leaking, we implemented g_autoptr support for NautilusFile in order to have at our disposal automatic, deep cleanup whenever we use the function. In this patch, we changed all calls to use g_autolist appropriately and bumped the glib dependency up to 2.55.1 (in order for us to use g_autolist). Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/226
* general: Run uncrustifyCarlos Soriano2018-02-131-3/+3
|
* general: refactor extension libraryErnestas Kulik2018-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | The changes include: * adding a single-include header and deprecating nautilus-extension-types.h and direct inclusions of individual headers; * type definition simplifications - this causes some breakages in nautilus-file, because NautilusFile used to be typedefed to NautilusFileInfo, and that is no longer possible, so the interface implementation was moved to static functions and the public NautilusFile API provides thin wrappers for them to maintain compatibility; * documentation cleanups and reorganization; * general build rule and code cleanups: mostly g_auto* sprinkled around and style changes (sorry)
* general: remove desktop supportErnestas Kulik2018-01-021-2/+1
|
* window-slot: hide search bar on ESC pressesErnestas Kulik2017-08-231-0/+12
| | | | | | This supposedly regressed after some version of Nautilus. https://bugzilla.gnome.org/show_bug.cgi?id=685120
* general: Add mime type support for archivesCarlos Soriano2017-08-091-1/+31
| | | | | | | | | | | | | | | Until now archives were managed only if activated from Nautilus itself and if a setting was set. There are two main problems with this. 1- Archives opened in other apps cannot be handled by Nautilus 2- Users cannot use the regular mime type handling for setting Nautilus as the app handling archives, or unsetting it. This patch add support for archives mime types handled by gnome-autoar and removes the UI and setting used in the previous version. https://bugzilla.gnome.org/show_bug.cgi?id=771424
* window-slot: Remove obsolete commentCarlos Soriano2017-08-091-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=771424
* window-slot: check location before constructing tab restore dataErnestas Kulik2017-08-071-0/+5
| | | | | | | | Assuming that the location cannot be null can leads to crashes in cases when the user is trying to open non-existent locations, e.g. broken bookmarks. https://bugzilla.gnome.org/show_bug.cgi?id=785317
* fix misuse of nautilus_file_is_desktop_directoryAlexandru Pandelea2017-05-311-1/+5
| | | | | | | | | | | | | | | The issue is that when navigating into the Desktop directory, the slot is replaced with a desktop window slot. This happens because when checking if the current location is handled by the current slot, the check was made for the actual Desktop directory instead for the virtual Desktop. To fix this, instead of checking if the location matches the actual dir, check if it matches the right uri. A similar issue was in files-view when creating a new folder, so also change that accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=771710
* add "restore tab" actionAlexandru Pandelea2017-05-311-1/+51
| | | | | | | | | | | Adds option to reopen closed tabs with Ctrl+Shift+T. In order to do so, keep a list with data needed to restore closed tabs. So, this list keeps the location bookmark, the view id before search, which is needed in case the closed tab was a search and the back/forward history. https://bugzilla.gnome.org/show_bug.cgi?id=561136
* window-slot: fix activate on search entryAlexandru Pandelea2017-05-021-2/+0
| | | | | | | | | | | | | | | | | | | | | The issue is that when pressing enter in search while the search entry has the focus, right after the callback to activate the selection is called, Nautilus also tries to activate the location corresponding to the base of the search, as the view is still searching. This occurs because in the activated signal the search is set as not visible manually, which will make Nautilus check immediatly if it should go back to the base of the search location, without waiting for the view to update. To fix this, don't set the search as not visible in the activated callback, as when the search-mode-enabled property changes, if necessarry, the cancel signal will be emitted which will set the search as not visible, which will happen only after the view is updated. This is the behavior for activating the selection in other ways, so activation with focus on the entry should behave the same. https://bugzilla.gnome.org/show_bug.cgi?id=764981
* window-slot: Don't use eel to show a dialogKartikeya Sharma2017-03-081-2/+3
| | | | | | | | | | | | Most of the things in eel are already in glib, or are already easy enough to have them directly in the code. So we should remove eel which is just another layer of abstraction that we don't need as it makes it hard to follow the code. This patch replaces eel_show_error_dialog with show_error_dialog to make it independent of eel. https://bugzilla.gnome.org/show_bug.cgi?id=775092