From 1067be1cc6340705ede7131b5f26ae28daeaea75 Mon Sep 17 00:00:00 2001 From: Hans Breuer Date: Sun, 21 Apr 2002 20:21:27 +0000 Subject: added parameter --errorfilename to allow redirection of stderr even with 2002-04-21 Hans Breuer * codegen/codegen.py : added parameter --errorfilename to allow redirection of stderr even with clumsy windoze shell * codegen/override.py : extended to allow 'sys.platform' specific ignores * examples/pygtk-demo/demos/colorsel.py : use color = gtk.gdk.color_parse("blue") to get the initial color * examples/pygtk-demo/demos/draw.py : (new file) demonstrating some simple drawing operations. It is using the gtk.GC interface additions below. * gtk/gdk.override : implement GdkGC.tp_getattr, GdkGC.tp_setattr and gdk_gc_set_dashes (ported from #if 0'ed code in gtk/gtk-types.c (should be removed there ?) * gtk/gtk.override : ignore-win32 GTK_TYPE_PLUG GTK_TYPE_SOCKET gtk_socket_new (the TYPE ignores do not work yet) * config.h.win32 makefile.msc pygtk/makefile.msc : new files to build pygtk on windoze using the established glib/build/win32 infrastructure * pygtk/gtk/gtk-fake-win32.c : (new file) implementing gtk_plug_get_type() and gtk_socket_get_type(). It could vanish if codegen/codegen.py has learned something like 'ignore-class-$(sys.platform) or my GtkPlug/GtkSocket patch gets accepted with Gtk. * gtk/gtkmodule.c : added a g_assert() to ensure importing pygobject did work. --- examples/pygtk-demo/demos/colorsel.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/pygtk-demo/demos/colorsel.py b/examples/pygtk-demo/demos/colorsel.py index b04e4c24..2408cdea 100644 --- a/examples/pygtk-demo/demos/colorsel.py +++ b/examples/pygtk-demo/demos/colorsel.py @@ -34,13 +34,7 @@ def change_color_cb(w): def main(): global window, color, da - # How do I get a GdkColor? - # GdkColormap.alloc() wants a GtkColor, not strings nor (r, g, b) and - # gtk.gdk.Color isn't implemented... - #color = gtk.gdk.Color() - #color.red = 0 - #color.blue = 0xFFFF - #color.green = 0 + color = gtk.gdk.color_parse("blue") window = gtk.Window() window.set_title("Color selection") @@ -60,7 +54,6 @@ def main(): da = gtk.DrawingArea() da.set_size_request(200, 200) - color = da.get_style().white da.modify_bg(gtk.STATE_NORMAL, color) frame.add(da) -- cgit v1.2.1