Re: Another suggested libgnome API change

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.

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.

Still, the main porting work here is handling the GError correctly,
not rearranging the command line args for gspawn's benefit. If you're
going to fix your code to handle the error, why not just port to


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