summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorGustavo Lima Chaves <glima@profusion.mobi>2010-11-24 08:22:41 +0000
committerGustavo Lima Chaves <glima@profusion.mobi>2010-11-24 08:22:41 +0000
commit9059caa12e643561fbe427fbe2cce8c03a78bed0 (patch)
tree36f11f3dbd3091585db8f7ca130e35bbcac5e58a /src/bin
parent3bd379c906eb9580f6cbd138eed4f9b1c95c2c11 (diff)
Indenting this little monster.
SVN revision: 54923
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/config.c362
1 files changed, 222 insertions, 140 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index 54cd2828e..d81512306 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -4,17 +4,17 @@
4#endif 4#endif
5#ifndef ELM_LIB_QUICKLAUNCH 5#ifndef ELM_LIB_QUICKLAUNCH
6 6
7typedef struct _Theme Theme; 7typedef struct _Theme Theme;
8typedef struct _Fonts_Data Fonts_Data; 8typedef struct _Fonts_Data Fonts_Data;
9typedef struct _Elm_Text_Class_Data Elm_Text_Class_Data; 9typedef struct _Elm_Text_Class_Data Elm_Text_Class_Data;
10typedef struct _Elm_Font_Size_Data Elm_Font_Size_Data; 10typedef struct _Elm_Font_Size_Data Elm_Font_Size_Data;
11 11
12struct _Theme 12struct _Theme
13{ 13{
14 const char *label; 14 const char *label;
15 const char *name; 15 const char *name;
16 const char *path; 16 const char *path;
17 Eina_Bool in_search_path; 17 Eina_Bool in_search_path;
18}; 18};
19 19
20static Theme *tsel = NULL; 20static Theme *tsel = NULL;
@@ -119,7 +119,9 @@ config_exit(void *data __UNUSED__,
119} 119}
120 120
121static void 121static void
122cf_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 122cf_round(void *data __UNUSED__,
123 Evas_Object *obj,
124 void *event_info __UNUSED__)
123{ 125{
124 double val = elm_slider_value_get(obj); 126 double val = elm_slider_value_get(obj);
125 double v; 127 double v;
@@ -129,7 +131,9 @@ cf_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
129} 131}
130 132
131static void 133static void
132cf_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 134cf_change(void *data __UNUSED__,
135 Evas_Object *obj,
136 void *event_info __UNUSED__)
133{ 137{
134 double scale = elm_scale_get(); 138 double scale = elm_scale_get();
135 double val = elm_slider_value_get(obj); 139 double val = elm_slider_value_get(obj);
@@ -139,7 +143,9 @@ cf_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
139} 143}
140 144
141static void 145static void
142fc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 146fc_round(void *data __UNUSED__,
147 Evas_Object *obj,
148 void *event_info __UNUSED__)
143{ 149{
144 double val = elm_slider_value_get(obj); 150 double val = elm_slider_value_get(obj);
145 double v; 151 double v;
@@ -149,7 +155,9 @@ fc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
149} 155}
150 156
151static void 157static void
152fc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 158fc_change(void *data __UNUSED__,
159 Evas_Object *obj,
160 void *event_info __UNUSED__)
153{ 161{
154 double font_cache = elm_font_cache_get(); 162 double font_cache = elm_font_cache_get();
155 double val = elm_slider_value_get(obj); 163 double val = elm_slider_value_get(obj);
@@ -159,7 +167,9 @@ fc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
159} 167}
160 168
161static void 169static void
162ic_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 170ic_round(void *data __UNUSED__,
171 Evas_Object *obj,
172 void *event_info __UNUSED__)
163{ 173{
164 double val = elm_slider_value_get(obj); 174 double val = elm_slider_value_get(obj);
165 double v; 175 double v;
@@ -169,7 +179,9 @@ ic_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
169} 179}
170 180
171static void 181static void
172ic_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 182ic_change(void *data __UNUSED__,
183 Evas_Object *obj,
184 void *event_info __UNUSED__)
173{ 185{
174 double image_cache = elm_image_cache_get(); 186 double image_cache = elm_image_cache_get();
175 double val = elm_slider_value_get(obj); 187 double val = elm_slider_value_get(obj);
@@ -179,7 +191,9 @@ ic_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
179} 191}
180 192
181static void 193static void
182sc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 194sc_round(void *data __UNUSED__,
195 Evas_Object *obj,
196 void *event_info __UNUSED__)
183{ 197{
184 double val = elm_slider_value_get(obj); 198 double val = elm_slider_value_get(obj);
185 double v; 199 double v;
@@ -189,7 +203,9 @@ sc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
189} 203}
190 204
191static void 205static void
192sc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 206sc_change(void *data __UNUSED__,
207 Evas_Object *obj,
208 void *event_info __UNUSED__)
193{ 209{
194 double scale = elm_scale_get(); 210 double scale = elm_scale_get();
195 double val = elm_slider_value_get(obj); 211 double val = elm_slider_value_get(obj);
@@ -199,7 +215,9 @@ sc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
199} 215}
200 216
201static void 217static void
202fs_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 218fs_round(void *data __UNUSED__,
219 Evas_Object *obj,
220 void *event_info __UNUSED__)
203{ 221{
204 double val = elm_slider_value_get(obj); 222 double val = elm_slider_value_get(obj);
205 double v; 223 double v;
@@ -209,7 +227,9 @@ fs_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
209} 227}
210 228
211static void 229static void
212fs_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 230fs_change(void *data __UNUSED__,
231 Evas_Object *obj,
232 void *event_info __UNUSED__)
213{ 233{
214 double scale = elm_scale_get(); 234 double scale = elm_scale_get();
215 double val = elm_slider_value_get(obj); 235 double val = elm_slider_value_get(obj);
@@ -219,7 +239,9 @@ fs_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
219} 239}
220 240
221static void 241static void
222efc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 242efc_round(void *data __UNUSED__,
243 Evas_Object *obj,
244 void *event_info __UNUSED__)
223{ 245{
224 double val = elm_slider_value_get(obj); 246 double val = elm_slider_value_get(obj);
225 double v; 247 double v;
@@ -229,7 +251,9 @@ efc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
229} 251}
230 252
231static void 253static void
232efc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 254efc_change(void *data __UNUSED__,
255 Evas_Object *obj,
256 void *event_info __UNUSED__)
233{ 257{
234 double scale = elm_scale_get(); 258 double scale = elm_scale_get();
235 double val = elm_slider_value_get(obj); 259 double val = elm_slider_value_get(obj);
@@ -239,7 +263,9 @@ efc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
239} 263}
240 264
241static void 265static void
242ecc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 266ecc_round(void *data __UNUSED__,
267 Evas_Object *obj,
268 void *event_info __UNUSED__)
243{ 269{
244 double val = elm_slider_value_get(obj); 270 double val = elm_slider_value_get(obj);
245 double v; 271 double v;
@@ -249,7 +275,9 @@ ecc_round(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
249} 275}
250 276
251static void 277static void
252ecc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 278ecc_change(void *data __UNUSED__,
279 Evas_Object *obj,
280 void *event_info __UNUSED__)
253{ 281{
254 double scale = elm_scale_get(); 282 double scale = elm_scale_get();
255 double val = elm_slider_value_get(obj); 283 double val = elm_slider_value_get(obj);
@@ -259,7 +287,8 @@ ecc_change(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
259} 287}
260 288
261static void 289static void
262_status_basic(Evas_Object *win, Evas_Object *bx0) 290_status_basic(Evas_Object *win,
291 Evas_Object *bx0)
263{ 292{
264 Evas_Object *lb, *fr; 293 Evas_Object *lb, *fr;
265 294
@@ -278,7 +307,8 @@ _status_basic(Evas_Object *win, Evas_Object *bx0)
278} 307}
279 308
280static void 309static void
281_status_config(Evas_Object *win, Evas_Object *bx0) 310_status_config(Evas_Object *win,
311 Evas_Object *bx0)
282{ 312{
283 Evas_Object *lb, *pd, *bx2, *fr, *sl, *sp; 313 Evas_Object *lb, *pd, *bx2, *fr, *sl, *sp;
284 314
@@ -303,7 +333,7 @@ _status_config(Evas_Object *win, Evas_Object *bx0)
303 lb = elm_label_add(win); 333 lb = elm_label_add(win);
304 evas_object_size_hint_weight_set(lb, 1.0, 0.0); 334 evas_object_size_hint_weight_set(lb, 1.0, 0.0);
305 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 335 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
306 elm_label_label_set(lb,"<hilight>Scale</>"); 336 elm_label_label_set(lb, "<hilight>Scale</>");
307 elm_frame_content_set(pd, lb); 337 elm_frame_content_set(pd, lb);
308 evas_object_show(lb); 338 evas_object_show(lb);
309 339
@@ -359,13 +389,13 @@ _status_config(Evas_Object *win, Evas_Object *bx0)
359 // FIXME: add theme selector (basic mode and advanced for fallbacks) 389 // FIXME: add theme selector (basic mode and advanced for fallbacks)
360 // FIXME: save config 390 // FIXME: save config
361 // FIXME: profile selector / creator etc. 391 // FIXME: profile selector / creator etc.
362 //
363 elm_frame_content_set(fr, bx2); 392 elm_frame_content_set(fr, bx2);
364 evas_object_show(bx2); 393 evas_object_show(bx2);
365} 394}
366 395
367static void 396static void
368_flip_to(Evas_Object *win, const char *name) 397_flip_to(Evas_Object *win,
398 const char *name)
369{ 399{
370 Evas_Object *wid, *pager; 400 Evas_Object *wid, *pager;
371 wid = evas_object_data_get(win, name); 401 wid = evas_object_data_get(win, name);
@@ -374,43 +404,57 @@ _flip_to(Evas_Object *win, const char *name)
374} 404}
375 405
376static void 406static void
377_cf_sizing(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 407_cf_sizing(void *data,
408 Evas_Object *obj __UNUSED__,
409 void *event_info __UNUSED__)
378{ 410{
379 _flip_to(data, "sizing"); 411 _flip_to(data, "sizing");
380} 412}
381 413
382static void 414static void
383_cf_themes(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 415_cf_themes(void *data,
416 Evas_Object *obj __UNUSED__,
417 void *event_info __UNUSED__)
384{ 418{
385 _flip_to(data, "themes"); 419 _flip_to(data, "themes");
386} 420}
387 421
388static void 422static void
389_cf_fonts(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 423_cf_fonts(void *data,
424 Evas_Object *obj __UNUSED__,
425 void *event_info __UNUSED__)
390{ 426{
391 _flip_to(data, "fonts"); 427 _flip_to(data, "fonts");
392} 428}
393 429
394static void 430static void
395_cf_profiles(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 431_cf_profiles(void *data,
432 Evas_Object *obj __UNUSED__,
433 void *event_info __UNUSED__)
396{ 434{
397 _flip_to(data, "profiles"); 435 _flip_to(data, "profiles");
398} 436}
399 437
400static void 438static void
401_cf_scrolling(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 439_cf_scrolling(void *data,
440 Evas_Object *obj __UNUSED__,
441 void *event_info __UNUSED__)
402{ 442{
403 _flip_to(data, "scrolling"); 443 _flip_to(data, "scrolling");
404} 444}
405 445
406static void 446static void
407_cf_rendering(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 447_cf_rendering(void *data,
448 Evas_Object *obj __UNUSED__,
449 void *event_info __UNUSED__)
408{ 450{
409 _flip_to(data, "rendering"); 451 _flip_to(data, "rendering");
410} 452}
411 453
412static void 454static void
413_cf_caches(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 455_cf_caches(void *data,
456 Evas_Object *obj __UNUSED__,
457 void *event_info __UNUSED__)
414{ 458{
415 _flip_to(data, "caches"); 459 _flip_to(data, "caches");
416} 460}
@@ -424,23 +468,23 @@ _elm_theme_current_get(const char *theme_search_order)
424 if (!theme_search_order) 468 if (!theme_search_order)
425 return NULL; 469 return NULL;
426 470
427 for (p = theme_search_order; ; p++) 471 for (p = theme_search_order;; p++)
428 { 472 {
429 if ((*p == ':') || (!*p)) 473 if ((*p == ':') || (!*p))
430 { 474 {
431 if (p > theme_search_order) 475 if (p > theme_search_order)
432 { 476 {
433 char *n = malloc(p - theme_search_order + 1); 477 char *n = malloc(p - theme_search_order + 1);
434 if (!n) 478 if (!n)
435 return NULL; 479 return NULL;
436 480
437 strncpy(n, theme_search_order, p - theme_search_order); 481 strncpy(n, theme_search_order, p - theme_search_order);
438 n[p - theme_search_order] = 0; 482 n[p - theme_search_order] = 0;
439 ret = eina_stringshare_add(n); 483 ret = eina_stringshare_add(n);
440 free(n); 484 free(n);
441 break; 485 break;
442 } 486 }
443 } 487 }
444 } 488 }
445 489
446 return ret; 490 return ret;
@@ -566,7 +610,8 @@ _font_overlay_change(void *data __UNUSED__,
566 { 610 {
567 const char *name; 611 const char *name;
568 612
569 name = elm_font_fontconfig_name_get(tc_data->font, tc_data->style); 613 name = elm_font_fontconfig_name_get(tc_data->font,
614 tc_data->style);
570 elm_font_overlay_set(tc_data->name, name, 615 elm_font_overlay_set(tc_data->name, name,
571 tc_data->size ? tc_data->size : -100); 616 tc_data->size ? tc_data->size : -100);
572 elm_font_fontconfig_name_free(name); 617 elm_font_fontconfig_name_free(name);
@@ -582,7 +627,8 @@ _font_overlay_change(void *data __UNUSED__,
582} 627}
583 628
584static void 629static void
585_profile_change_do(Evas_Object *win, const char *profile) 630_profile_change_do(Evas_Object *win,
631 const char *profile)
586{ 632{
587 int flush_interval, font_c, image_c, edje_file_c, edje_col_c; 633 int flush_interval, font_c, image_c, edje_file_c, edje_col_c;
588 const char *curr_theme, *curr_engine; 634 const char *curr_theme, *curr_engine;
@@ -639,16 +685,18 @@ _profile_change_do(Evas_Object *win, const char *profile)
639 l_items = elm_list_items_get(evas_object_data_get(win, "engines_list")); 685 l_items = elm_list_items_get(evas_object_data_get(win, "engines_list"));
640 EINA_LIST_FOREACH(l_items, l, it) 686 EINA_LIST_FOREACH(l_items, l, it)
641 { 687 {
642 if (!strcmp(elm_list_item_data_get(it), curr_engine)) 688 if (!strcmp(elm_list_item_data_get(it), curr_engine))
643 { 689 {
644 elm_list_item_selected_set(it, EINA_TRUE); 690 elm_list_item_selected_set(it, EINA_TRUE);
645 break; 691 break;
646 } 692 }
647 } 693 }
648} 694}
649 695
650static void 696static void
651_engine_use(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 697_engine_use(void *data,
698 Evas_Object *obj __UNUSED__,
699 void *event_info __UNUSED__)
652{ 700{
653 Evas_Object *li; 701 Evas_Object *li;
654 const char *selection; 702 const char *selection;
@@ -664,7 +712,9 @@ _engine_use(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__
664} 712}
665 713
666static void 714static void
667_profile_use(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 715_profile_use(void *data,
716 Evas_Object *obj __UNUSED__,
717 void *event_info __UNUSED__)
668{ 718{
669 Evas_Object *li; 719 Evas_Object *li;
670 const char *selection; 720 const char *selection;
@@ -683,13 +733,17 @@ _profile_use(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_
683} 733}
684 734
685static void 735static void
686_btn_todo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 736_btn_todo(void *data __UNUSED__,
737 Evas_Object *obj __UNUSED__,
738 void *event_info __UNUSED__)
687{ 739{
688 printf("To be done!\n"); 740 printf("To be done!\n");
689} 741}
690 742
691static void 743static void
692_profile_reset(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 744_profile_reset(void *data,
745 Evas_Object *obj __UNUSED__,
746 void *event_info __UNUSED__)
693{ 747{
694 const char *selection, *curr; 748 const char *selection, *curr;
695 const char *pdir; 749 const char *pdir;
@@ -715,7 +769,9 @@ _profile_reset(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSE
715} 769}
716 770
717static void 771static void
718_theme_use(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 772_theme_use(void *data __UNUSED__,
773 Evas_Object *obj __UNUSED__,
774 void *event_info __UNUSED__)
719{ 775{
720 const char *defth; 776 const char *defth;
721 char *newth; 777 char *newth;
@@ -743,7 +799,9 @@ _theme_use(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
743} 799}
744 800
745static void 801static void
746_theme_sel(void *data, Evas_Object *obj, void *event_info __UNUSED__) 802_theme_sel(void *data,
803 Evas_Object *obj,
804 void *event_info __UNUSED__)
747{ 805{
748 Theme *t = data; 806 Theme *t = data;
749 Evas_Object *win = elm_object_top_widget_get(obj); 807 Evas_Object *win = elm_object_top_widget_get(obj);
@@ -777,13 +835,14 @@ _theme_sel(void *data, Evas_Object *obj, void *event_info __UNUSED__)
777} 835}
778 836
779/*static void 837/*static void
780 _theme_browse(void *data, Evas_Object *obj, void *event_info) 838 _theme_browse(void *data, Evas_Object *obj, void *event_info)
781 { 839 {
782 printf("not implemented\n"); 840 printf("not implemented\n");
783 }*/ 841 }*/
784 842
785static void 843static void
786_status_config_sizing(Evas_Object *win, Evas_Object *pager) 844_status_config_sizing(Evas_Object *win,
845 Evas_Object *pager)
787{ 846{
788 Evas_Object *lb, *pd, *bx, *sl, *sp; 847 Evas_Object *lb, *pd, *bx, *sl, *sp;
789 848
@@ -801,7 +860,7 @@ _status_config_sizing(Evas_Object *win, Evas_Object *pager)
801 lb = elm_label_add(win); 860 lb = elm_label_add(win);
802 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); 861 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
803 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 862 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
804 elm_label_label_set(lb,"<hilight>Scale</>"); 863 elm_label_label_set(lb, "<hilight>Scale</>");
805 elm_frame_content_set(pd, lb); 864 elm_frame_content_set(pd, lb);
806 evas_object_show(lb); 865 evas_object_show(lb);
807 866
@@ -930,9 +989,9 @@ _sample_theme_new(Evas_Object *win)
930 elm_frame_content_set(fr, li); 989 elm_frame_content_set(fr, li);
931 evas_object_show(li); 990 evas_object_show(li);
932 991
933 elm_list_item_append(li, "List Item 1", NULL, NULL, NULL, NULL); 992 elm_list_item_append(li, "List Item 1", NULL, NULL, NULL, NULL);
934 elm_list_item_append(li, "Second Item", NULL, NULL, NULL, NULL); 993 elm_list_item_append(li, "Second Item", NULL, NULL, NULL, NULL);
935 elm_list_item_append(li, "Third Item", NULL, NULL, NULL, NULL); 994 elm_list_item_append(li, "Third Item", NULL, NULL, NULL, NULL);
936 elm_list_go(li); 995 elm_list_go(li);
937 996
938 rc = evas_object_rectangle_add(evas_object_evas_get(win)); 997 rc = evas_object_rectangle_add(evas_object_evas_get(win));
@@ -943,7 +1002,8 @@ _sample_theme_new(Evas_Object *win)
943} 1002}
944 1003
945static void 1004static void
946_status_config_themes(Evas_Object *win, Evas_Object *pager) 1005_status_config_themes(Evas_Object *win,
1006 Evas_Object *pager)
947{ 1007{
948 Evas_Object *tb, *rc, *sc, *sp, *li, *pd, *fr, *bt, *sample; 1008 Evas_Object *tb, *rc, *sc, *sp, *li, *pd, *fr, *bt, *sample;
949 Eina_List *list, *l; 1009 Eina_List *list, *l;
@@ -1016,7 +1076,7 @@ _status_config_themes(Evas_Object *win, Evas_Object *pager)
1016 t->label = eina_stringshare_add(s); 1076 t->label = eina_stringshare_add(s);
1017 } 1077 }
1018 themes = eina_list_append(themes, t); 1078 themes = eina_list_append(themes, t);
1019 elm_list_item_append(li, t->label, NULL, NULL, _theme_sel, t); 1079 elm_list_item_append(li, t->label, NULL, NULL, _theme_sel, t);
1020 } 1080 }
1021 elm_theme_name_available_list_free(list); 1081 elm_theme_name_available_list_free(list);
1022 1082
@@ -1037,7 +1097,7 @@ _status_config_themes(Evas_Object *win, Evas_Object *pager)
1037 evas_object_size_hint_align_set(bt, 0.9, 0.9); 1097 evas_object_size_hint_align_set(bt, 0.9, 0.9);
1038 elm_frame_content_set(pd, bt); 1098 elm_frame_content_set(pd, bt);
1039 evas_object_show(bt); 1099 evas_object_show(bt);
1040 */ 1100 */
1041 pd = elm_frame_add(win); 1101 pd = elm_frame_add(win);
1042 elm_object_style_set(pd, "pad_medium"); 1102 elm_object_style_set(pd, "pad_medium");
1043 evas_object_size_hint_weight_set(pd, 1.0, 0.0); 1103 evas_object_size_hint_weight_set(pd, 1.0, 0.0);
@@ -1092,7 +1152,9 @@ _status_config_themes(Evas_Object *win, Evas_Object *pager)
1092} 1152}
1093 1153
1094static void 1154static void
1095_unimplemented(Evas_Object *win, Evas_Object *pager, const char *name) 1155_unimplemented(Evas_Object *win,
1156 Evas_Object *pager,
1157 const char *name)
1096{ 1158{
1097 Evas_Object *lb, *pd, *bx2; 1159 Evas_Object *lb, *pd, *bx2;
1098 1160
@@ -1110,7 +1172,7 @@ _unimplemented(Evas_Object *win, Evas_Object *pager, const char *name)
1110 lb = elm_label_add(win); 1172 lb = elm_label_add(win);
1111 evas_object_size_hint_weight_set(lb, 0.0, 0.0); 1173 evas_object_size_hint_weight_set(lb, 0.0, 0.0);
1112 evas_object_size_hint_align_set(lb, 0.5, 0.5); 1174 evas_object_size_hint_align_set(lb, 0.5, 0.5);
1113 elm_label_label_set(lb,"<hilight>Not implemented yet</>"); 1175 elm_label_label_set(lb, "<hilight>Not implemented yet</>");
1114 elm_frame_content_set(pd, lb); 1176 elm_frame_content_set(pd, lb);
1115 evas_object_show(lb); 1177 evas_object_show(lb);
1116 1178
@@ -1359,8 +1421,8 @@ _font_classes_list_load(Evas_Object *li)
1359 edje_freeze(); 1421 edje_freeze();
1360 1422
1361 EINA_LIST_FOREACH(fdata.text_classes, l, tc_data) 1423 EINA_LIST_FOREACH(fdata.text_classes, l, tc_data)
1362 elm_list_item_append(li, tc_data->desc, NULL, NULL, _font_classes_list_sel, 1424 elm_list_item_append(li, tc_data->desc, NULL, NULL,
1363 tc_data); 1425 _font_classes_list_sel, tc_data);
1364 1426
1365 evas_object_smart_callback_add(li, "unselected", _fc_list_unselect_cb, 1427 evas_object_smart_callback_add(li, "unselected", _fc_list_unselect_cb,
1366 NULL); 1428 NULL);
@@ -1410,7 +1472,8 @@ _fonts_data_fill(Evas *evas)
1410 { 1472 {
1411 tc_data->font = eina_stringshare_add(efp->name); 1473 tc_data->font = eina_stringshare_add(efp->name);
1412 /* we're sure we recorded with only 1 style selected */ 1474 /* we're sure we recorded with only 1 style selected */
1413 tc_data->style = eina_stringshare_add(efp->styles->data); 1475 tc_data->style =
1476 eina_stringshare_add(efp->styles->data);
1414 elm_font_properties_free(efp); 1477 elm_font_properties_free(efp);
1415 } 1478 }
1416 } 1479 }
@@ -1555,10 +1618,10 @@ _font_names_list_load(Evas_Object *flist)
1555 EINA_LIST_FOREACH(names_list, l, font) 1618 EINA_LIST_FOREACH(names_list, l, font)
1556 elm_list_item_append(flist, font, NULL, NULL, _font_names_list_sel, NULL); 1619 elm_list_item_append(flist, font, NULL, NULL, _font_names_list_sel, NULL);
1557 1620
1558 EINA_LIST_FREE(names_list, font); 1621 EINA_LIST_FREE(names_list, font) ;
1559 1622
1560 evas_object_smart_callback_add(flist, "unselected", _fnames_list_unselect_cb, 1623 evas_object_smart_callback_add(flist, "unselected",
1561 NULL); 1624 _fnames_list_unselect_cb, NULL);
1562 1625
1563 elm_list_go(flist); 1626 elm_list_go(flist);
1564 1627
@@ -1738,19 +1801,25 @@ _status_config_fonts(Evas_Object *win,
1738} 1801}
1739 1802
1740static void 1803static void
1741_engines_list_item_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 1804_engines_list_item_del_cb(void *data,
1805 Evas_Object *obj __UNUSED__,
1806 void *event_info __UNUSED__)
1742{ 1807{
1743 free(data); 1808 free(data);
1744} 1809}
1745 1810
1746static void 1811static void
1747_profiles_list_item_del_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) 1812_profiles_list_item_del_cb(void *data,
1813 Evas_Object *obj __UNUSED__,
1814 void *event_info __UNUSED__)
1748{ 1815{
1749 free(data); 1816 free(data);
1750} 1817}
1751 1818
1752static void 1819static void
1753_profiles_list_selected_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) 1820_profiles_list_selected_cb(void *data,
1821 Evas_Object *obj,
1822 void *event_info __UNUSED__)
1754{ 1823{
1755 const char *cur_profile = NULL; 1824 const char *cur_profile = NULL;
1756 const char *sel_profile, *pdir; 1825 const char *sel_profile, *pdir;
@@ -1776,16 +1845,16 @@ _profiles_list_selected_cb(void *data, Evas_Object *obj, void *event_info __UNUS
1776 if ((desk) && (desk->name)) prof_name = desk->name; 1845 if ((desk) && (desk->name)) prof_name = desk->name;
1777 else 1846 else
1778#endif 1847#endif
1779 prof_name = cur_profile; 1848 prof_name = cur_profile;
1780 1849
1781 if (!pdir) 1850 if (!pdir)
1782 elm_object_disabled_set(evas_object_data_get(obj, "prof_reset_btn"), 1851 elm_object_disabled_set(evas_object_data_get(obj, "prof_reset_btn"),
1783 cur_selected); 1852 cur_selected);
1784 else 1853 else
1785 { 1854 {
1786 elm_object_disabled_set(evas_object_data_get(obj, "prof_del_btn"), 1855 elm_object_disabled_set(evas_object_data_get(obj, "prof_del_btn"),
1787 EINA_TRUE); 1856 EINA_TRUE);
1788 elm_profile_dir_free(pdir); 1857 elm_profile_dir_free(pdir);
1789 } 1858 }
1790 1859
1791 snprintf(buf, sizeof(buf), "<hilight>Selected profile: %s</><br>", 1860 snprintf(buf, sizeof(buf), "<hilight>Selected profile: %s</><br>",
@@ -1797,7 +1866,7 @@ _profiles_list_selected_cb(void *data, Evas_Object *obj, void *event_info __UNUS
1797 if (desk) elm_scrolled_entry_entry_set(en, desk->comment); 1866 if (desk) elm_scrolled_entry_entry_set(en, desk->comment);
1798 else 1867 else
1799#endif 1868#endif
1800 elm_scrolled_entry_entry_set(en, "Unknown"); 1869 elm_scrolled_entry_entry_set(en, "Unknown");
1801 1870
1802#ifdef ELM_EFREET 1871#ifdef ELM_EFREET
1803 if (desk) efreet_desktop_free(desk); 1872 if (desk) efreet_desktop_free(desk);
@@ -1805,7 +1874,8 @@ _profiles_list_selected_cb(void *data, Evas_Object *obj, void *event_info __UNUS
1805} 1874}
1806 1875
1807static void 1876static void
1808_profiles_list_fill(Evas_Object *l_widget, Eina_List *p_names) 1877_profiles_list_fill(Evas_Object *l_widget,
1878 Eina_List *p_names)
1809{ 1879{
1810 const char *cur_profile = NULL; 1880 const char *cur_profile = NULL;
1811 const char *profile; 1881 const char *profile;
@@ -1822,7 +1892,7 @@ _profiles_list_fill(Evas_Object *l_widget, Eina_List *p_names)
1822 EINA_LIST_FOREACH(p_names, l, profile) 1892 EINA_LIST_FOREACH(p_names, l, profile)
1823 { 1893 {
1824#ifdef ELM_EFREET 1894#ifdef ELM_EFREET
1825 Efreet_Desktop *desk = NULL; 1895 Efreet_Desktop *desk = NULL;
1826#endif 1896#endif
1827 const char *label, *ext, *pdir; 1897 const char *label, *ext, *pdir;
1828 char buf[PATH_MAX]; 1898 char buf[PATH_MAX];
@@ -1865,7 +1935,7 @@ _profiles_list_fill(Evas_Object *l_widget, Eina_List *p_names)
1865 elm_profile_dir_free(pdir); 1935 elm_profile_dir_free(pdir);
1866 1936
1867#ifdef ELM_EFREET 1937#ifdef ELM_EFREET
1868 if (desk) efreet_desktop_free(desk); 1938 if (desk) efreet_desktop_free(desk);
1869#endif 1939#endif
1870 } 1940 }
1871 1941
@@ -1874,10 +1944,11 @@ _profiles_list_fill(Evas_Object *l_widget, Eina_List *p_names)
1874} 1944}
1875 1945
1876static void 1946static void
1877_status_config_profiles(Evas_Object *win, Evas_Object *pager) 1947_status_config_profiles(Evas_Object *win,
1948 Evas_Object *pager)
1878{ 1949{
1879 Evas_Object *li, *bx, *fr_bx1, *fr_bx2, *btn_bx, *fr, *lb, *en, *sp, *pd, 1950 Evas_Object *li, *bx, *fr_bx1, *fr_bx2, *btn_bx, *fr, *lb, *en, *sp, *pd,
1880 *bt; 1951 *bt;
1881 Eina_List *profs; 1952 Eina_List *profs;
1882 Evas *evas; 1953 Evas *evas;
1883 1954
@@ -1886,13 +1957,15 @@ _status_config_profiles(Evas_Object *win, Evas_Object *pager)
1886 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); 1957 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
1887 1958
1888 fr_bx1 = elm_box_add(win); 1959 fr_bx1 = elm_box_add(win);
1889 evas_object_size_hint_weight_set(fr_bx1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1960 evas_object_size_hint_weight_set(fr_bx1, EVAS_HINT_EXPAND,
1961 EVAS_HINT_EXPAND);
1890 evas_object_size_hint_align_set(fr_bx1, EVAS_HINT_FILL, EVAS_HINT_FILL); 1962 evas_object_size_hint_align_set(fr_bx1, EVAS_HINT_FILL, EVAS_HINT_FILL);
1891 elm_box_homogenous_set(fr_bx1, EINA_TRUE); 1963 elm_box_homogenous_set(fr_bx1, EINA_TRUE);
1892 evas_object_show(fr_bx1); 1964 evas_object_show(fr_bx1);
1893 1965
1894 fr_bx2 = elm_box_add(win); 1966 fr_bx2 = elm_box_add(win);
1895 evas_object_size_hint_weight_set(fr_bx2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 1967 evas_object_size_hint_weight_set(fr_bx2, EVAS_HINT_EXPAND,
1968 EVAS_HINT_EXPAND);
1896 evas_object_size_hint_align_set(fr_bx2, EVAS_HINT_FILL, EVAS_HINT_FILL); 1969 evas_object_size_hint_align_set(fr_bx2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1897 evas_object_show(fr_bx2); 1970 evas_object_show(fr_bx2);
1898 1971
@@ -1949,7 +2022,8 @@ _status_config_profiles(Evas_Object *win, Evas_Object *pager)
1949 2022
1950 btn_bx = elm_box_add(win); 2023 btn_bx = elm_box_add(win);
1951 elm_box_horizontal_set(btn_bx, EINA_TRUE); 2024 elm_box_horizontal_set(btn_bx, EINA_TRUE);
1952 evas_object_size_hint_weight_set(btn_bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 2025 evas_object_size_hint_weight_set(btn_bx, EVAS_HINT_EXPAND,
2026 EVAS_HINT_EXPAND);
1953 evas_object_size_hint_align_set(btn_bx, EVAS_HINT_FILL, EVAS_HINT_FILL); 2027 evas_object_size_hint_align_set(btn_bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
1954 evas_object_show(btn_bx); 2028 evas_object_show(btn_bx);
1955 2029
@@ -2007,7 +2081,8 @@ _status_config_profiles(Evas_Object *win, Evas_Object *pager)
2007} 2081}
2008 2082
2009static void 2083static void
2010_status_config_scrolling(Evas_Object *win, Evas_Object *pager) 2084_status_config_scrolling(Evas_Object *win,
2085 Evas_Object *pager)
2011{ 2086{
2012 _unimplemented(win, pager, "scrolling"); 2087 _unimplemented(win, pager, "scrolling");
2013} 2088}
@@ -2015,17 +2090,17 @@ _status_config_scrolling(Evas_Object *win, Evas_Object *pager)
2015static char * 2090static char *
2016_engine_name_prettify(const char *engine) 2091_engine_name_prettify(const char *engine)
2017{ 2092{
2018 char *ret, *ptr; 2093 char *ret, *ptr;
2019 2094
2020 ret = strdup(engine); 2095 ret = strdup(engine);
2021 ret[0] -= 0x20; 2096 ret[0] -= 0x20;
2022 2097
2023 while ((ptr = strpbrk(ret, "_"))) 2098 while ((ptr = strpbrk(ret, "_")))
2024 { 2099 {
2025 *ptr = ' '; 2100 *ptr = ' ';
2026 } 2101 }
2027 2102
2028 return ret; 2103 return ret;
2029} 2104}
2030 2105
2031/* FIXME! ideally, we would trim elm_config.c's _elm_engines list at 2106/* FIXME! ideally, we would trim elm_config.c's _elm_engines list at
@@ -2033,37 +2108,38 @@ _engine_name_prettify(const char *engine)
2033static Eina_Bool 2108static Eina_Bool
2034_elm_engine_supported(const char *engine) 2109_elm_engine_supported(const char *engine)
2035{ 2110{
2036 const char *engines[] = { 2111 const char *engines[] = {
2037 "software_x11", 2112 "software_x11",
2038 "fb", 2113 "fb",
2039 "directfb", 2114 "directfb",
2040 "software_16_x11", 2115 "software_16_x11",
2041 "software_8_x11", 2116 "software_8_x11",
2042 "xrender_x11", 2117 "xrender_x11",
2043 "opengl_x11", 2118 "opengl_x11",
2044 "software_gdi", 2119 "software_gdi",
2045 "software_16_wince_gdi", 2120 "software_16_wince_gdi",
2046 "sdl", 2121 "sdl",
2047 "software_16_sdl", 2122 "software_16_sdl",
2048 "opengl_sdl", 2123 "opengl_sdl",
2049 NULL 2124 NULL
2050 }; 2125 };
2051 2126
2052 unsigned int i; 2127 unsigned int i;
2053 2128
2054 for (i = 0; engines[i]; i++) 2129 for (i = 0; engines[i]; i++)
2055 { 2130 {
2056#define ENGINE_COMPARE(name) (!strcmp(engines[i], name)) 2131#define ENGINE_COMPARE(name) (!strcmp(engines[i], name))
2057 if (ENGINE_COMPARE(engine)) 2132 if (ENGINE_COMPARE(engine))
2058 return EINA_TRUE; 2133 return EINA_TRUE;
2059#undef ENGINE_COMPARE 2134#undef ENGINE_COMPARE
2060 } 2135 }
2061 2136
2062 return EINA_FALSE; 2137 return EINA_FALSE;
2063} 2138}
2064 2139
2065static void 2140static void
2066_engines_list_fill(Evas_Object *l_widget, Eina_List *e_names) 2141_engines_list_fill(Evas_Object *l_widget,
2142 Eina_List *e_names)
2067{ 2143{
2068 const char *engine, *cur_engine; 2144 const char *engine, *cur_engine;
2069 void *sel_it = NULL; 2145 void *sel_it = NULL;
@@ -2098,7 +2174,8 @@ _engines_list_fill(Evas_Object *l_widget, Eina_List *e_names)
2098} 2174}
2099 2175
2100static void 2176static void
2101_status_config_rendering(Evas_Object *win, Evas_Object *pager) 2177_status_config_rendering(Evas_Object *win,
2178 Evas_Object *pager)
2102{ 2179{
2103 Evas_Object *li, *bx, *fr, *sp, *pd, *bt; 2180 Evas_Object *li, *bx, *fr, *sp, *pd, *bt;
2104 Eina_List *engines; 2181 Eina_List *engines;
@@ -2154,7 +2231,8 @@ _status_config_rendering(Evas_Object *win, Evas_Object *pager)
2154} 2231}
2155 2232
2156static void 2233static void
2157_status_config_caches(Evas_Object *win, Evas_Object *pager) 2234_status_config_caches(Evas_Object *win,
2235 Evas_Object *pager)
2158{ 2236{
2159 Evas_Object *lb, *pd, *bx, *sl, *sp; 2237 Evas_Object *lb, *pd, *bx, *sl, *sp;
2160 2238
@@ -2172,7 +2250,7 @@ _status_config_caches(Evas_Object *win, Evas_Object *pager)
2172 lb = elm_label_add(win); 2250 lb = elm_label_add(win);
2173 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); 2251 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2174 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 2252 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2175 elm_label_label_set(lb,"<hilight>Cache Flush Interval</>"); 2253 elm_label_label_set(lb, "<hilight>Cache Flush Interval</>");
2176 elm_frame_content_set(pd, lb); 2254 elm_frame_content_set(pd, lb);
2177 evas_object_show(lb); 2255 evas_object_show(lb);
2178 2256
@@ -2208,7 +2286,7 @@ _status_config_caches(Evas_Object *win, Evas_Object *pager)
2208 lb = elm_label_add(win); 2286 lb = elm_label_add(win);
2209 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); 2287 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2210 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 2288 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2211 elm_label_label_set(lb,"<hilight>Font Cache Size</>"); 2289 elm_label_label_set(lb, "<hilight>Font Cache Size</>");
2212 elm_frame_content_set(pd, lb); 2290 elm_frame_content_set(pd, lb);
2213 evas_object_show(lb); 2291 evas_object_show(lb);
2214 2292
@@ -2280,7 +2358,7 @@ _status_config_caches(Evas_Object *win, Evas_Object *pager)
2280 lb = elm_label_add(win); 2358 lb = elm_label_add(win);
2281 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); 2359 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2282 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 2360 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2283 elm_label_label_set(lb,"<hilight>Number of Edje Files to Cache</>"); 2361 elm_label_label_set(lb, "<hilight>Number of Edje Files to Cache</>");
2284 elm_frame_content_set(pd, lb); 2362 elm_frame_content_set(pd, lb);
2285 evas_object_show(lb); 2363 evas_object_show(lb);
2286 2364
@@ -2316,7 +2394,7 @@ _status_config_caches(Evas_Object *win, Evas_Object *pager)
2316 lb = elm_label_add(win); 2394 lb = elm_label_add(win);
2317 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); 2395 evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0);
2318 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5); 2396 evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, 0.5);
2319 elm_label_label_set(lb,"<hilight>Number of Edje Collections to Cache</>"); 2397 elm_label_label_set(lb, "<hilight>Number of Edje Collections to Cache</>");
2320 elm_frame_content_set(pd, lb); 2398 elm_frame_content_set(pd, lb);
2321 evas_object_show(lb); 2399 evas_object_show(lb);
2322 2400
@@ -2341,7 +2419,8 @@ _status_config_caches(Evas_Object *win, Evas_Object *pager)
2341} 2419}
2342 2420
2343static void 2421static void
2344_status_config_full(Evas_Object *win, Evas_Object *bx0) 2422_status_config_full(Evas_Object *win,
2423 Evas_Object *bx0)
2345{ 2424{
2346 Evas_Object *tb, *pager; 2425 Evas_Object *tb, *pager;
2347 Elm_Toolbar_Item *sizing, *it; 2426 Elm_Toolbar_Item *sizing, *it;
@@ -2415,7 +2494,8 @@ status_win(void)
2415 evas_object_show(bx0); 2494 evas_object_show(bx0);
2416 2495
2417 if (!interactive) _status_basic(win, bx0); 2496 if (!interactive) _status_basic(win, bx0);
2418 else if (0) _status_config(win, bx0); 2497 else if (0)
2498 _status_config(win, bx0);
2419 else _status_config_full(win, bx0); 2499 else _status_config_full(win, bx0);
2420 2500
2421 evas_object_resize(win, 320, 480); 2501 evas_object_resize(win, 320, 480);
@@ -2433,7 +2513,8 @@ _exit_timer(void *data __UNUSED__)
2433 * after elm_init() and MUST be passed argc and argv, and MUST be called 2513 * after elm_init() and MUST be passed argc and argv, and MUST be called
2434 * elm_main and not be static - must be a visible symbol with EAPI infront */ 2514 * elm_main and not be static - must be a visible symbol with EAPI infront */
2435EAPI int 2515EAPI int
2436elm_main(int argc, char **argv) 2516elm_main(int argc,
2517 char **argv)
2437{ 2518{
2438 int i; 2519 int i;
2439 2520
@@ -2508,6 +2589,7 @@ elm_main(int argc, char **argv)
2508 /* exit code */ 2589 /* exit code */
2509 return 0; 2590 return 0;
2510} 2591}
2592
2511#endif 2593#endif
2512/* All emelentary apps should use this. Put it right after elm_main() */ 2594/* All emelentary apps should use this. Put it right after elm_main() */
2513ELM_MAIN() 2595ELM_MAIN()