patch: make Validator support GtkText contents

Luis Ricardo Boni rico at async.com.br
Mon Jul 21 16:45:20 BRST 2003


This patch adds support for GtkText widgets in Validator.

Index: Kiwi/Validators.py
===================================================================
RCS file: /usr/local/cvssrc/Kiwi/Kiwi/Validators.py,v
retrieving revision 1.13
diff -u -r1.13 Validators.py
--- Kiwi/Validators.py	21 Jul 2003 18:35:29 -0000	1.13
+++ Kiwi/Validators.py	21 Jul 2003 19:40:33 -0000
@@ -168,6 +168,8 @@
         # XXX I love the GTK+ API
         if isinstance(widget, gtk.GtkLabel):
             text = widget.get()
+        elif isinstance(widget, gtk.GtkText):
+            text = widget.get_chars(0, -1)
         else:
             text = widget.get_text()
 

[]'s
Rico
______________________________________________________
Luis Ricardo Boni : rico at async.com.br : (16) 261 2177
Async Open Source : www.async.com.br  : (16) 261 2331


More information about the Kiwi mailing list