DragNDrop to an unopened folder (without springs) and a nice accessibility side-effect



problem:

Many times I grab a file to DnD without having the destination folder
already opened, so I have to drop it back where it came from, then open
the correct folder, then restart the DnD. 

It is natural to grab something before you know exactly where to put it,
since you can do it in real life, but stopping and restarting a DnD is a
waste of time and error prone (accidentally moving your file if you just
let go of the button).

solution:

There is a nice solution in MacOSX where a folder opens if you hover
over it, however such a method may be patented.

I have a different but equivalent solution, that as a side-effect makes
DnD easier to use for people with reduced manual dexterity, and is thus
a major accessibility win.

When the user holds a DnD for a certain period of time, perhaps 3
seconds, the drag object goes to a "Moving Clipboard" attached to the
mouse but offset a little, and the pointer reverts to its normal usage.
This allows users to navigate via nautilus as normal while retaining the
object on the "Moving Clipboard". When the user clicks on an empty space
in a opened window he is asked if he wants to paste the file.

As I mentioned this method also helps people who find it difficult to
hold a mouse button down for more than 3 seconds.

detail:

The signal handler for "drag-begin" starts a g_timeout for N seconds
(where N may be 3). If the "drag-end" signal fires first, it shuts down
the timer. If the timer goes off first, the timeout callback sets a
nautilus flag, draws the offset icon-on-clipboard on the cursor, calls
gtk_drag_finish as a failure, and finally calls nautilus's internal Copy
or Move code exactly as if the user had typed Ctrl-C/X himself (thus
converting a DnD in a souped up copy-and-paste).

If the user clicks on a opened nautilus window, nautilus checks the
flag, asks the user if he wants to paste the object in the "Movable
Clipboard" or forget it, then calls the internal code for Paste exactly
as if the user had type Ctrl-V himself.

problems: 

- N needs to be long enough to allow users to do normal DnD between two
opened windows, but short enough the user doesn't have to wait before he
can begin to navigate the destination.

- Behaviour should be in GTK.

conclusion:

If there is interest I will open a bug.

Cheers,
Ryan




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