Hello,
I have a problem when I run my GTK+ application
:
My function just create a pixmap in a frame.
The source of my function is :
void Affiche_Pixmap(GtkWidget
*top_level_window,struct struct_outil *outil)
{
// top_level_window is the widget of my
GTK_WINDOW_TOPLEVEL
// struct_outil is a structure for some of my
widget
GtkStyle *style;
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkWidget *my_pixmap;
style =
gtk_widget_get_style(top_level_window);
pixmap =
gdk_pixmap_create_from_xpm(top_level_window->window,&mask,&style->bg[GTK_STATE_NORMAL],
"./PIXMAPS/Machine.OK.xpm");
my_pixmap =
gtk_pixmap_new(pixmap,mask);
gtk_container_add (GTK_CONTAINER
(outil->bouton.image_frame), my_pixmap);
gtk_widget_show (my_pixmap);
}
I have no errors or warning at the
compil.
When I run my program, I can see the pixmap on the
screen, but there is a Warning in the console :
Gdk-WARNING **: Creating pixmap from xpm with NULL
window and colormap
This warning appears when executing the function
'gdk_pixmap_create_from_xpm'
My configuration is
[root gandalf cyril]# X -showconfig
XFCom_i810 Version 1.0.0 / X Window
System
(protocol Version 11, revision 0, vendor release
6300)
Release Date: October 13 1999
If the server is older than 6-12 months, or if your
card is newer
than the above date, look for a newer version
before reporting
problems. (see
http://support.intel.com)
Operating System: Linux 2.2.5-15 i686
[ELF]
Configured drivers:
SVGA: server for SVGA graphics adaptors (Patchlevel
0):
i810, i810-dc100, i810e, generic
[root gandalf cyril]# gtk-config
--version
1.2.6
What's wrong ?
I you have an idea,
Thanks,
Cyril Porte
|