aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elementary/test_diskselector.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_diskselector.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_diskselector.py')
-rw-r--r--examples/elementary/test_diskselector.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/examples/elementary/test_diskselector.py b/examples/elementary/test_diskselector.py
index e898d70..953013c 100644
--- a/examples/elementary/test_diskselector.py
+++ b/examples/elementary/test_diskselector.py
@@ -1,16 +1,20 @@
#!/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.box import Box
+from efl.elementary.icon import Icon
+from efl.elementary.diskselector import Diskselector
months=["January", "February", "March", "April", "May", "June", "August", "September", "October", "November", "December"]
weekdays=["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
months_short=["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
def disk_create(win, rnd):
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
for m in months:
if m == "August":
it = di.item_append(m)
@@ -27,18 +31,18 @@ def cb_sel(ds, item):
def diskselector_clicked(obj):
- win = elementary.Window("diskselector", elementary.ELM_WIN_BASIC)
+ win = Window("diskselector", elementary.ELM_WIN_BASIC)
win.title = "Diskselector test"
win.autodel = 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 = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
bg.show()
- vbox = elementary.Box(win)
+ vbox = Box(win)
vbox.size_hint_weight = (evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
win.resize_object_add(vbox)
vbox.show()
@@ -67,9 +71,9 @@ def diskselector_clicked(obj):
di.show()
di.side_text_max_length = 4
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.item_append("Sunday", ic)
for day in weekdays:
di.item_append(day)
@@ -79,9 +83,9 @@ def diskselector_clicked(obj):
vbox.pack_end(di)
di.show()
- ic = elementary.Icon(win)
+ ic = Icon(win)
ic.file = "images/logo_small.png"
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.item_append("머리스타일", ic)
for lan in ["プロが伝授する", "生上访要求政府", "English", "والشريعة", "עִבְרִית", "Grüßen"]:
di.item_append(lan)
@@ -92,7 +96,7 @@ def diskselector_clicked(obj):
vbox.pack_end(di)
di.show()
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.display_item_num = 5
for m in months_short:
di.item_append(m)
@@ -104,7 +108,7 @@ def diskselector_clicked(obj):
di.show()
di.last_item.selected = True
- di = elementary.Diskselector(win)
+ di = Diskselector(win)
di.display_item_num = 7
for i in range(31):
di.item_append(str(i))