Re: [PATCH] Allow to use move/copy/link operations on open folder (was: Re: [Usability] Interacting with open folders)

On Thu, 2005-02-10 at 20:11 +0100, Christian Neumair wrote:

> After applying this patch, you should be able to drag any focused
> folder's spatial window through it's location button located on the
> bottom left of the window. It will allow you to move, copy or link the
> dragged folder to any other folder, including the trash.

Hi Christian,

thanks for your patch - I agree that's a very useful feature.

A small issue:

+       gtk_drag_source_set (window->details->location_button,
+                            GDK_BUTTON1_MASK, 

You need to add GDK_BUTTON2_MASK here, to enable the middle click "ask"
dnd with the question-mark cursor.

And some bigger issues:

Open the computer location and try to copy it to the desktop by dragging
the location icon. You'll get an "Invalid URI" because you're trying to
copy a special URI which doesn't support it.

Now open computer and copy a disk drive with the drive icon to the
desktop. You'll get a copy of the .drive file which behaves like the
original thing in computer.
Try the same by dragging the location folder of the drive to the
desktop. Nautilus will copy the contents of the whole drive to the
desktop. One could argue that this is consistent with the fact that the
location button uses a generic folder icon (drive, computer etc). So it
behaves like a folder when manipulated.

But UI-wise I guess the right thing would be:
* Use the icon of the activating file as window icon and in the location
bar (instead of the generic folder)
* Make the drag operation act like you dragged the original spatial
object which lead to the construction of the window, not the actually
viewed file.

Unfortunately it looks like this requires some effort:
You'd have to store the activating file in the nautilus window, so that
you can use that uri instead of details->location when setting the drag
data. This involves extending the ActivateParameters and NautilusWindow
interfaces to support that additional parameter. Currently you lose the
information about the original activating file in
activate_activation_uri_ready_callback() where it retrieves the
activation uri and continues to work with that.

A compromise would be:
* Continue to use the generic folder in the location button for now.
* Extend nautilus_drag_selection_includes_special_link() to recognize
all the special uris as special and not just desktop ones (needs to be
done anyway, you can trigger the "Invalid URI" error without the patch,
* Live with the fact that everything behaves like a folder and that
dragging a disk window copies its content (and other corner cases with
links etc.). But again, perhaps that's what people expect anyway.


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