Re: GtkApplication and argc/arv



On Thu, 2011-02-24 at 17:51 -0500, Colin Walters wrote:
> > 1.
> > Are we still meant to call gtk_init(&argc, &argv) when using
> > GtkApplication, which takes argc/argv again via g_application_run(). Or
> > is gtk_init() then superfluous?
> 
> gtk_init is superfluous, yes;

I guess we should mention GtkApplication here then:
http://library.gnome.org/devel/gtk3/stable/gtk3-General.html#gtk-init

>  it's handled in the startup phase of
> GtkApplication.

Do you mean, during g_application_run(), or earlier?

> > Mathias mentioned that gtk_init(NULL, NULL) is best anyway, though I
> > don't understand why:
> >  http://bugzilla.gnome.org/show_bug.cgi?id=639925#c3
> 
> It doesn't really do anything interesting or useful; you can achieve everything
> with environment variables

But don't (bearded) people expect applications to take (GNU?) standard
command line options, such as --display=DISPLAY?

If we really think people should do this:
  gtk_init(NULL, NULL),
or
  g_application_run(NULL, NULL),
then surely we should say so in the documentation. I don't like the
vagueness right now.

The documentation currently doesn't even say that NULLs are valid
values:
http://library.gnome.org/devel/gtk3/stable/gtk3-General.html#gtk-init
http://library.gnome.org/devel/gio/unstable/GApplication.html#g-application-run


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



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