GNOME Bugzilla – Bug 771710
'New bookmark' button not withdrawn after unsuccessful dnd to 'Desktop' folder
Last modified: 2017-05-31 13:05:37 UTC
Created attachment 335928 [details] Nautilus failed dnd to Desktop dir(video) the 'New bookmark' button shown in sidebar on drag and drop is now withdrawn when an item is unsuccessfully dragged to 'Desktop' directory. The following error is logged in terminal emulator: ** (nautilus:4400): CRITICAL **: nautilus_file_list_call_when_ready: assertion 'file_list != NULL' failed Please see the attached screenshot in action.
Created attachment 349747 [details] [review] window-slot: fix handles_location 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 physical Desktop directory. To fix this, instead of checking if the location matches the physical dir, check if it matches the right uri.
Review of attachment 349747 [details] [review]: aha! I used it wrong for some cases! logic loosk good. Just one thing more, you will have to update the files-view uses acordingly (not all of them, only the ones that makes sense to be the desktp uri rather than the desktop folder)
also not sure "physical folder" makes sense. Maybe you can say the actual desktop folder and the virtual desktop?
Created attachment 351411 [details] [review] 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.
Review of attachment 351411 [details] [review]: Looks good, I cannot think now why I took so long to review this one... worries me that probably I had some reason, but so far looks good!
Attachment 351411 [details] pushed as 2d99bcf - fix misuse of nautilus_file_is_desktop_directory