org.gnu.gnome

Class Url


public class Url
extends Struct

Method Summary

static boolean
show(String url)
Deprecated. Superceeded by java-gnome 4.0; this method may or may not exist in the new bindings but if it does, it will likely have a different name or signature in order that the presented API is a more algorithmic mapping of the underlying native libraries.

Method Details

show

public static boolean show(String url)

Deprecated. Superceeded by java-gnome 4.0; this method may or may not exist in the new bindings but if it does, it will likely have a different name or signature in order that the presented API is a more algorithmic mapping of the underlying native libraries.

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