summaryrefslogtreecommitdiff
path: root/examples/elementary/test_ctxpopup.py
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-11-04 07:07:17 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2013-11-04 07:07:17 +0200
commita261a2bb6904e3040e3a222462fc6d07844ec663 (patch)
treebc1bc302d086ab83201db4e09a2a59296224f932 /examples/elementary/test_ctxpopup.py
parentcb1ae5d01af2ac8619ec612646b890b5317aa9e4 (diff)
Elementary: Add Slider example, fixed minor issues in others
Diffstat (limited to 'examples/elementary/test_ctxpopup.py')
-rw-r--r--examples/elementary/test_ctxpopup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/elementary/test_ctxpopup.py b/examples/elementary/test_ctxpopup.py
index 6b13b3d..ce1120f 100644
--- a/examples/elementary/test_ctxpopup.py
+++ b/examples/elementary/test_ctxpopup.py
@@ -1,6 +1,8 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2# encoding: utf-8 2# encoding: utf-8
3 3
4import os
5
4from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, FilledImage 6from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, FilledImage
5from efl import elementary 7from efl import elementary
6from efl.elementary.window import StandardWindow 8from efl.elementary.window import StandardWindow
@@ -14,6 +16,9 @@ from efl.elementary.scroller import Scroller
14EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND 16EXPAND_BOTH = EVAS_HINT_EXPAND, EVAS_HINT_EXPAND
15FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL 17FILL_BOTH = EVAS_HINT_FILL, EVAS_HINT_FILL
16 18
19script_path = os.path.dirname(os.path.abspath(__file__))
20img_path = os.path.join(script_path, "images")
21
17def cb_items(li, item): 22def cb_items(li, item):
18 print(("ctxpopup item selected: %s" % (item.text))) 23 print(("ctxpopup item selected: %s" % (item.text)))
19 24
@@ -29,7 +34,7 @@ def cb_btn(btn):
29 if "img" in cp.data: 34 if "img" in cp.data:
30 return 35 return
31 img = FilledImage(btn.evas) 36 img = FilledImage(btn.evas)
32 img.file_set("images/sky_04.jpg") 37 img.file_set(os.path.join(img_path, "sky_04.jpg"))
33 img.move(40, 40) 38 img.move(40, 40)
34 img.resize(320, 320) 39 img.resize(320, 320)
35 img.show() 40 img.show()