Re: gnome_url_show proposal

On Tue, 2003-02-18 at 20:53, Frank Worsley wrote:
> 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.

I've replied to your bug with comments.

> 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:

Doesn't gnome-desktop depend on libgnome(ui)? If so, this would create
a circular dependency, and that is bad.

> - 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.

It is? GnomeDesktopItem stuff used to be in gnome-libs in 1.4. It was
part of the chop-shop routine that went through that to split up libs,
I thought.

> - 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?

I would refrain from using GnomeDesktop for now. I see no need to parse
desktop files inside of the gnome_url_show () stuff. Doing so has
potential security issues that should be dealt with and discussed first.
I don't see any need to change the current behavior of gnome_url_show,
for the time being, really. It works well enough and very few apps
support opening files from URIs anyway.

-- dobey

"So I gave up on that, and tried to install gstreamer. Get this. Their
 propose ``solution'' for distributing binaries on Red Hat systems? They
 point you at an RPM that installs apt, the Debian package system! Yeah,
 that's a good idea, I want to struggle with two competing packaging
 systems on my machine just to install a single app." -- jwz

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