[pygobject] PangoLayout: Add a default value for set_markup()
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] PangoLayout: Add a default value for set_markup()
- Date: Mon, 19 Mar 2012 13:54:03 +0000 (UTC)
commit 116d3712251b1b8aa2d4f4a9e40e22f5b9fcbe4f
Author: Johan Dahlin <johan gnome org>
Date: Fri Mar 16 16:07:30 2012 -0300
PangoLayout: Add a default value for set_markup()
https://bugzilla.gnome.org/show_bug.cgi?id=672260
gi/overrides/Pango.py | 3 +++
tests/test_overrides.py | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Pango.py b/gi/overrides/Pango.py
index 51ad2f3..b8865f2 100644
--- a/gi/overrides/Pango.py
+++ b/gi/overrides/Pango.py
@@ -55,6 +55,9 @@ class Layout(Pango.Layout):
# __new__ and it is not a PangoLayout property
super(Layout, self).__init__(**kwds)
+ def set_markup(self, text, length=-1):
+ super(Layout, self).set_markup(text, length)
+
Layout = override(Layout)
__all__.append('Layout')
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 81d2fb2..5433a02 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -465,6 +465,10 @@ class TestPango(unittest.TestCase):
layout = Pango.Layout(context)
self.assertEquals(layout.get_context(), context)
+ layout.set_markup("Foobar")
+ self.assertEquals(layout.get_text(), "Foobar")
+
+
class TestGdk(unittest.TestCase):
def test_constructor(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]