testinggtk r376 - trunk/tests
- From: bjornl svn gnome org
- To: svn-commits-list gnome org
- Subject: testinggtk r376 - trunk/tests
- Date: Tue, 19 Aug 2008 19:34:45 +0000 (UTC)
Author: bjornl
Date: Tue Aug 19 19:34:45 2008
New Revision: 376
URL: http://svn.gnome.org/viewvc/testinggtk?rev=376&view=rev
Log:
Test for #528661
Modified:
trunk/tests/test_cellview.py
Modified: trunk/tests/test_cellview.py
==============================================================================
--- trunk/tests/test_cellview.py (original)
+++ trunk/tests/test_cellview.py Tue Aug 19 19:34:45 2008
@@ -147,6 +147,30 @@
assert cr.get_property('text') == 'foo'
+def test_repeat_add_attributes():
+ '''
+ Ensure that when ``add_attribute`` is called repeatedly with the
+ same attribute name, that the column for that attribute is
+ updated.
+
+ :bug: #528661
+ '''
+ store = gtk.ListStore(str, str)
+ store.append(['one', 'two'])
+
+ cr = gtk.CellRendererText()
+
+ cv = gtk.CellView()
+ cv.set_model(store)
+ cv.set_displayed_row((0,))
+ cv.pack_start(cr)
+ cv.add_attribute(cr, 'text', 0)
+ cv.add_attribute(cr, 'text', 1)
+
+ # Hack to make the cell view update the renderers properties.
+ cv.size_allocate(gdk.Rectangle())
+ assert cr.get_property('text') == 'two'
+
######################################################################
##### Rendering tests ################################################
######################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]