Re: gtk_init() more than once?


murrayc t-online de (Murray Cumming) writes:

> Is it OK to call gtk_init() multiple times?

can't read the source? It boils down to:

  static gint gtk_initialized = FALSE;

  gtk_init (int *argc, char ***argv)
    gtk_init_check (argc, argv);

  gtk_init_check (int      *argc,
                  char   ***argv)
    if (gtk_initialized)
      return TRUE;

    /* do lots of stuff */

    gtk_initialized = TRUE;

that should answer your question. However it opens the new 
question why gtk_initialized is not declared as gboolean.
I think it should be.

Salut, Sven

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