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.
I don't know if this might be a bug somewhere, maybe something gets
optimized away? Not sure...
This is with Pike v7.6.66