Re: [gtk-list] gtk--: Problem with Gtk_Pixmap!



Oliver Freyd <freyd@uni-muenster.de> writes:
> Now that I've upgraded to gtk+-0.99.4 and gtk--0.7.12 I have problems with
> pixmaps. I just  tried to mape a little pixmap button class, 
> so in it's creator I create a gdk_pixmap and then make a Gtk_Pixmap of it.
> 
> Only that 
>  
>   GtkWidget * widget =GTK_WIDGET(gtkobject);
>   pixmap = gdk_pixmap_create_from_xpm (widget->window, &mask,
>                                          &style->bg[GTK_STATE_NORMAL],
>                                          "3DRings.xpm");
> now gives a warning that "window!=NULL".

I've seen this problem already with 0.99.4...

I think last time we fixed it by adding the widget to container and showing it
before using the GTK_WIDGET(gtkobject)->window thingy... Guess gtk does not
create the window now anymore if it really dont need it.

I've been thinking of making extra method to Gtk_Pixmap() to help people
load xpm's, that has been constantly a problem and the current ways of
doing it are ugly :)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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