GNOME Bugzilla – Bug 117873
Canceallable async url_show function
Last modified: 2006-08-11 16:02:31 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 :/
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);
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
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.
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
> 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.
Marking as a duplicate of bug 337002 since it has a patch. *** This bug has been marked as a duplicate of 337002 ***