Re: GtkApplication and argc/arv



On Wed, 2011-03-02 at 10:07 +0000, Emmanuele Bassi wrote:
[snip]
> > Thanks for the suggestion, but why wouldn't you use the
> > GApplication::local_command_line vfunc for local command-line parsing?
> > http://library.gnome.org/devel/gio/unstable/GApplication.html#GApplicationClass.local-command-line
> 
> 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.
[snip]

That would be nice for us to recommend here,
  https://bugzilla.gnome.org/show_bug.cgi?id=643650
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:
  https://bugzilla.gnome.org/show_bug.cgi?id=643649


-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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