diff options
author | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2017-04-12 22:39:14 +0300 |
---|---|---|
committer | Alexandru Pandelea <alexandru.pandelea@gmail.com> | 2017-05-31 16:03:21 +0300 |
commit | 2d99bcf4bdfb9a56e74298a8b806515529cc5082 (patch) | |
tree | e58dd0169b531b28e9911e1657fc37df9bffb24c | |
parent | 9ab9de94b38ee2ad5d147de45073dde28542b1ef (diff) | |
download | nautilus-2d99bcf4bdfb9a56e74298a8b806515529cc5082.tar.gz |
fix misuse of nautilus_file_is_desktop_directory
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
-rw-r--r-- | src/nautilus-files-view.c | 2 | ||||
-rw-r--r-- | src/nautilus-window-slot.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 38f9d5c9e..b73ebbcdd 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -2015,7 +2015,7 @@ new_folder_dialog_controller_on_name_accepted (NautilusFileNameWidgetController parent_uri = nautilus_files_view_get_backing_uri (view); parent = nautilus_file_get_by_uri (parent_uri); - if (nautilus_file_is_desktop_directory (parent)) + if (eel_uri_is_desktop (parent_uri)) { position = context_menu_to_file_operation_position (view); } diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index b2035f20c..39d62297f 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -45,6 +45,7 @@ #include "nautilus-profile.h" #include <libnautilus-extension/nautilus-location-widget-provider.h> #include "nautilus-ui-utilities.h" +#include <eel/eel-vfs-extensions.h> enum { @@ -214,10 +215,13 @@ real_handles_location (NautilusWindowSlot *self, { NautilusFile *file; gboolean handles_location; + g_autofree char *uri = NULL; + + uri = g_file_get_uri(location); file = nautilus_file_get (location); handles_location = !nautilus_file_is_other_locations (file) && - !nautilus_file_is_desktop_directory (file); + !eel_uri_is_desktop (uri); nautilus_file_unref (file); return handles_location; |