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:

>  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:
> >
> 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),
  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

murrayc murrayc com

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