aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-08-09 12:56:00 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-08-09 12:56:00 +0200
commit99113cd9909de6917d98c35556129e0ec60aea0d (patch)
tree56358df03f27853d1f7b47c2d819eb402b91531a /examples/elementary
parentNew 1.18 API: elm.GengridItem.all_contents_unset() (diff)
downloadpython-efl-99113cd9909de6917d98c35556129e0ec60aea0d.tar.gz
Fix implementation of elm.GenlistItem.all_contents_unset()
the old implementation was not working at all, so I marked it @since 1.18 also added a test for it
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_genlist_1.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/elementary/test_genlist_1.py b/examples/elementary/test_genlist_1.py
index ff67832..3827c73 100644
--- a/examples/elementary/test_genlist_1.py
+++ b/examples/elementary/test_genlist_1.py
@@ -178,6 +178,25 @@ def test_genlist_1(parent):
hbox.pack_end(bt)
bt.show()
+ # item content unset
+ def content_unset_clicked(bt, gl):
+ item = gl.selected_item
+ if item is None:
+ print("You must select an item first!")
+ else:
+ contents = item.all_contents_unset()
+ print(contents)
+ for obj in contents:
+ obj.pos = (200, 0)
+ obj.show()
+ # Now all the unsetted objects are orphan in the canvas,
+ # the user should do something with them
+
+ bt = Button(win, text="Item content unset")
+ bt.callback_clicked_add(content_unset_clicked, gl)
+ hbox.pack_end(bt)
+ bt.show()
+
# show the window
win.show()