aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_photo.py
diff options
context:
space:
mode:
authorDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
committerDavide Andreoli <dave@gurumeditation.it>2013-03-01 21:01:50 +0000
commit0873fe162131bf672245e51d2670fc1ce822cfdd (patch)
tree4fa8667a51105ad846560dafe7e8fe64d935e616 /examples/elementary/test_photo.py
parentpython-efl: Skip build related code in setup.py when only generating (diff)
downloadpython-efl-0873fe162131bf672245e51d2670fc1ce822cfdd.tar.gz
Do not import EVERY widget while importing efl.elementary
Now the user is responsable of importing the widget used one by one, this should be a great speedup in the launch of the app. You have to import stuff in this way: from efl import evas from efl import elementary from efl.elementary.window import Window from efl.elementary.layout import Layout ...sorry for the inconvenience SVN revision: 84402
Diffstat (limited to 'examples/elementary/test_photo.py')
-rw-r--r--examples/elementary/test_photo.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/examples/elementary/test_photo.py b/examples/elementary/test_photo.py
index da56685..a5839bc 100644
--- a/examples/elementary/test_photo.py
+++ b/examples/elementary/test_photo.py
@@ -1,8 +1,13 @@
#!/usr/bin/env python
# encoding: utf-8
-from efl import elementary
from efl import evas
+from efl import elementary
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.photo import Photo
+from efl.elementary.scroller import Scroller
+from efl.elementary.table import Table
images = ["panel_01.jpg",
@@ -16,25 +21,25 @@ images = ["panel_01.jpg",
"wood_01.jpg"]
def photo_clicked(obj):
- win = elementary.Window("photo", elementary.ELM_WIN_BASIC)
+ win = Window("photo", elementary.ELM_WIN_BASIC)
win.title_set("Photo test")
win.autodel_set(True)
if obj is None:
win.callback_delete_request_add(lambda o: elementary.exit())
- bg = elementary.Background(win)
+ bg = Background(win)
win.resize_object_add(bg)
bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- sc = elementary.Scroller(win)
+ sc = Scroller(win)
sc.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(sc)
sc.show()
elementary.need_ethumb()
- tb = elementary.Table(win)
+ tb = Table(win)
tb.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
sc.content = tb
tb.show()
@@ -42,7 +47,7 @@ def photo_clicked(obj):
n = 0
for j in range(12):
for i in range(12):
- ph = elementary.Photo(win)
+ ph = Photo(win)
name = "images/%s" % (images[n])
n += 1
if n >= 9: n = 0