aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-02-26 22:54:18 +0100
committerDave Andreoli <dave@gurumeditation.it>2017-02-26 22:54:18 +0100
commit18e2d9c102dd6ee8251eb643105ea888a6b93ae1 (patch)
tree9cdb12748379ef088b6501a86bb951567e95d80f /examples/elementary
parentNew 1.19 API: elm.Image.async_open + 4 new callbacks (diff)
downloadpython-efl-18e2d9c102dd6ee8251eb643105ea888a6b93ae1.tar.gz
Make the new image test py2 compat
Diffstat (limited to 'examples/elementary')
-rw-r--r--examples/elementary/test_image_async.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/elementary/test_image_async.py b/examples/elementary/test_image_async.py
index 016f5dd..a58defd 100644
--- a/examples/elementary/test_image_async.py
+++ b/examples/elementary/test_image_async.py
@@ -12,6 +12,8 @@ script_path = os.path.dirname(os.path.abspath(__file__))
img_path = os.path.join(script_path, "images")
img_file = os.path.join(img_path, "insanely_huge_test_image.jpg")
+def image_load_cb(img, signal):
+ print("Signal: %s" % signal)
def create_image(win):
box = win.data["box"]
@@ -30,10 +32,10 @@ def create_image(win):
box.pack_start(im)
win.data["image"] = im
- im.callback_load_open_add(lambda i: print("load,open"))
- im.callback_load_ready_add(lambda i: print("load,ready"))
- im.callback_load_error_add(lambda i: print("load,error"))
- im.callback_load_cancel_add(lambda i: print("load,cancel"))
+ im.callback_load_open_add(image_load_cb, "load,open")
+ im.callback_load_ready_add(image_load_cb, "load,ready")
+ im.callback_load_error_add(image_load_cb, "load,error")
+ im.callback_load_cancel_add(image_load_cb, "load,cancel")
im.show()
im.file = img_file