On Mon, Feb 13, 2006 at 12:31:42PM -0600, lance dillon wrote:
This was in response to Martin's code (the following):
object iconwin = GTK.Window( GTK.WINDOW_TOPLEVEL ) ->realize() ->set_title("icon")->add(GTK.Vbox(0,0)->pack_start(GTK.Pixmap(GDK.Pixmap(GDK.Image(0,Image.PNG.decode(Stdio.read_file(rc/pike/gtk/shutdown.png"))))),0,0,0))->get_gdkwindow()->set_icon(GDK.Pixmap(GDK.Image(0,Image.PNG.decode(Stdio.read_file(rc/pike/gtk/shutdown.png")))));
It works as in the reply to Martin, that is, splitting the function calls up. I didn't investigate further, so I don't know how far you have to split the function calls, but I split it all the way.
So, I read in the png file separately, created a bitmap and a pixmap separately, and then created the GTK.Pixmap from the GDK.Pixmap and GDK.Bitmap, then used the GDK.Pixmap and GDK.Bitmap for the set_icon() function, and it worked.
actually, the splitting up is not what makes it work, but adding a GDK.Bitmap is. i don't do that in my code. (because the docs don't explain how or why that would be needed)
greetings, martin.