[EMAIL PROTECTED] writes:

> >>> a.set_border_window_size(gtk.TEXT_WINDOW_RIGHT,10)
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ValueError: type must be one of: gtk.TEXT_WINDOW_LEFT, gtk.TEXT_WINDOW_RIGHT,
> gtk.TEXT_WINDOW_TOP or gtk.TEXT_WINDOW_BOTTOM
> 
> As said before this works well with pygtk 1.99.17; I'm not sure this is a bug or
> a problem in my configuration.

It's a bug.  The switch in
__wrap_gtk_text_view_set_border_window_size() is missing a break.  The
same bug is in 1.99.17 -- are you sure it doesn't appear there as
well?  The border size is changed but pygtk returns a bogus error
message.

Here is the trivial patch that I also sent to bugzilla:


--- pygtk-1.99.18/gtk/gtktextview.override~     2003-07-02 08:28:31.000000000 -0500
+++ pygtk-1.99.18/gtk/gtktextview.override      2003-08-25 08:45:36.000000000 -0500
@@ -196,6 +196,7 @@
     case GTK_TEXT_WINDOW_BOTTOM:
        gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(self->obj), type,
                                             size);
+       break;
     default:
         PyErr_SetString(PyExc_ValueError, "type must be one of: "
                        "gtk.TEXT_WINDOW_LEFT, gtk.TEXT_WINDOW_RIGHT, "
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to