gnome_url_show proposal



Hi all,

attached are some code samples outlining how I would like to
re-implement the gnome_url_show stuff as explained in bug 89742. Note that
is just draft code, I don't know if it compiles, I haven't even tried.

To get to the compilation part I need to add a GnomeVFS and
GnomeDesktopItem dependency to libgnome. GnomeVFS is pretty much a
requirement so that I can access the default application stuff. It also
provides a bunch of other functions that let you deal with URIs, etc.

GnomeDesktopItem is a little more controversial since it isn't really ment
to be a generic program launching facility and it would have to be moved
from gnome-desktop into libgnome. My rationale for using
GnomeDesktopItem is as follows:

- it already has robust and well tested code for dealing with exec
parameter expansion. The default app in GnomeVFS supports all of the exec
parameters defined in the desktop file standard, ie: %u, %U, %f, %F and
the others. Writing new code to do all this again would be some pretty bad
code duplication.

- it also supports nice launch parameters, namely _LAUNCH_APPEND_URIS and
_LAUNCH_APPEND_PATHS to deal with the case where there are no exec
parameters defined.

- it's currently in gnome-desktop which is a staging library, so moving it
to libgnome would actually be the correct evolutionary step.

- as mentioned above it has been well tested and a lot of bugs & corner
cases etc. have been dealt with.

As for the gnome_url_ functions I also want to add _show_with_app and
_show_with_app_and_env (or _show_with_app_env ?).

So, what do people think? Should I proceed along these lines or not use
GnomeDesktopItem?

- Frank





Attachment: gnome-url.c
Description: Binary data

Attachment: gnome-url.h
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]