diff options
author | Manuel Quiñones <manuq@laptop.org> | 2013-02-05 17:11:04 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2013-02-05 17:11:04 (GMT) |
commit | b9234202ab430b14b6509a0cea099fe1ecd3d17c (patch) | |
tree | 1119ec58f203d8c62a095d4d4370f7f94ab8175a | |
parent | a7e0e5ae57f63035e50f48fe6f977cfa6c8d4572 (diff) |
Add testcase for Gtk.ComboBox
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
-rw-r--r-- | tests/graphics/combobox.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/graphics/combobox.py b/tests/graphics/combobox.py new file mode 100644 index 0000000..0c329a0 --- /dev/null +++ b/tests/graphics/combobox.py @@ -0,0 +1,24 @@ +from gi.repository import Gtk + +import common + + +test = common.Test() +test.show() + +# test Gtk.ComboBox: + +store = Gtk.ListStore(int, str) +for i in range(100): + description = "combo test entry %d" % i + store.append([i, description]) + +combobox = Gtk.ComboBox(model=store) +cell = Gtk.CellRendererText() +combobox.pack_start(cell, True) +combobox.add_attribute(cell, 'text', 1) +test.pack_start(combobox, True, True, 0) +combobox.show() + +if __name__ == '__main__': + common.main(test) |