summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-10-22 11:30:51 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-10-22 11:30:51 +0200
commit924f2916602a4aabd5c1658b512237ecccacc8ea (patch)
tree9ed3a7904926e559af1bb75b08d421eeec953a6a
parent2e5e96a8dd4c00976c517666819202f22954df90 (diff)
Test External: more readable indentation
-rw-r--r--examples/elementary/test_external.py49
1 files changed, 19 insertions, 30 deletions
diff --git a/examples/elementary/test_external.py b/examples/elementary/test_external.py
index bbac4b2..c721251 100644
--- a/examples/elementary/test_external.py
+++ b/examples/elementary/test_external.py
@@ -19,17 +19,16 @@ from efl.elementary.list import List
19 19
20script_path = os.path.dirname(os.path.abspath(__file__)) 20script_path = os.path.dirname(os.path.abspath(__file__))
21img_path = os.path.join(script_path, "images") 21img_path = os.path.join(script_path, "images")
22theme_file = os.path.join(script_path, "test_external.edj")
22 23
23def edje_external_button_clicked(obj, item=None): 24def edje_external_button_clicked(obj, item=None):
24 win = StandardWindow("edje-external-button", "Edje External Button", 25 win = StandardWindow("edje-external-button", "Edje External Button",
25 autodel=True, size=(320, 400)) 26 autodel=True, size=(320, 400))
26 if obj is None: 27 if obj is None:
27 win.callback_delete_request_add(lambda o: elementary.exit()) 28 win.callback_delete_request_add(lambda o: elementary.exit())
28 29
29 ly = Layout(win,file=( 30 ly = Layout(win,file=(theme_file, "external/button"),
30 os.path.join(script_path, "test_external.edj"), 31 size_hint_weight=EXPAND_BOTH)
31 "external/button"),
32 size_hint_weight=EXPAND_BOTH)
33 win.resize_object_add(ly) 32 win.resize_object_add(ly)
34 ly.show() 33 ly.show()
35 34
@@ -66,14 +65,12 @@ def cb_btn3_clicked(bt, ly):
66 65
67def edje_external_pbar_clicked(obj, item=None): 66def edje_external_pbar_clicked(obj, item=None):
68 win = StandardWindow("edje-external-pbar", "Edje External Progress Bar", 67 win = StandardWindow("edje-external-pbar", "Edje External Progress Bar",
69 autodel=True, size=(320, 400)) 68 autodel=True, size=(320, 400))
70 if obj is None: 69 if obj is None:
71 win.callback_delete_request_add(lambda o: elementary.exit()) 70 win.callback_delete_request_add(lambda o: elementary.exit())
72 71
73 ly = Layout(win, file=( 72 ly = Layout(win, file=(theme_file, "external/pbar"),
74 os.path.join(script_path, "test_external.edj"), 73 size_hint_weight=EXPAND_BOTH)
75 "external/pbar"),
76 size_hint_weight=EXPAND_BOTH)
77 win.resize_object_add(ly) 74 win.resize_object_add(ly)
78 ly.show() 75 ly.show()
79 76
@@ -85,14 +82,12 @@ def edje_external_pbar_clicked(obj, item=None):
85 82
86def edje_external_scroller_clicked(obj, item=None): 83def edje_external_scroller_clicked(obj, item=None):
87 win = StandardWindow("edje-external-scroller", "Edje External Scroller", 84 win = StandardWindow("edje-external-scroller", "Edje External Scroller",
88 autodel=True, size=(320, 400)) 85 autodel=True, size=(320, 400))
89 if obj is None: 86 if obj is None:
90 win.callback_delete_request_add(lambda o: elementary.exit()) 87 win.callback_delete_request_add(lambda o: elementary.exit())
91 88
92 ly = Layout(win, file=( 89 ly = Layout(win, file=(theme_file, "external/scroller"),
93 os.path.join(script_path, "test_external.edj"), 90 size_hint_weight=EXPAND_BOTH)
94 "external/scroller"),
95 size_hint_weight=EXPAND_BOTH)
96 win.resize_object_add(ly) 91 win.resize_object_add(ly)
97 ly.show() 92 ly.show()
98 93
@@ -100,14 +95,12 @@ def edje_external_scroller_clicked(obj, item=None):
100 95
101def edje_external_slider_clicked(obj, item=None): 96def edje_external_slider_clicked(obj, item=None):
102 win = StandardWindow("edje-external-slider", "Edje External Slider", 97 win = StandardWindow("edje-external-slider", "Edje External Slider",
103 autodel=True, size=(320, 400)) 98 autodel=True, size=(320, 400))
104 if obj is None: 99 if obj is None:
105 win.callback_delete_request_add(lambda o: elementary.exit()) 100 win.callback_delete_request_add(lambda o: elementary.exit())
106 101
107 ly = Layout(win, file=( 102 ly = Layout(win, file=(theme_file, "external/slider"),
108 os.path.join(script_path, "test_external.edj"), 103 size_hint_weight=EXPAND_BOTH)
109 "external/slider"),
110 size_hint_weight=EXPAND_BOTH)
111 win.resize_object_add(ly) 104 win.resize_object_add(ly)
112 ly.show() 105 ly.show()
113 106
@@ -115,14 +108,12 @@ def edje_external_slider_clicked(obj, item=None):
115 108
116def edje_external_video_clicked(obj, item=None): 109def edje_external_video_clicked(obj, item=None):
117 win = StandardWindow("edje-external-video", "Edje External Video", 110 win = StandardWindow("edje-external-video", "Edje External Video",
118 autodel=True, size=(320, 400)) 111 autodel=True, size=(320, 400))
119 if obj is None: 112 if obj is None:
120 win.callback_delete_request_add(lambda o: elementary.exit()) 113 win.callback_delete_request_add(lambda o: elementary.exit())
121 114
122 ly = Layout(win, file=( 115 ly = Layout(win, file=(theme_file, "external/video"),
123 os.path.join(script_path, "test_external.edj"), 116 size_hint_weight=EXPAND_BOTH)
124 "external/video"),
125 size_hint_weight=EXPAND_BOTH)
126 win.resize_object_add(ly) 117 win.resize_object_add(ly)
127 ly.show() 118 ly.show()
128 119
@@ -134,10 +125,8 @@ def edje_external_icon_clicked(obj, item=None):
134 if obj is None: 125 if obj is None:
135 win.callback_delete_request_add(lambda o: elementary.exit()) 126 win.callback_delete_request_add(lambda o: elementary.exit())
136 127
137 ly = Layout(win, file=( 128 ly = Layout(win, file=(theme_file, "external/icon"),
138 os.path.join(script_path, "test_external.edj"), 129 size_hint_weight=EXPAND_BOTH)
139 "external/icon"),
140 size_hint_weight=EXPAND_BOTH)
141 win.resize_object_add(ly) 130 win.resize_object_add(ly)
142 ly.show() 131 ly.show()
143 ly.signal_emit("elm_test,animations,start", "elm_test") 132 ly.signal_emit("elm_test,animations,start", "elm_test")
@@ -147,7 +136,7 @@ def edje_external_icon_clicked(obj, item=None):
147 136
148if __name__ == "__main__": 137if __name__ == "__main__":
149 win = StandardWindow("test", "python-elementary test application", 138 win = StandardWindow("test", "python-elementary test application",
150 size=(320,520)) 139 size=(320,520))
151 win.callback_delete_request_add(lambda o: elementary.exit()) 140 win.callback_delete_request_add(lambda o: elementary.exit())
152 141
153 box0 = Box(win, size_hint_weight=EXPAND_BOTH) 142 box0 = Box(win, size_hint_weight=EXPAND_BOTH)