aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-07-31 22:18:41 +0200
committerdavemds <dave@gurumeditation.it>2014-07-31 22:18:41 +0200
commita97e61dd4ffceb30e62cc0973e879e60a8d43169 (patch)
treeeddca5af9d991456fb8bc532237c26c88969789e /examples
parentImplemented missed ecore.x screensaver functions (diff)
downloadpython-efl-a97e61dd4ffceb30e62cc0973e879e60a8d43169.tar.gz
Ctxpopup: new getters for items and the item_prepend method, with tests
Diffstat (limited to 'examples')
-rw-r--r--examples/elementary/test_ctxpopup.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/elementary/test_ctxpopup.py b/examples/elementary/test_ctxpopup.py
index ce1120f..af874a0 100644
--- a/examples/elementary/test_ctxpopup.py
+++ b/examples/elementary/test_ctxpopup.py
@@ -59,10 +59,33 @@ def cb_item1(li, item):
it = item_new(cp, "Sate date and time", "clock")
it.disabled = True
+ ic = Icon(cp, standard="home", resizable=(False,False))
+ cp.item_prepend("Prepended item", ic, cb_items)
+
(x, y) = li.evas.pointer_canvas_xy_get()
cp.move(x, y)
cp.show()
+ print("\n### Testing items getters 1")
+ for it in cp.items:
+ print("ITEM: " + it.text)
+
+ print("\n### Testing items getters 2")
+ print("FIRST ITEM: " + cp.first_item.text)
+ print("LAST ITEM: " + cp.last_item.text)
+
+ print("\n### Testing items getters 3")
+ it = cp.first_item
+ while it:
+ print("ITEM: " + it.text)
+ it = it.next
+
+ print("\n### Testing items getters 4")
+ it = cp.last_item
+ while it:
+ print("ITEM: " + it.text)
+ it = it.prev
+
def cb_item2(li, item):
cp = Ctxpopup(li)
it = item_new(cp, "", "home")