Re: Another suggested libgnome API change
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Jonathan Blandford <jrb redhat com>
- Cc: Havoc Pennington <hp redhat com>, Maciej Stachowiak <mjs noisehavoc org>, gnome-2-0-list gnome org
- Subject: Re: Another suggested libgnome API change
- Date: Mon, 3 Sep 2001 16:29:50 -0700
On 03Sep2001 06:43PM (-0400), Jonathan Blandford wrote:
> Havoc Pennington <hp redhat com> writes:
>
> > Maciej Stachowiak <mjs noisehavoc org> writes:
> > > I'd like to add GError arguments to all the gnome-exec functions so
> > > they can be reimplemented in terms of g_spawn and give proper error
> > > reporting (instead of just 0 or -1).
> > >
> > > Apps will probably find it easier to port to GError-ized versions of
> > > these calls than g_spawn, but they may as well get decent error
> > > reporting and share implementation in the meantime.
> > >
> > > I can get the API-changing part of this done today (just add GError
> > > arguments) and the rest pretty quickly as well.
> > >
> > > Thoughts?
> > >
> >
> > If you're going to deprecate the gnome functions (which I think is a
> > good idea), I'd follow the general rule "never deprecate and break at
> > the same time." That makes people port their stuff twice, once on
> > initial "get it to compile" and once on "make it deprecation-clean."
> > GTK tries pretty hard to avoid doing this.
>
> I'd like to see some pretty heavy deprecation here, too. I don't see
> much use for this API beyond the run-in-terminal variant. If there's
> something here that is useful that isn't in gspawn, we need to add it.
> However, all I see is alternative APIs to the same basic functions.
>
Further discussion on IRC with Jonathan and George suggests the
following:
- Deprecate the whole current gnome-exec.h API.
- Add the following functions non-deprecated to gnome-exec.h; they
work with g_spawn-style NULL-terminated argv vectors and should allow
the whole range of current gnome-exec functionality with g_spawn.
char **gnome_prepend_terminal_to_argv (char **argv);
char **gnome_commandline_to_shell_argv (char *commandline);
char **gnome_commandline_to_terminal_argv (char *commandline);
char *gnome_argv_to_shell_quoted_commandline (char **argv);
- Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]