Re: Gtk 2.0 gtk_image_new_from_file trouble



Thanx!
It works!

> Hi,
> 
> peter orloff gmx de writes:
> 
> > I got the Hello World thing from gtk.org and compiled it and it worked
> fine.
> > Now I inserted the lines 
> > 
> >     GtkWidget *image;
> >     image = gtk_image_new_from_file 
> > ("/opt/kde2/share/doc/HTML/en/khelpcenter/lines.png");
> > 
> > and it compiled. But when i run the program then following errors occur:
> > 
> > (process:1112): GLib-GObject-CRITICAL **: 
> > gtype.c:1787:g_type_register_static(): initialization assertion failed,
> use 
> > g_type_init() prior to this function
> > 
> > (process:1112): GLib-GObject-CRITICAL **: 
> > gtype.c:1787:g_type_register_static(): initialization assertion failed,
> use 
> > g_type_init() prior to this function
> > 
> > (process:1112): Gtk-CRITICAL **: file gtktypeutils.c: line 40
> > (gtk_type_unique): 
> > assertion `GTK_TYPE_IS_OBJECT (parent_type)' failed
> > 
> > They repeat 4 times. The Program runs but with these errors.
> > What is it?
> 
> you are trying to execute GTK+ functions before calling gtk_init(). 
> Just move the call to gtk_image_new_from_file() after gtk_init().
> 
> 
> Salut, Sven
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




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