On Mon, 2005-05-09 at 09:51 -0300, Christian Robottom Reis wrote: > On Sat, May 07, 2005 at 09:34:36AM -0700, John Finlay wrote: > > > As you can see in the gdk documentation[1]: > > > > > > �The GdkGCValues structure holds a set of values used to create or > > >modify a graphics context. > > > > > >GdkColor foreground; > > >the foreground color. Note that > > >gdk_gc_get_values() only sets the > > >pixel value. > > >GdkColor background; > > >the background color. Note that > > >gdk_gc_get_values() only sets the > > >pixel value.� > > > > > > The note "Note that gdk_gc_get_values() only sets the pixel value." > > >appears to be missing from the PyGTK documentation. Feel free about > > >filing a bug report regarding documentation. > > > > Of course it would be way more useful if PyGTK could set the color rgb > > values when fetching the gc color. > > Johan, Gustavo: would this be breaking the API in subtle ways, or is it > a nice addition to PyGTK? Let's get a bug on it if the former.
In either case I don't like very much making the PyGTK API different from the GTK+ one. Maybe there's a reason why only the pixel value is returned. Perhaps GTK+ doesn't have RGB values at hand, and so looking them up involves an extra X server roundtrip. In any case, if such change made sense to PyGTK, it would also make sense to GTK+. Therefore, we shouldn't try to bypass GTK+ policy to make this PyGTK-only; instead, we should just fix GTK+. Regards. PS: for the same reason I don't like PyGTK treating string constants as valid atoms, as it encourages people not to intern atoms, thus introducing extra X server roundtrips; it makes no difference in win32, but try running X11 apps through a modem and you'll know what I mean. -- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
