summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-07-22 08:14:12 +0200
committerDave Andreoli <dave@gurumeditation.it>2018-07-22 08:14:12 +0200
commitfb9b06931e06278c1d63e562c72cc79e9a8fa2a6 (patch)
tree6e9fb8e87d47bc87b19f9badec792d62cd86566d
parent48d9c26945e918ef5c2f45b8971ae6b1d262dba4 (diff)
Ctxpopup: add slow test with many items
just to replicate the C example
-rw-r--r--examples/elementary/test_ctxpopup.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/elementary/test_ctxpopup.py b/examples/elementary/test_ctxpopup.py
index b6aa8d2..624d6bd 100644
--- a/examples/elementary/test_ctxpopup.py
+++ b/examples/elementary/test_ctxpopup.py
@@ -59,7 +59,7 @@ def cb_item1(li, item):
59 it = item_new(cp, "Navigate to folder", "folder") 59 it = item_new(cp, "Navigate to folder", "folder")
60 it.disabled = True 60 it.disabled = True
61 it = item_new(cp, "Edit entry", "document-edit") 61 it = item_new(cp, "Edit entry", "document-edit")
62 it = item_new(cp, "Sate date and time", "list-remove") 62 it = item_new(cp, "Set date and time", "list-remove")
63 it.disabled = True 63 it.disabled = True
64 64
65 ic = Icon(cp, standard="list-add", resizable=(False,False)) 65 ic = Icon(cp, standard="list-add", resizable=(False,False))
@@ -175,6 +175,16 @@ def cb_item6(li, item):
175 cp.show() 175 cp.show()
176 bt.data["ctxpopup"] = cp 176 bt.data["ctxpopup"] = cp
177 177
178def cb_item11(li, item):
179 cp = Ctxpopup(li)
180 cp.callback_geometry_update_add(cb_geometry_update)
181 for i in range(100):
182 item_new(cp, "Item #%d" % i, "clock")
183
184 x, y = li.evas.pointer_canvas_xy_get()
185 cp.move(x, y)
186 cp.show()
187
178def ctxpopup_clicked(obj): 188def ctxpopup_clicked(obj):
179 win = StandardWindow("ctxpopup", "Context popup test", autodel=True, 189 win = StandardWindow("ctxpopup", "Context popup test", autodel=True,
180 size=(400,400)) 190 size=(400,400))
@@ -191,6 +201,7 @@ def ctxpopup_clicked(obj):
191 li.item_append("Ctxpopup at horizontal mode", callback=cb_item4) 201 li.item_append("Ctxpopup at horizontal mode", callback=cb_item4)
192 li.item_append("Ctxpopup with user content", callback=cb_item5) 202 li.item_append("Ctxpopup with user content", callback=cb_item5)
193 li.item_append("Ctxpopup with restacking", callback=cb_item6) 203 li.item_append("Ctxpopup with restacking", callback=cb_item6)
204 li.item_append("Ctxpopup with more items", callback=cb_item11)
194 li.go() 205 li.go()
195 206
196 win.show() 207 win.show()