Re: GtkApplication and argc/arv

On Wed, 2011-03-02 at 10:07 +0000, Emmanuele Bassi wrote:
> > Thanks for the suggestion, but why wouldn't you use the
> > GApplication::local_command_line vfunc for local command-line parsing?
> >
> if I a) don't want to sub-class GApplication and b) want to do local
> command line parsing, it's pretty trivial to use a GOptionContext and
> parse the command line prior to creating the GApplication.

That would be nice for us to recommend here,
but wouldn't that require us to call gtk_init() before
g_option_context_parse(), to first remove the "standard" options? Or we
could just call gtk_init_with_args().

Then I guess we could pass NULL, NULL to g_application_run() for
argc/argv, but this is one of the things that needs to be documented:

murrayc murrayc com

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