Re: [pygtk] everything's black...
- From: James Henstridge <james daa com au>
- To: Skip Montanaro <skip pobox com>
- Cc: <pygtk daa com au>, <gtk-list gnome org>
- Subject: Re: [pygtk] everything's black...
- Date: Wed, 4 Jul 2001 10:33:22 +0800 (WST)
On Tue, 3 Jul 2001, Skip Montanaro wrote:
>
> It's been a week or two since I actually ran any Gtk code. Now, this
> following simple Python script displays nothing but black:
>
> import gtk
>
> def quit(*args):
> print args
> print args[0].get_name()
> gtk.mainquit()
>
> def _test():
> window = gtk.GtkWindow(gtk.WINDOW_TOPLEVEL)
> window.set_title("title")
> window.connect("destroy", gtk.mainquit)
>
> close = gtk.GtkButton(label="Quit")
> close.connect("clicked", quit)
> window.add(close)
>
> window.show_all()
>
> gtk.mainloop()
>
> _test()
>
> I get 40 "unable to allocate color" messages like
>
> button.py (pid:17679): Gtk-WARNING **: unable to allocate color: ( 65535 65535 65535 )
>
> button.py (pid:17679): Gtk-WARNING **: unable to allocate color: ( 0 0 40000 )
>
> button.py (pid:17679): Gtk-WARNING **: unable to allocate color: ( 32767 32767 52767 )
>
> My X Server is an XFree86 server with 24-plane TrueColor and DirectColor
> visuals. I'm using the latest CVS versions of glib, gtk and friends. The
> only difference between what I'm running and what's CVS is the addition of
> the pygtk/codegen/pygtk-codegen-2.0.in to the gnome-python directory from
> the latest pygtk2 snapshot (it's not in CVS) and the addition of a debug
> method to gobjectmodule.c that allows me to enable display of signal
> emission at run-time.
I have no idea what would cause this. I don't see that error message (the
program runs as expected). Very weird that it would have trouble
allocating colours in a truecolor visual -- usually those sort of errors
occur only for PseudoColor visuals (eg. 256-colour).
if you haven'y already tried it, maybe doing "make clean ; make" for at
least gtk+ may help.
James (who could run the program fine in a 16-bit TrueColor visual)
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]