Re: pixmap and gdk warnings.
- From: Havoc Pennington <hp redhat com>
- To: David Robin <david robin st com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: pixmap and gdk warnings.
- Date: 20 Jun 2001 16:51:01 -0400
David Robin <david robin st com> writes:
In the about window of my app, i print a pixmap in a dialog widget. With this code, mainly sourced from the
gtk
tutorial:
GdkPixmap *gdkpix = gdk_pixmap_create_from_xpm_d( dialog->window, NULL, NULL, (gchar**) xpm );
GtkWidget *pixmap = gtk_pixmap_new( gdkpix, NULL);
During execution, the pic prints in dialog widget with no graphical error, but i get this message in the
console
(i.e. stderr):
Gdk-WARNING **: Creating pixmap from xpm with NULL window and colormap
How can I get ride of this? I tried to pass non-NULL mask and style widgets, but the message stays.
You have to pass non-NULL for the window or the colormap, not the mask
and style.
Anyhow, the easiest thing is to use gtk_widget_get_colormap() on say
the widget you will put the GtkPixmap into.
I think you want gdk_pixmap_colormap_create_from_xpm_d() instead of
gdk_pixmap_create_from_xpm_d().
Anyway, in GTK 2 it all goes away, just
gdk_pixbuf_new_from_xpm_data(xpm_data).
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]