Re: [PATCH] - Add drag drop of bookmarks to places sidebar



On Mon, 2005-07-11 at 02:01 +0100, Jamie McCracken wrote:
> Jamie McCracken wrote:
> > Attached is patch to allow drag drop of folder uris to blank rows in the 
> > places sidebar.
> > 
> > Also added some ints to sidebar for later use.
> > 
> > 
> 
> Updated this to include :
> 
> - highlights row when dragging
> - copies files when dropped onto exisitng place
> - added volume/bookmark pointer to list store for forthcoming popup menu

You need to handle drag modifiers so you can e.g. move a file into a
folder instead of copying it. It should behave identical to the normal
file dnd wrt default operation etc.

Use gtk_drag_source_add_uri_targets and gtk_selection_data_get_uris
instead of doing this manually.

I don't like the name "user data" for something that only contains
volumes. It would be better to just call it volumes. That way you can
correctly own the volume to, and don't have to use the unref_volumes
hack before gtk_list_store_clear and other places.

+is_uri_directory (const char *uri)

This doesn't actually work in all cases, because we might not know
anything about the file for that uri. In the case where you're dragging
from the same window/app it will work, but not in general. You need to
use nautilus_file_call_when_ready() with the
NAUTILUS_FILE_ATTRIBUTE_IS_DIRECTORY attribute.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a bookish alcoholic assassin fleeing from a secret government programme. 
She's a time-travelling mute stripper with someone else's memories. They fight 
crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]