summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-18 14:34:15 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-18 14:34:15 +0900
commitcec35867df61caa1c489907b0664bf961cab11f8 (patch)
tree6565d5395956650937a80e5d2179f10e7d0b57e8
parentdca5cc2fa05d713621c673e0f7f6766b2c5de7a0 (diff)
ok - make pwople who \have not stared at c macros as long as i have happy
make it just {} instea dof do {} while (0) - as it seems that people dont get confused by macros having this but do get confused when its in code used as and indenter.
-rw-r--r--src/bin/e_askpass_main.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/bin/e_askpass_main.c b/src/bin/e_askpass_main.c
index 8cf169e49..67b785667 100644
--- a/src/bin/e_askpass_main.c
+++ b/src/bin/e_askpass_main.c
@@ -33,7 +33,7 @@ cb_cancel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info
33} 33}
34 34
35EAPI int 35EAPI int
36elm_main(int argc, char **argv) 36elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
37{ 37{
38 Evas_Object *win, *bx, *fr, *lab, *en, *sep, *bx2, *bt; 38 Evas_Object *win, *bx, *fr, *lab, *en, *sep, *bx2, *bt;
39 39
@@ -44,34 +44,34 @@ elm_main(int argc, char **argv)
44 elm_app_compile_data_dir_set(PACKAGE_DATA_DIR); 44 elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
45 elm_app_info_set(elm_main, "enlightenment", "AUTHORS"); 45 elm_app_info_set(elm_main, "enlightenment", "AUTHORS");
46 46
47 do { 47 {
48 win = elm_win_util_standard_add("main", TITLE); 48 win = elm_win_util_standard_add("main", TITLE);
49 elm_win_autodel_set(win, EINA_TRUE); 49 elm_win_autodel_set(win, EINA_TRUE);
50 do { 50 {
51 bx = elm_box_add(win); 51 bx = elm_box_add(win);
52 elm_box_horizontal_set(bx, EINA_FALSE); 52 elm_box_horizontal_set(bx, EINA_FALSE);
53 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); 53 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
54 elm_win_resize_object_add(win, bx); 54 elm_win_resize_object_add(win, bx);
55 do { 55 {
56 fr = elm_frame_add(win); 56 fr = elm_frame_add(win);
57 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); 57 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
58 elm_object_style_set(fr, PAD); 58 elm_object_style_set(fr, PAD);
59 elm_box_pack_end(bx, fr); 59 elm_box_pack_end(bx, fr);
60 do { 60 {
61 lab = elm_label_add(win); 61 lab = elm_label_add(win);
62 evas_object_size_hint_align_set(lab, EVAS_HINT_FILL, 0.5); 62 evas_object_size_hint_align_set(lab, EVAS_HINT_FILL, 0.5);
63 elm_object_text_set(lab, TEXT); 63 elm_object_text_set(lab, TEXT);
64 elm_object_content_set(fr, lab); 64 elm_object_content_set(fr, lab);
65 evas_object_show(lab); 65 evas_object_show(lab);
66 } while (0); 66 }
67 evas_object_show(fr); 67 evas_object_show(fr);
68 } while (0); 68 }
69 do { 69 {
70 fr = elm_frame_add(win); 70 fr = elm_frame_add(win);
71 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); 71 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
72 elm_object_style_set(fr, PAD); 72 elm_object_style_set(fr, PAD);
73 elm_box_pack_end(bx, fr); 73 elm_box_pack_end(bx, fr);
74 do { 74 {
75 en = elm_entry_add(win); 75 en = elm_entry_add(win);
76 entry = en; 76 entry = en;
77 elm_entry_scrollable_set(en, EINA_TRUE); 77 elm_entry_scrollable_set(en, EINA_TRUE);
@@ -86,53 +86,53 @@ elm_main(int argc, char **argv)
86 elm_object_content_set(fr, en); 86 elm_object_content_set(fr, en);
87 evas_object_show(en); 87 evas_object_show(en);
88 elm_object_focus_set(en, EINA_TRUE); 88 elm_object_focus_set(en, EINA_TRUE);
89 } while (0); 89 }
90 evas_object_show(fr); 90 evas_object_show(fr);
91 } while (0); 91 }
92 do { 92 {
93 sep = elm_separator_add(win); 93 sep = elm_separator_add(win);
94 elm_separator_horizontal_set(sep, EINA_TRUE); 94 elm_separator_horizontal_set(sep, EINA_TRUE);
95 evas_object_size_hint_weight_set(sep, EVAS_HINT_EXPAND, 0.0); 95 evas_object_size_hint_weight_set(sep, EVAS_HINT_EXPAND, 0.0);
96 evas_object_size_hint_align_set(sep, EVAS_HINT_FILL, EVAS_HINT_FILL); 96 evas_object_size_hint_align_set(sep, EVAS_HINT_FILL, EVAS_HINT_FILL);
97 elm_box_pack_end(bx, sep); 97 elm_box_pack_end(bx, sep);
98 evas_object_show(sep); 98 evas_object_show(sep);
99 } while (0); 99 }
100 do { 100 {
101 fr = elm_frame_add(win); 101 fr = elm_frame_add(win);
102 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL); 102 evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
103 elm_object_style_set(fr, PAD); 103 elm_object_style_set(fr, PAD);
104 elm_box_pack_end(bx, fr); 104 elm_box_pack_end(bx, fr);
105 do { 105 {
106 bx2 = elm_box_add(win); 106 bx2 = elm_box_add(win);
107 elm_box_horizontal_set(bx2, EINA_TRUE); 107 elm_box_horizontal_set(bx2, EINA_TRUE);
108 elm_box_homogeneous_set(bx2, EINA_TRUE); 108 elm_box_homogeneous_set(bx2, EINA_TRUE);
109 evas_object_size_hint_align_set(bx2, 0.5, 0.5); 109 evas_object_size_hint_align_set(bx2, 0.5, 0.5);
110 elm_object_content_set(fr, bx2); 110 elm_object_content_set(fr, bx2);
111 do { 111 {
112 bt = elm_button_add(win); 112 bt = elm_button_add(win);
113 elm_object_text_set(bt, OK); 113 elm_object_text_set(bt, OK);
114 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 114 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
115 evas_object_smart_callback_add(bt, "clicked", cb_ok, NULL); 115 evas_object_smart_callback_add(bt, "clicked", cb_ok, NULL);
116 elm_box_pack_end(bx2, bt); 116 elm_box_pack_end(bx2, bt);
117 evas_object_show(bt); 117 evas_object_show(bt);
118 } while (0); 118 }
119 do { 119 {
120 bt = elm_button_add(win); 120 bt = elm_button_add(win);
121 elm_object_text_set(bt, CANCEL); 121 elm_object_text_set(bt, CANCEL);
122 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 122 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
123 evas_object_smart_callback_add(bt, "clicked", cb_cancel, NULL); 123 evas_object_smart_callback_add(bt, "clicked", cb_cancel, NULL);
124 elm_box_pack_end(bx2, bt); 124 elm_box_pack_end(bx2, bt);
125 evas_object_show(bt); 125 evas_object_show(bt);
126 } while (0); 126 }
127 evas_object_show(bx2); 127 evas_object_show(bx2);
128 } while (0); 128 }
129 evas_object_show(fr); 129 evas_object_show(fr);
130 } while (0); 130 }
131 evas_object_show(bx); 131 evas_object_show(bx);
132 } while (0); 132 }
133 elm_win_center(win, EINA_TRUE, EINA_TRUE); 133 elm_win_center(win, EINA_TRUE, EINA_TRUE);
134 evas_object_show(win); 134 evas_object_show(win);
135 } while (0); 135 }
136 136
137 elm_win_activate(win); 137 elm_win_activate(win);
138 138