[pygobject] [Gtk] Add overrides for Button



commit f07cfde377e42686c6b80f56cac62338ee333e61
Author: Johan Dahlin <johan gnome org>
Date:   Mon Aug 16 10:08:38 2010 +0200

    [Gtk] Add overrides for Button
    
    https://bugzilla.gnome.org/show_bug.cgi?id=622606

 gi/overrides/Gtk.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index a655e93..8a7cb6a 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -405,6 +405,19 @@ class TreeViewColumn(Gtk.TreeViewColumn):
 TreeViewColumn = override(TreeViewColumn)
 __all__.append('TreeViewColumn')
 
+class Button(Gtk.Button):
+    def __init__(self, label=None, stock=None, use_underline=False):
+        if stock:
+            label = stock
+            use_stock = True
+            use_underline = True
+        else:
+            use_stock = False
+        Gtk.Button.__init__(self, label=label, use_stock=use_stock,
+                            use_underline=use_underline)
+Button = override(Button)
+__all__.append('Button')
+
 import sys
 
 initialized, argv = Gtk.init_check(sys.argv)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]