Creating pixmaps from xpm data



Hi folks,

I'm creating some pixmaps from xpm data, using
gdk_pixmap_create_from_xpm_d.

An example of the code is: 

style = gtk_widget_get_style (window);
mypixmap = gdk_pixmap_create_from_xpm_d (window->window, &mask_2,
                                    &style->bg[GTK_STATE_NORMAL],
                                          (gchar **) xpm_2_word);

This works up to a point.

The problem I'm having is that I want to create these pixmaps, pack
them into containers, show them, then show the main window. However,
if I do this, I get a load of:

Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap

Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap

Spewing out when the program is run. I do not want this.

I know why this is, it is because at this point, the window has not
been shown. If I show the window first, then all the warnings go away,
but the drawing is visible to the user, and I want it smooooooth.

How do I fix this dilemna? Can I grab some kind of default/system colormap?

Tom.
-- 
            .-------------------------------------------------------.
    .^.     | Tom Gilbert, England | tom@tomgilbert.freeserve.co.uk |
    /V\     |----------------------| www.tomgilbert.freeserve.co.uk |
   // \\    | Sites I recommend:   `--------------------------------|
  /(   )\   | www.freshmeat.net www.enlightenment.org www.gnome.org |
   ^^-^^    `-------------------------------------------------------'



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