Re: Drag and drop from Nautilus to the panel
- From: Alexander Larsson <alexl redhat com>
- To: frank campusmatrix com
- Cc: Vincent Untz <vincent vuntz net>, Nautilus <nautilus-list gnome org>
- Subject: Re: Drag and drop from Nautilus to the panel
- Date: Wed, 15 Dec 2004 12:37:36 +0100
On Sun, 2004-12-05 at 20:13 -0800, Frank Worsley wrote:
> > > This should also work for other special URI schemes, such as sftp.
> > > However, I just made an sftp:// launcher and it didn't work. Not sure
> > > why that is.
> > The problem is that the data I get when dragging a sftp connection is
> > not the URI of the connection but x-nautilus-desktop:///GNOME.volume
> > (where GNOME is the display name of my connection). I could read the
> > keys in /desktop/gnome/connected_servers, but I think nautilus could be
> > more helpful here.
> Maybe it would be worthwhile to patch nautilus to include the actual
> volume information as the drag data when the user drags a volume?
Yes. The x-nautilus-desktop:// stuff is all internal, so no apps other
than nautilus can access it, and its internal stuff so you can't rely on
it staying as it is now.
What we should do is for volumes and drives, add an extra drag type you
can request that returns the GnomeVFSVolume/Drive id. That way you can
do whatever you want with it in the panel. Do you want to hack up
something like that? Check out drag_types in libnautilus-
Also, while on the topic of dnd and panel applets. I think we want to do
the trash applet a bit different. I got this idea from federico at
* Owen just gave me a good idea. You should be able to drag anything
from an application into the Nautilus trash to delete it. In particular,
you should be able to drag bookmarks from your file chooser into the
desktop-wide trash can to remove them — you have to hit the "Remove"
button right now. To make the trash can a generic trigger for deletions,
we just have to make it take in a data type of application/x-delete-me
with GDK_ACTION_MOVE; Nautilus will do nothing but ask the drag source
to delete its data. Your drag source will get a
GtkWidget::drag_data_delete signal, and you can do whatever is needed to
delete your object there.
Basically, both the nautilus desktop trash and the panel trash applet
should just accept drops of type application/x-delete-me, and the actual
trashing will be done by the dropping app (nautilus in this case). Its
easier for nautilus to do the trash, since it has authenticated to the
destination already. This also means that other apps can use the
trashcan. For instance, in gedit you could drag a selection onto the
trashcan to delete it. Want to work on this? It shouldn't be that much
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a world-famous vegetarian master criminal living undercover at Ringling
Bros. Circus. She's a green-fingered impetuous Valkyrie who hides her beauty
behind a pair of thick-framed spectacles. They fight crime!
] [Thread Prev