org.gnu.gnome

Class Url


public class Url
extends Boxed

Method Summary

protected static boolean
gnome_url_show(String url, int[] error)
static boolean
show(String url)
This method displays the given URL in he appropriate viewer.

Method Details

gnome_url_show

protected static final boolean gnome_url_show(String url,
                                              int[] error)


show

public static boolean show(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