From: Stephen W. <st...@ke...> - 2008-01-27 07:34:32
|
Janek Kozicki <jan...@wp...> wrote: > Hi, > > I was trying to modify Pager so that instead of default GTK > background it would have a background image. But I was unable to do > this. > > I tried adding this code in numerous places > > > GdkPixbuf *pixbuf; > gchar *file; > file = g_build_filename(app_dir, "bg.png", NULL); > pixbuf = gdk_pixbuf_new_from_file(file, NULL); > if (pixbuf) > { > printf("##1, loaded %s\n",file); > gdk_window_set_back_pixmap(GTK_WINDOW(toplevel),pixbuf,TRUE); gdk_window_set_back_pixmap(GTK_WINDOW(toplevel)->window,pixbuf,TRUE); > gdk_pixbuf_unref(pixbuf); > } > printf("##2\n"); > g_free(file); > > > sometimes I tried WNCK_PAGER(pager) instead of GTK_WINDOW(toplevel) > > I always got following output: > > > ##1, loaded /home/janek/usr/share/ROX/ROXapp/Pager/bg.png > (Pager:17190): Gdk-CRITICAL **: gdk_window_set_back_pixmap: assertion > `GDK_IS_WINDOW (window)' failed > ##2 > > > I think that above code is correct, but I'm putting it in the wrong > place, and gtkrc is having priority. > > > Can anybody help me with this? Wouldn't it be better to do it with an RC file? -- Stephen Watson http://www.kerofin.demon.co.uk/ If you read this on a mailing list, send any reply back to the list and not to me. Not even CC. I'm really glad that worked. Those would have been terrible last words. |