GnomeURIEntry



Hi,

I've noticed that, while there are widgets to select local files
(GtkFileSelection and GnomeFileEntry), there is no widget to enter
URIs. GNOME-VFS--enabled programs must currently use either a simple
GtkEntry or a GnomeEntry to let the user enter a location.

I think it would be nice if there were a GnomeURIEntry widget that is
tailored to have the user enter both local and remote URIs. It would
be derived from GnomeFileEntry and offer these additional features:

- show local files selected via "Browse..." button as file: URIs to
  give the user a hint that the entry will accept URIs, not just file
  names

- accept URI drops from all relevant sources (Nautilus, major Web
  browsers, maybe other GnomeURIEntry widgets)

- have a URI drag source to the left of the entry maybe? Would be
  another hint that the entry accepts URIs

- do history autocompletion

- maybe support some kind of global Bookmarks/Favorites system, which
  we'll probably have some day (?)

- offer Web-browser-like heuristics to complete incomplete URIs, i.e.
  if we can't stat() it as a local path and the part before the first
  slash looks like a FTP host name, prepend "ftp://";, in other
  cases prepend "http://";; if it seems like the domain name is
  without a host name, guess it's "www." etc. etc.

- expose the currently selected URI through two different properties,
  something like "uri" (type GnomeVFSURI*) and "uri-string" (type
  gchararray)

- have an "enable-browse" boolean property (defaults to TRUE); if
  FALSE, the entry wouldn't show a browse button and work essentially
  like a Web browser's URL line -- use this for entries where people
  will hardly ever enter a local file, e.g. in an "Add RDF source"
  requester

All kinds of applications that support URIs through GNOME-VFS could
use GnomeURIEntry in place of GnomeFileEntry.

There could also be a dialog widget GnomeURISelection derived from
GtkFileSelection -- essentially a file selector with abovementioned
additional URI functionality added in so it will select URIs and not
just files. I reckon the latter would be a stopgap as we'll have a
nice new GNOME file selector Real Soon Now (they're working on it in
libegg, aren't they?), which will probably also turn out URIs and not
just local path strings.

As soon as the dust has settled on my book, I'll have free time to
work on this myself... I'd just like to know whether you, too, think
GnomeURIEntry (and, possibly, GnomeURISelection) would make sense. 


Thank you,

mawa
-- 
Diskettenbeschrifter!
Draußenraucher!
Drittelliterflaschen-Trinker!
Dampfbügler!
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers



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