Re: Splash screen as widget
- From: jcupitt gmail com
- To: "George Brink" <siberianowl yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: Splash screen as widget
- Date: Thu, 12 Jun 2008 13:18:25 +0100
2008/6/11 George Brink <siberianowl yahoo com>:
> By the way, why splash screen is not in the default set of library widgets?
> I believe it is very common thing for almost all modern applications...
There's one in GNOME, but it's not been pushed down into GTK. There
was a discussion about it, I seem to remember, but I forget why it was
resisted.
The HIG says that your app should start up quickly enough that it
doesn't need a splash screen, which is good advice, if not always
possible. GIMP still has a splash widget, heh.
> That rises another question: Tutorial I read, suggests to use
> g_type_register_static() with GTypeInfo structure instead of
> gtk_type_unique() with GtkTypeInfo. Author of tutorial does not explain why
> he prefer g_type_register_static() over gtk_type_unique(). I guess, first
The type system used to be in GTK, but for gtk2.0 it was moved down a
layer into glib (as the gobject library).
So the modern, recommended way is g_type_register_static() and
gtk_type_unique() is now just a compatibility stub. You still see it
sometimes in code that's been ported from gtk-1.2.
>>> while(gtk_events_pending()) {
>>> gtk_main_iteration();
>>> }
>>
>> That's from a rather old tutorial, better to use:
>>
>> while( g_main_context_iteration( NULL, FALSE ) )
>> ;
>
> Why is that better? One is for gtk events only, other also works with glib
> events?
Same reason: the main loop used to be part of gtk, but in the 2.0
series it's been pushed down into glib and the gtk functions are just
compatibility stubs.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]