Re: Another suggested libgnome API change

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.

> It would have been easier to port to gspawn if I'd added a couple
> macros Elliot suggested, basically the equivalent of
> command_line_async() that took an argv instead of a command line - but
> I forgot to add them.

Something like?
#define g_spawn_async_simple(char **argv, error) \
        g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, error)

Can I add it?


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