Re: dragging url to desktop is broken?



On Tue, Aug 26, 2008 at 4:10 AM, Nelson Benítez León
<nbenitezl gmail com> wrote:
> 2008/8/10 Christian Neumair <cneumair gnome org>
>>
>> Am Freitag, den 08.08.2008, 14:39 +0200 schrieb Nelson Benítez León:
>>
>>
>> >  I see two problems here, firstly being that GIO should be aware of my
>> > proxy settings to access internet, and secondly that DND'ing a url to
>> > the desktop shouldn't need  internet access at all, or should be
>> > optional.
>>
>> Good catch.
>>
>> When you drop a file, the MIME type of the source file is determined in
>> fm_directory_view_handle_netscape_url_drop(). It uses
>> g_file_query_info(), which does sync. I/O. Maybe the destination file
>> type should already be determined during drag, rather than afterwards,
>> and using NautilusFile. This allows us to show a "link" icon instead of
>> a question mark when dragging a HTML link that points to a web page.
>
> I've been looking at fm_directory_view_handle_netscape_url_drop function, I
> think we just have to do a fast,blind link to whatever url the user is
> dropping in the Desktop, not attending at its mimetype (have to access
> internet to fetch it) nor its extension (there are too many extensions to
> take care e.g. php,asp,) and there are also pages with no extension (like
> digg.com)..
>

I feel like the MIMETYPE is useful when you have internet access,
because if you are DnDing a file link (mp3, tar.gz, image), you almost
certainly want to get the downloaded file and not a link to it. On the
other hand html/php/asp et cetera should probably create links.

Why not create a link then do an async call to determine mimetype and
correct behavior? Without internet this fails and you are left with a
link.

> We could make that if SHIFT is pressed when dropping then we ask the user if
> it wants to download it instead.
>

I really think download should be the default behavior for appropriate
mimetypes. A beginning user dragging images, mp3s, and tarballs like I
previously mentioned is going to be expecting the file to be
downloaded, not a link to them (they already have that link...they
just dragged it!)

Though a keyboard modifier to only link instead makes sense, such as
SHIFT like you said. That way if you know what you are doing and want
to specifically link instead of download you can use that.

- Mike


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