[pygobject] Add a default value for column in Gtk.TreeView.get_cell_area()
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Add a default value for column in Gtk.TreeView.get_cell_area()
- Date: Mon, 19 Mar 2012 13:53:43 +0000 (UTC)
commit 2dd9dadd1bd92c3324e9de209ba8205a9d4106d6
Author: Johan Dahlin <johan gnome org>
Date: Thu Mar 15 15:22:46 2012 -0300
Add a default value for column in Gtk.TreeView.get_cell_area()
https://bugzilla.gnome.org/show_bug.cgi?id=672260
gi/overrides/Gtk.py | 5 +++++
tests/test_overrides.py | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index cb1a77a..c4f519e 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1288,6 +1288,11 @@ class TreeView(Gtk.TreeView, Container):
path = TreePath(path)
super(TreeView, self).set_cursor(path, column, start_editing)
+ def get_cell_area(self, path, column=None):
+ if not isinstance(path, Gtk.TreePath):
+ path = TreePath(path)
+ return super(TreeView, self).get_cell_area(path, column)
+
TreeView = override(TreeView)
__all__.append('TreeView')
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 5ea02e7..7e069b4 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -1515,6 +1515,9 @@ class TestGtk(unittest.TestCase):
view.set_cursor(store[1].path)
view.set_cursor(str(store[1].path))
+ view.get_cell_area(store[1].path)
+ view.get_cell_area(str(store[1].path))
+
def test_tree_view_column(self):
cell = Gtk.CellRendererText()
column = Gtk.TreeViewColumn(title='This is just a test',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]