summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Rostagno <joserostagno@vijona.com.ar>2012-04-29 12:56:50 -0300
committerMartin Pitt <martinpitt@gnome.org>2012-05-02 11:17:13 +0200
commit3f4ca905e482aad221f355586bc00b29c2547ddd (patch)
tree256337fb08d05e13b44b63212313f3989eee0e2c
parent926f08a94b38a4b3102e72b3fe19e886fa59f436 (diff)
downloadpygobject-3f4ca905e482aad221f355586bc00b29c2547ddd.tar.gz
pygtkcompat: Correct Userlist module use
https://bugzilla.gnome.org/show_bug.cgi?id=675084 Signed-off-by: Martin Pitt <martinpitt@gnome.org>
-rw-r--r--gi/pygtkcompat.py2
-rw-r--r--tests/test_pygtkcompat.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/gi/pygtkcompat.py b/gi/pygtkcompat.py
index c855a689..c6dafcd4 100644
--- a/gi/pygtkcompat.py
+++ b/gi/pygtkcompat.py
@@ -330,7 +330,7 @@ def enable_gtk(version='2.0'):
def __init__(self, req):
self.height = req.height
self.width = req.width
- UserList.UserList.__init__(self, [self.width,
+ UserList.__init__(self, [self.width,
self.height])
return SizeRequest(orig_size_request(widget))
Gtk.Widget.size_request = size_request
diff --git a/tests/test_pygtkcompat.py b/tests/test_pygtkcompat.py
index 82948e2a..fd0ad857 100644
--- a/tests/test_pygtkcompat.py
+++ b/tests/test_pygtkcompat.py
@@ -92,6 +92,10 @@ class TestGTKCompat(unittest.TestCase):
self.assertEquals(combo.get_text_column(), 1)
self.assertEquals(combo.get_child().get_text(), 'One')
+ def testSizeRequest(self):
+ box = gtk.Box()
+ self.assertEqual(box.size_request(), [0, 0])
+
def testPixbuf(self):
gtk.gdk.Pixbuf()