[pygobject] pygtkcompat: Correct Userlist module use
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] pygtkcompat: Correct Userlist module use
- Date: Mon, 30 Apr 2012 14:00:42 +0000 (UTC)
commit 592c67482c254f65817c1a1b5c5de5dfcaab31b4
Author: Jose Rostagno <joserostagno vijona com ar>
Date: Sun Apr 29 12:56:50 2012 -0300
pygtkcompat: Correct Userlist module use
https://bugzilla.gnome.org/show_bug.cgi?id=675084
Signed-off-by: Martin Pitt <martinpitt gnome org>
gi/pygtkcompat.py | 2 +-
tests/test_pygtkcompat.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygtkcompat.py b/gi/pygtkcompat.py
index 3b41f4e..4eeaf04 100644
--- a/gi/pygtkcompat.py
+++ b/gi/pygtkcompat.py
@@ -339,7 +339,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 c837035..21ad863 100644
--- a/tests/test_pygtkcompat.py
+++ b/tests/test_pygtkcompat.py
@@ -106,6 +106,10 @@ class TestGTKCompat(unittest.TestCase):
self.assertEqual(combo.get_text_column(), 1)
self.assertEqual(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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]