summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gi/overrides/Gtk.py3
-rw-r--r--tests/test_overrides.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 545e1656..1db9025f 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1097,6 +1097,9 @@ class Table(Gtk.Table, Container):
def __init__(self, rows=1, columns=1, homogeneous=False, **kwds):
Gtk.Table.__init__(self, n_rows=rows, n_columns=columns, homogeneous=homogeneous, **kwds)
+ def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
+ Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)
+
Table = override(Table)
__all__.append('Table')
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 9d2711b7..ffa2517e 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -838,6 +838,10 @@ class TestGtk(unittest.TestCase):
self.assertEquals(table.get_size(), (2,3))
self.assertEquals(table.get_homogeneous(), True)
+ label = Gtk.Label('Hello')
+ table.attach(label, 0, 1, 0, 1)
+ self.assertEquals(label, table.get_children()[0])
+
def test_scrolledwindow(self):
sw = Gtk.ScrolledWindow()
sb = sw.get_hscrollbar()