Re: ctree pixmap

Blowfish wrote:

i tried to put an icon to my ctree it works but i get this warning msg, how can i avoid that ?

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

here's my interface.c



pixmap = gdk_pixmap_create_from_xpm (effect_ctree->window, &mask, &style->bg[GTK_STATE_NORMAL], "pixmaps/effect.xpm");

node = gtk_ctree_insert_node (GTK_CTREE (effect_ctree), parent_node, NULL, text, 5, pixmap, mask,pixmap, mask,FALSE, FALSE);



Your widget (effect_ctree) is not realized when you call gdk_pixmap_create_from_xpm(). The easiest way to solve this is to use GDK_ROOT_WINDOW() macro to obtain GdkWindow
for sure (*note* this is OK only if you are using default colormap):
gdk_pixmap_create_from_xpm(GDK_ROOT_WINDOW(), ...)


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