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 533891 - Drag from file list and drop on file list changes the folder, but doesn't make sense
Drag from file list and drop on file list changes the folder, but doesn't mak...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.12.x
Other All
: Normal normal
: ---
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2008-05-19 16:48 UTC by Ivan Zlatev
Modified: 2008-05-27 20:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
gtk2-bgo533891-filechooser-file-list-dnd.diff (955 bytes, patch)
2008-05-27 20:41 UTC, Federico Mena Quintero
committed Details | Review

Description Ivan Zlatev 2008-05-19 16:48:36 UTC
Please describe the problem:
While dragging a folder or file visually initializes a drag operation with the file/folder as a "cursor", dropping doesn't do anything. So why have this visual indication at the first place?

Also one drags and drops a folder from the file chooser in the file chooser or cancels dragging with Escape the folder gets opened.


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Matthias Clasen 2008-05-20 17:05:34 UTC
dragging is supported for adding bookmarks (drag from file list to bookmarks pane) and dropping is supported for changing directory (e.g drag from nautilus to file list).

Escape seems to work correctly for me. 
Comment 2 Ivan Zlatev 2008-05-20 17:10:41 UTC
(In reply to comment #1)
> dragging is supported for adding bookmarks (drag from file list to bookmarks
> pane) and dropping is supported for changing directory (e.g drag from nautilus
> to file list).
> 

Ah I see. I assumed I should be able to drag and drop folders and files as well.

> Escape seems to work correctly for me. 
> 
So when you cancel a dragging operation of a folder with escape the file chooser doesn't end up opening that folder (listing its content)?

Comment 3 Matthias Clasen 2008-05-24 14:34:54 UTC
> So when you cancel a dragging operation of a folder with escape the file
> chooser doesn't end up opening that folder (listing its content)?

Not for me.
Comment 4 Federico Mena Quintero 2008-05-27 20:41:47 UTC
Created attachment 111627 [details] [review]
gtk2-bgo533891-filechooser-file-list-dnd.diff

This is the patch I've committed to trunk and gtk-2-12.

2008-05-27  Federico Mena Quintero  <federico@novell.com>

	http://bugzilla.gnome.org/show_bug.cgi?id=533891 - Don't allow
	drag and drop from the file list into itself, as it doesn't make
	sense (it would just change the current folder).

	* gtk/gtkfilechooserdefault.c (file_list_dest_targets): Use
	GTK_TARGET_OTHER_WIDGET so we don't DnD from the file list into
	itself.