[pygobject] Override Gtk.ScrolledWindow constructor
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Override Gtk.ScrolledWindow constructor
- Date: Sun, 12 Dec 2010 13:18:43 +0000 (UTC)
commit d33c987e505ec8ddffa2b8cb5526f05b9b5f62be
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Dec 12 13:38:56 2010 +0100
Override Gtk.ScrolledWindow constructor
gi/overrides/Gtk.py | 7 +++++++
tests/test_overrides.py | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 3fe6f1b..fe382c0 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1100,6 +1100,13 @@ class Table(Gtk.Table, Container):
Table = override(Table)
__all__.append('Table')
+class ScrolledWindow(Gtk.ScrolledWindow):
+ def __init__(self, hadjustment=None, vadjustment=None, **kwds):
+ Gtk.ScrolledWindow.__init__(self, hadjustment=hadjustment, vadjustment=vadjustment, **kwds)
+
+ScrolledWindow = override(ScrolledWindow)
+__all__.append('ScrolledWindow')
+
_Gtk_main_quit = Gtk.main_quit
@override(Gtk.main_quit)
def main_quit(*args):
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index a53fd3e..ad9263d 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -828,3 +828,10 @@ class TestGtk(unittest.TestCase):
self.assertEquals(table.get_size(), (2,3))
self.assertEquals(table.get_homogeneous(), True)
+ def test_scrolledwindow(self):
+ sw = Gtk.ScrolledWindow()
+ sb = sw.get_hscrollbar()
+ self.assertEquals(sw.get_hadjustment(), sb.get_adjustment())
+ sb = sw.get_vscrollbar()
+ self.assertEquals(sw.get_vadjustment(), sb.get_adjustment())
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]