After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771710 - 'New bookmark' button not withdrawn after unsuccessful dnd to 'Desktop' folder
'New bookmark' button not withdrawn after unsuccessful dnd to 'Desktop' folder
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.21.x
Other Linux
: Normal normal
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-20 12:27 UTC by Mohammed Sadiq
Modified: 2017-05-31 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Nautilus failed dnd to Desktop dir(video) (154.48 KB, video/webm)
2016-09-20 12:27 UTC, Mohammed Sadiq
  Details
window-slot: fix handles_location (1.57 KB, patch)
2017-04-12 19:48 UTC, Alexandru Pandelea
reviewed Details | Review
fix misuse of nautilus_file_is_desktop_directory (2.28 KB, patch)
2017-05-09 08:27 UTC, Alexandru Pandelea
committed Details | Review

Description Mohammed Sadiq 2016-09-20 12:27:32 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.
Comment 1 Alexandru Pandelea 2017-04-12 19:48:22 UTC
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.
Comment 2 Carlos Soriano 2017-04-20 16:03:00 UTC
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)
Comment 3 Carlos Soriano 2017-04-20 16:03:33 UTC
also not sure "physical folder" makes sense. Maybe you can say the actual desktop folder and the virtual desktop?
Comment 4 Alexandru Pandelea 2017-05-09 08:27:20 UTC
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.
Comment 5 Carlos Soriano 2017-05-30 18:50:10 UTC
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!
Comment 6 Alexandru Pandelea 2017-05-31 13:05:33 UTC
Attachment 351411 [details] pushed as 2d99bcf - fix misuse of nautilus_file_is_desktop_directory