After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 117873 - Canceallable async url_show function
Canceallable async url_show function
Status: RESOLVED DUPLICATE of bug 337002
Product: gnome-vfs
Classification: Deprecated
Component: URI handling
cvs (head)
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-20 00:41 UTC by Dave Bordoley [Not Reading Bug Mail]
Modified: 2006-08-11 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dave Bordoley [Not Reading Bug Mail] 2003-07-20 00:41:08 UTC
I'm splitting this off of bug 117869.

It would be useful to have an async canceallable url_show style function.

Basically an application could call this function and popup a dialog if it
takes more than 5 seconds to sniff the mime-type and show the url in an
app. This dialog would be a information dialog informing the user that the
url is being loaded and provide a cancel button to stop the operation,
however since the function would be async the app wouldn't block
interaction within itself as currently happens when url_show blocks.

Sorry to describe this in terms of ui, but its the only way I can really :/
Comment 1 Dave Bordoley [Not Reading Bug Mail] 2003-07-22 04:08:49 UTC
teuf,

What do you think of an api like this? If you think its ok, I might
even try to get it working for OpenApplet and than port it to
gnome-vfs for 2.6.

typedef void 		(*GnomeVFSAsyncShowUrlCallback)
					(GnomeVFSResult		result,
				 	 gpointer		callback_data);

GnomeVFSAsyncHandle 	*gnome_vfs_async_show_url 		(const char   			 *url,
								 GnomeVFSAsyncShowUrlCallback	  callback,
								 gpointer			  callback_data);

GnomeVFSAsyncHandle 	*gnome_vfs_async_show_url_with_env	(const
char   			 *url,
								 char				**envp,
								 GnomeVFSAsyncShowUrlCallback	  callback,
								 gpointer			  callback_data);
Comment 2 Christophe Fergeau 2003-07-22 07:21:46 UTC
This feels like API bloat... Once again, I prefer to wait until alex
returns, and discuss that problem with him first. From the user point
of view, if I enter something in your Open Applet, and then have to
wait 5 or 10 seconds until an application shows up, I'll fill
something  is borked even if the UI is still responsive
Comment 3 Dave Bordoley [Not Reading Bug Mail] 2003-07-22 14:19:10 UTC
WEll the advantage of the async api (not necessarily the one above but
you know something) would be that even if it took 5-10 seconds to get
a mime_type for a file, a user could still use the applet/application
and the application could give feedback to the user in the form of a
dialog that something is happening. In fact the reason I had the
function returing the handle was so a user could choose to cancel the
operation by clicking cancel or stop in a loading dialog.

But yeah lets wait for alex's comments.
Comment 4 Christophe Fergeau 2003-07-22 15:21:27 UTC
Yeah, I understand that, but try to imagine a user reaction:

"Yay, this open applet rock, let's go to www.google.com using it"

A dialog pop up "I'm trying to fiind out which application to launch,
stay tuned"

"hey what the f**k is this stupid computer doing ? Why does it need so
long to launch a stupid browser. Next time I'll directly launch the
browser, that will save some time"

And an async api not launching the associated app immediately would
lead to nothing but confusion in evo or gnomechat (at least as long as
gnome_vfs_url_show does not support startup notification).

These are the reasons why I feel an async api doesn't sound right for
gnome_vfs_url_show
Comment 5 Dave Bordoley [Not Reading Bug Mail] 2003-07-22 16:04:39 UTC
> A dialog pop up "I'm trying to fiind out which application to launch,
> stay tuned"

More likely would say "Loading such and such a web address" etc.

> "hey what the f**k is this stupid computer doing ? Why does it need so
> long to launch a stupid browser. Next time I'll directly launch the
> browser, that will save some time"

Well users on dialup realize that loading web pages might take awhile.
That said i'd only popup a dialog if an operation took more than
around 5 seconds.
Comment 6 Christian Neumair 2006-08-11 16:02:31 UTC
Marking as a duplicate of bug 337002 since it has a patch.

*** This bug has been marked as a duplicate of 337002 ***