Re: [gtk-list] Pixmap in a button






> I know I'm doing something wrong...
> I try to shove a bitmap (*.xpm) into a button according to Ian's
> tutorial
> but I do not succeed.
> The error I'm getting is this:
>
> ** WARNING **: file gtkpixmap.c: line 95 (gtk_pixmap_set): "val != NULL"
> 
> ** WARNING **: file gdkdraw.c: line 202 (gdk_draw_pixmap): "src != NULL"
>

Just so you know, these are failed assertions.. meaning that the assertion
"src != NULL"  failed.. sorta means the opposite of what it looks like :) 
ie, in this case src == NULL. 

My guess would be the pixmap wasn't really in the current directory, or
you got the filename wrong.

> I use a dialog instead of a window (as in Ian's example). What's the
> fundamental difference anyway?

Hmm.. which example are you refering to ?  I thought I used windows in all
of them.  At any rate, a dialog creates a window, and then packs a vbox
and a seperator in it.. it's just a shortcut for creating dialog windows.

> In fact, I don't understand why the overall window matters at all if I'm
> only trying to stick an innocent little pixmap into an insignificant
> button!

You're right.. it shouldn't.  Check to be sure the .xpm is in the right
place (in the button example, it's ./info.xpm) and that it's a proper xpm
file.

I just retested the example in section 6.1, and it seems to work fine.. if
I rename info.xpm I get identical errors to what you stated.

Regards,

Ian

--

No problem is insoluble in all conceivable circumstances.




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