org.gnu.gnome
Class Url

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.gnome.Url

public class Url
extends org.gnu.glib.Struct


Constructor Summary
Url()
           
 
Method Summary
static boolean show(java.lang.String url)
          This method displays the given URL in he appropriate viewer.
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Url

public Url()
Method Detail

show

public static boolean show(java.lang.String url)
This method displays the given URL in he appropriate viewer. The appropriate viewer is user defined, according to these rules:

1. Extract the protocol from URL. This is defined as everything before the first colon

2. Check if the key /desktop/gnome/url-handlers/protocol-show exists in the gnome config database. If it does, use this as a command template. If it doesn't, check for the key /desktop/gnome/url-handlers/default-show, and if that doesn't exist fall back on the compiled in default.

3. Substitute the %s in the template with the URL.

4.Call GnomeExecute.shell, with the expanded command as the second argument.

Parameters:
url - The url.
Returns:
True if the url was shown. False if there was an error