Re: GtkApplication



Hi,

On Fri, Jun 4, 2010 at 12:50 PM, Matthias Clasen
<matthias clasen gmail com> wrote:
>
>  app = g_object_new (GTK_TYPE_APPLICATION, "appid", appid, NULL);
>  g_application_register (app, argc, argv, gtk_application_get_platform_data ());
>

A convenience API that took the likely parameters and initialized a
global singleton would be nice.

gtk_application_init("org.foo.Bar", argc, argv);

To do special/extra stuff you could either do:

gtk_application_init(...)
application = gtk_application_get()

or you could create the application yourself if you wanted to have two
of them or something.

There might also be some more elaborate convenience functions, such as
init_with_builder() or something, not sure what is right, but at least
one that did all "recommended stuff for a typical app"

Anyway it'd be nice to avoid a bunch of boilerplate that every app has
to type in.

As mentioned on the bug I kinda like the convenience API to allow a
callback which handles both first launch and subsequent activations.

Havoc


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