[869] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Pixmap in a button

daemon@ATHENA.MIT.EDU (Ian Main)
Fri Aug 29 14:09:13 1997

Date: Fri, 29 Aug 1997 11:09:31 -0700 (PDT)
From: Ian Main <slow@intergate.bc.ca>
Reply-To: Ian Main <slow@intergate.bc.ca>
To: Pavel Greenfield <pavel@riskdevel.ml.com>
cc: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com




> 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.


--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post