From 77dae71b13e766e85e5e6974fa0f0f29f1189caa Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 28 Jun 2012 13:12:13 +0000 Subject: [PATCH] formatting SVN revision: 73003 --- src/modules/wizard/e_mod_main.c | 37 ++++--- src/modules/wizard/e_wizard.c | 185 +++++++++++++++---------------- src/modules/wizard/page_000.c | 5 +- src/modules/wizard/page_010.c | 189 ++++++++++++++++---------------- src/modules/wizard/page_011.c | 19 ++-- src/modules/wizard/page_020.c | 81 +++++++------- src/modules/wizard/page_030.c | 5 +- src/modules/wizard/page_040.c | 11 +- src/modules/wizard/page_050.c | 49 +++++---- src/modules/wizard/page_060.c | 9 +- src/modules/wizard/page_070.c | 23 ++-- src/modules/wizard/page_080.c | 11 +- src/modules/wizard/page_090.c | 27 ++--- src/modules/wizard/page_100.c | 9 +- src/modules/wizard/page_110.c | 32 +++--- src/modules/wizard/page_120.c | 15 +-- src/modules/wizard/page_130.c | 5 +- src/modules/wizard/page_140.c | 5 +- src/modules/wizard/page_150.c | 83 +++++++------- src/modules/wizard/page_160.c | 7 +- src/modules/wizard/page_170.c | 51 ++++----- src/modules/wizard/page_200.c | 1 + 22 files changed, 442 insertions(+), 417 deletions(-) diff --git a/src/modules/wizard/e_mod_main.c b/src/modules/wizard/e_mod_main.c index 8067b603d..87820fbf3 100644 --- a/src/modules/wizard/e_mod_main.c +++ b/src/modules/wizard/e_mod_main.c @@ -6,13 +6,13 @@ E_Module *wiz_module = NULL; /* * These are the currently planned wizard pages: - * + * * o == interactive * . == automatic (no gui - none implemented currently) - * + * * * = done * - = code here, but disabled in build - * + * * --- THE LIST * o *ask for language (default selection is current locale). * o *ask for initial profile @@ -24,7 +24,7 @@ E_Module *wiz_module = NULL; * o -ask click to focus or sloppy * . *take some of current config (language, fileman, profile) and load * load profile, apply language to it and save, restart e. - * + * * why are some disabled? profiels take care of this and do a better job * at collecting all the things together. for example illume makes no sense * with pointer focus and ibar icons/desktop makes no sense. @@ -34,10 +34,10 @@ E_Module *wiz_module = NULL; EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, - "Wizard" + "Wizard" }; -static int +static int _cb_sort_files(char *f1, char *f2) { return strcmp(f1, f2); @@ -49,10 +49,10 @@ e_modapi_init(E_Module *m) Eina_List *files; char buf[PATH_MAX]; char *file; - + wiz_module = m; e_wizard_init(); - + snprintf(buf, sizeof(buf), "%s/%s", e_module_dir_get(m), MODULE_ARCH); files = ecore_file_ls(buf); files = eina_list_sort(files, 0, (Eina_Compare_Cb)_cb_sort_files); @@ -61,17 +61,17 @@ e_modapi_init(E_Module *m) if (!strncmp(file, "page_", 5)) { void *handle; - + snprintf(buf, sizeof(buf), "%s/%s/%s", e_module_dir_get(m), MODULE_ARCH, file); handle = dlopen(buf, RTLD_NOW | RTLD_GLOBAL); if (handle) - e_wizard_page_add(handle, - dlsym(handle, "wizard_page_init"), - dlsym(handle, "wizard_page_shutdown"), - dlsym(handle, "wizard_page_show"), - dlsym(handle, "wizard_page_hide"), - dlsym(handle, "wizard_page_apply")); + e_wizard_page_add(handle, + dlsym(handle, "wizard_page_init"), + dlsym(handle, "wizard_page_shutdown"), + dlsym(handle, "wizard_page_show"), + dlsym(handle, "wizard_page_hide"), + dlsym(handle, "wizard_page_apply")); else { // if its an executable... @@ -80,10 +80,10 @@ e_modapi_init(E_Module *m) printf("%s\n", dlerror()); } } - free(file); + free(file); } e_wizard_go(); - + return m; } @@ -92,7 +92,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__) { e_wizard_shutdown(); wiz_module = NULL; -// FIXME: wrong place +// FIXME: wrong place // e_module_disable(m); /* disable - on restart this won't be loaded now */ // e_sys_action_do(E_SYS_RESTART, NULL); /* restart e - cleanly try settings */ return 1; @@ -103,3 +103,4 @@ e_modapi_save(E_Module *m __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/e_wizard.c b/src/modules/wizard/e_wizard.c index bec990d97..4fdc87d8b 100644 --- a/src/modules/wizard/e_wizard.c +++ b/src/modules/wizard/e_wizard.c @@ -1,11 +1,11 @@ #include "e.h" #include "e_mod_main.h" -static void _e_wizard_next_eval(void); +static void _e_wizard_next_eval(void); static E_Popup *_e_wizard_main_new(E_Zone *zone); static E_Popup *_e_wizard_extra_new(E_Zone *zone); -static void _e_wizard_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); -static void _e_wizard_cb_next(void *data, Evas_Object *obj, const char *emission, const char *source); +static void _e_wizard_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event); +static void _e_wizard_cb_next(void *data, Evas_Object *obj, const char *emission, const char *source); static E_Popup *pop = NULL; static Eina_List *pops = NULL; @@ -26,21 +26,21 @@ e_wizard_init(void) EINA_LIST_FOREACH(e_manager_list(), l, man) { E_Container *con; - Eina_List *l2; + Eina_List *l2; EINA_LIST_FOREACH(man->containers, l2, con) - { - Eina_List *l3; + { + Eina_List *l3; E_Zone *zone; EINA_LIST_FOREACH(con->zones, l3, zone) - { - if (!pop) - pop = _e_wizard_main_new(zone); - else - pops = eina_list_append(pops, _e_wizard_extra_new(zone)); - } - } + { + if (!pop) + pop = _e_wizard_main_new(zone); + else + pops = eina_list_append(pops, _e_wizard_extra_new(zone)); + } + } } return 1; } @@ -53,8 +53,8 @@ e_wizard_shutdown(void) if (pop) { - e_object_del(E_OBJECT(pop)); - pop = NULL; + e_object_del(E_OBJECT(pop)); + pop = NULL; } EINA_LIST_FREE(pops, eo) @@ -69,20 +69,20 @@ e_wizard_go(void) { if (!curpage) { - if (pages) - { - curpage = pages->data; - if (pages->next) next_can = 1; - } + if (pages) + { + curpage = pages->data; + if (pages->next) next_can = 1; + } } if (curpage) { - if ((!curpage->data) && (curpage->init)) curpage->init(curpage); - _e_wizard_next_eval(); - if ((curpage->show) && (!curpage->show(curpage))) - { - e_wizard_next(); - } + if ((!curpage->data) && (curpage->init)) curpage->init(curpage); + _e_wizard_next_eval(); + if ((curpage->show) && (!curpage->show(curpage))) + { + e_wizard_next(); + } } } @@ -92,11 +92,11 @@ e_wizard_apply(void) Eina_List *l; for (l = pages; l; l = l->next) - { - E_Wizard_Page *pg; + { + E_Wizard_Page *pg; - pg = l->data; - if (pg->apply) pg->apply(pg); + pg = l->data; + if (pg->apply) pg->apply(pg); } } @@ -108,36 +108,36 @@ e_wizard_next(void) EINA_LIST_FOREACH(pages, l, page) { - if (page == curpage) - { - if (eina_list_next(l)) - { - if (curpage) - { - if (curpage->hide) - curpage->hide(curpage); - } - curpage = eina_list_data_get(eina_list_next(l)); - if (!curpage->data) - { + if (page == curpage) + { + if (eina_list_next(l)) + { + if (curpage) + { + if (curpage->hide) + curpage->hide(curpage); + } + curpage = eina_list_data_get(eina_list_next(l)); + if (!curpage->data) + { if (curpage->init) - curpage->init(curpage); - } - next_can = 1; - _e_wizard_next_eval(); - if ((curpage->show) && (curpage->show(curpage))) - { - break; - } - } - else - { - /* FINISH */ - e_wizard_apply(); - e_wizard_shutdown(); - return; - } - } + curpage->init(curpage); + } + next_can = 1; + _e_wizard_next_eval(); + if ((curpage->show) && (curpage->show(curpage))) + { + break; + } + } + else + { + /* FINISH */ + e_wizard_apply(); + e_wizard_shutdown(); + return; + } + } } } @@ -150,23 +150,23 @@ e_wizard_page_show(Evas_Object *obj) { Evas_Coord minw, minh; - e_widget_size_min_get(obj, &minw, &minh); - edje_extern_object_min_size_set(obj, minw, minh); - edje_object_part_swallow(o_bg, "e.swallow.content", obj); - evas_object_show(obj); - e_widget_focus_set(obj, 1); - edje_object_signal_emit(o_bg, "e,action,page,new", "e"); + e_widget_size_min_get(obj, &minw, &minh); + edje_extern_object_min_size_set(obj, minw, minh); + edje_object_part_swallow(o_bg, "e.swallow.content", obj); + evas_object_show(obj); + e_widget_focus_set(obj, 1); + edje_object_signal_emit(o_bg, "e,action,page,new", "e"); } } EAPI E_Wizard_Page * e_wizard_page_add(void *handle, - int (*init_cb) (E_Wizard_Page *pg), - int (*shutdown_cb) (E_Wizard_Page *pg), - int (*show_cb) (E_Wizard_Page *pg), - int (*hide_cb) (E_Wizard_Page *pg), - int (*apply_cb) (E_Wizard_Page *pg) - ) + int (*init_cb)(E_Wizard_Page *pg), + int (*shutdown_cb)(E_Wizard_Page *pg), + int (*show_cb)(E_Wizard_Page *pg), + int (*hide_cb)(E_Wizard_Page *pg), + int (*apply_cb)(E_Wizard_Page *pg) + ) { E_Wizard_Page *pg; @@ -232,9 +232,9 @@ _e_wizard_next_eval(void) if (!next_ok) ok = 0; if (next_prev != ok) { - if (ok) edje_object_signal_emit(o_bg, "e,state,next,enable", "e"); - else edje_object_signal_emit(o_bg, "e,state,next,disable", "e"); - next_prev = ok; + if (ok) edje_object_signal_emit(o_bg, "e,state,next,enable", "e"); + else edje_object_signal_emit(o_bg, "e,state,next,disable", "e"); + next_prev = ok; } } @@ -255,28 +255,28 @@ _e_wizard_main_new(E_Zone *zone) evas_object_resize(o, zone->w, zone->h); evas_object_show(o); edje_object_signal_callback_add(o, "e,action,next", "", - _e_wizard_cb_next, popup); + _e_wizard_cb_next, popup); o_bg = o; o = evas_object_rectangle_add(popup->evas); mask = 0; kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) - fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); + fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); mask = evas_key_modifier_mask_get(popup->evas, "Shift"); kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); if (!kg) - fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); + fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); mask = 0; kg = evas_object_key_grab(o, "Return", mask, ~mask, 0); if (!kg) - fprintf(stderr,"ERROR: unable to redirect \"Return\" key events to object %p.\n", o); + fprintf(stderr, "ERROR: unable to redirect \"Return\" key events to object %p.\n", o); mask = 0; kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0); if (!kg) - fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o); + fprintf(stderr, "ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o); evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, - _e_wizard_cb_key_down, popup); + _e_wizard_cb_key_down, popup); /* set up next/prev buttons */ edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment")); @@ -286,10 +286,10 @@ _e_wizard_main_new(E_Zone *zone) e_popup_edje_bg_object_set(popup, o_bg); e_popup_show(popup); if (!e_grabinput_get(ecore_evas_software_x11_window_get(popup->ecore_evas), - 1, ecore_evas_software_x11_window_get(popup->ecore_evas))) + 1, ecore_evas_software_x11_window_get(popup->ecore_evas))) { - e_object_del(E_OBJECT(popup)); - popup = NULL; + e_object_del(E_OBJECT(popup)); + popup = NULL; } return popup; } @@ -321,19 +321,19 @@ _e_wizard_cb_key_down(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *ob if (!o_content) return; if (!strcmp(ev->keyname, "Tab")) { - if (evas_key_modifier_is_set(ev->modifiers, "Shift")) - e_widget_focus_jump(o_content, 0); - else - e_widget_focus_jump(o_content, 1); + if (evas_key_modifier_is_set(ev->modifiers, "Shift")) + e_widget_focus_jump(o_content, 0); + else + e_widget_focus_jump(o_content, 1); } else if (((!strcmp(ev->keyname, "Return")) || - (!strcmp(ev->keyname, "KP_Enter")) || - (!strcmp(ev->keyname, "space")))) + (!strcmp(ev->keyname, "KP_Enter")) || + (!strcmp(ev->keyname, "space")))) { - Evas_Object *o; + Evas_Object *o; - o = e_widget_focused_object_get(o_content); - if (o) e_widget_activate(o); + o = e_widget_focused_object_get(o_content); + if (o) e_widget_activate(o); } } @@ -342,3 +342,4 @@ _e_wizard_cb_next(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char { e_wizard_next(); } + diff --git a/src/modules/wizard/page_000.c b/src/modules/wizard/page_000.c index b7b07c4e5..5fc2dce78 100644 --- a/src/modules/wizard/page_000.c +++ b/src/modules/wizard/page_000.c @@ -27,13 +27,13 @@ EAPI int wizard_page_show(E_Wizard_Page *pg __UNUSED__) { Evas_Object *o; - + e_wizard_title_set(_("Enlightenment")); e_wizard_button_next_enable_set(0); o = edje_object_add(pg->evas); e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/firstpage"); e_wizard_page_show(o); - + ecore_timer_add(2.0, _next_page, NULL); return 1; } @@ -49,3 +49,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_010.c b/src/modules/wizard/page_010.c index 735fafd52..592ed25e4 100644 --- a/src/modules/wizard/page_010.c +++ b/src/modules/wizard/page_010.c @@ -13,46 +13,46 @@ struct _E_Intl_Pair const char *locale_translation; }; -const E_Intl_Pair basic_language_predefined_pairs[ ] = +const E_Intl_Pair basic_language_predefined_pairs[] = { - {"ar_AE.UTF-8", "ara_flag.png", "العربية"}, - {"bg_BG.UTF-8", "bg_flag.png", "Български"}, - {"ca_ES.UTF-8", "cat_flag.png", "Català"}, - {"cs_CZ.UTF-8", "cz_flag.png", "Čeština"}, - {"da_DK.UTF-8", "dk_flag.png", "Dansk"}, - {"de_DE.UTF-8", "de_flag.png", "Deutsch"}, - {"en_US.UTF-8", "us_flag.png", "English"}, - {"en_GB.UTF-8", "bg_flag.png", "British English"}, - {"el_GR.UTF-8", "gr_flag.png", "Ελληνικά"}, - {"eo.UTF-8", "epo_flag.png", "Esperanto"}, - {"es_AR.UTF-8", "ar_flag.png", "Español"}, - {"et_ET.UTF-8", "ee_flag.png", "Eesti keel"}, - {"fi_FI.UTF-8", "fi_flag.png", "Suomi"}, - {"fo_FO.UTF-8", "fo_flag.png", "Føroyskt"}, - {"fr_CH.UTF-8", "ch_flag.png", "Français (Suisse)"}, - {"fr_FR.UTF-8", "fr_flag.png", "Français"}, - {"he_HE.UTF-8", "il_flag.png", "עברית"}, - {"hr_HR.UTF-8", "hr_flag.png", "Hrvatski"}, - {"hu_HU.UTF-8", "hu_flag.png", "Magyar"}, - {"it_IT.UTF-8", "it_flag.png", "Italiano"}, - {"ja_JP.UTF-8", "jp_flag.png", "日本語"}, - {"km_KM.UTF-8", "kh_flag.png", "ភាសាខ្មែរ"}, - {"ko_KR.UTF-8", "kr_flag.png", "한국어"}, - {"ku.UTF-8", "ku_flag.png", "یدروك"}, - {"lt_LT.UTF-8", "lt_flag.png", "Lietuvių kalba"}, - {"ms_MY.UTF-8", "my_flag.png", "Bahasa Melayu"}, - {"nb_NO.UTF-8", "no_flag.png", "Norsk Bokmål"}, - {"nl_NL.UTF-8", "nl_flag.png", "Nederlands"}, - {"pl_PL.UTF-8", "pl_flag.png", "Polski"}, - {"pt_BR.UTF-8", "br_flag.png", "Português"}, - {"ru_RU.UTF-8", "ru_flag.png", "Русский"}, - {"sk_SK.UTF-8", "sk_flag.png", "Slovenčina"}, - {"sl_SI.UTF-8", "si_flag.png", "Slovenščina"}, - {"sv_SE.UTF-8", "se_flag.png", "Svenska"}, - {"tr_TR.UTF-8", "tr_flag.png", "Türkçe"}, - {"uk_UK.UTF-8", "ua_flag.png", "Українська мова"}, - {"zh_CN.UTF-8", "cn_flag.png", "中文 (繁体)"}, - {"zh_TW.UTF-8", "tw_flag.png", "中文 (繁體)"}, + {"ar_AE.UTF-8", "ara_flag.png", "العربية"}, + {"bg_BG.UTF-8", "bg_flag.png", "Български"}, + {"ca_ES.UTF-8", "cat_flag.png", "Català"}, + {"cs_CZ.UTF-8", "cz_flag.png", "Čeština"}, + {"da_DK.UTF-8", "dk_flag.png", "Dansk"}, + {"de_DE.UTF-8", "de_flag.png", "Deutsch"}, + {"en_US.UTF-8", "us_flag.png", "English"}, + {"en_GB.UTF-8", "bg_flag.png", "British English"}, + {"el_GR.UTF-8", "gr_flag.png", "Ελληνικά"}, + {"eo.UTF-8", "epo_flag.png", "Esperanto"}, + {"es_AR.UTF-8", "ar_flag.png", "Español"}, + {"et_ET.UTF-8", "ee_flag.png", "Eesti keel"}, + {"fi_FI.UTF-8", "fi_flag.png", "Suomi"}, + {"fo_FO.UTF-8", "fo_flag.png", "Føroyskt"}, + {"fr_CH.UTF-8", "ch_flag.png", "Français (Suisse)"}, + {"fr_FR.UTF-8", "fr_flag.png", "Français"}, + {"he_HE.UTF-8", "il_flag.png", "עברית"}, + {"hr_HR.UTF-8", "hr_flag.png", "Hrvatski"}, + {"hu_HU.UTF-8", "hu_flag.png", "Magyar"}, + {"it_IT.UTF-8", "it_flag.png", "Italiano"}, + {"ja_JP.UTF-8", "jp_flag.png", "日本語"}, + {"km_KM.UTF-8", "kh_flag.png", "ភាសាខ្មែរ"}, + {"ko_KR.UTF-8", "kr_flag.png", "한국어"}, + {"ku.UTF-8", "ku_flag.png", "یدروك"}, + {"lt_LT.UTF-8", "lt_flag.png", "Lietuvių kalba"}, + {"ms_MY.UTF-8", "my_flag.png", "Bahasa Melayu"}, + {"nb_NO.UTF-8", "no_flag.png", "Norsk Bokmål"}, + {"nl_NL.UTF-8", "nl_flag.png", "Nederlands"}, + {"pl_PL.UTF-8", "pl_flag.png", "Polski"}, + {"pt_BR.UTF-8", "br_flag.png", "Português"}, + {"ru_RU.UTF-8", "ru_flag.png", "Русский"}, + {"sk_SK.UTF-8", "sk_flag.png", "Slovenčina"}, + {"sl_SI.UTF-8", "si_flag.png", "Slovenščina"}, + {"sv_SE.UTF-8", "se_flag.png", "Svenska"}, + {"tr_TR.UTF-8", "tr_flag.png", "Türkçe"}, + {"uk_UK.UTF-8", "ua_flag.png", "Українська мова"}, + {"zh_CN.UTF-8", "cn_flag.png", "中文 (繁体)"}, + {"zh_TW.UTF-8", "tw_flag.png", "中文 (繁體)"}, { NULL, NULL, NULL } }; @@ -78,7 +78,7 @@ _basic_lang_list_sort(const void *data1, const void *data2) if (!ln2->locale_translation) return -1; trans2 = ln2->locale_translation; - return (strcmp(trans1, trans2)); + return strcmp(trans1, trans2); } EAPI int @@ -93,49 +93,49 @@ wizard_page_init(E_Wizard_Page *pg __UNUSED__) #endif if (output) { - char line[32]; + char line[32]; - while (fscanf(output, "%[^\n]\n", line) == 1) - { - E_Locale_Parts *locale_parts; + while (fscanf(output, "%[^\n]\n", line) == 1) + { + E_Locale_Parts *locale_parts; - locale_parts = e_intl_locale_parts_get(line); - if (locale_parts) - { - char *basic_language; + locale_parts = e_intl_locale_parts_get(line); + if (locale_parts) + { + char *basic_language; - basic_language = - e_intl_locale_parts_combine - (locale_parts, E_INTL_LOC_LANG | E_INTL_LOC_REGION); - if (basic_language) - { - int i = 0; + basic_language = + e_intl_locale_parts_combine + (locale_parts, E_INTL_LOC_LANG | E_INTL_LOC_REGION); + if (basic_language) + { + int i = 0; - while (basic_language_predefined_pairs[i].locale_key) - { - /* if basic language is supported by E and System*/ - if (!strncmp - (basic_language_predefined_pairs[i].locale_key, - basic_language, strlen(basic_language))) - { - if (!eina_list_data_find - (blang_list, - &basic_language_predefined_pairs[i])) - blang_list = eina_list_append - (blang_list, - &basic_language_predefined_pairs[i]); - break; - } - i++; - } - } - E_FREE(basic_language); - e_intl_locale_parts_free(locale_parts); - } - } - /* Sort basic languages */ - blang_list = eina_list_sort(blang_list, eina_list_count(blang_list), _basic_lang_list_sort); - pclose(output); + while (basic_language_predefined_pairs[i].locale_key) + { + /* if basic language is supported by E and System*/ + if (!strncmp + (basic_language_predefined_pairs[i].locale_key, + basic_language, strlen(basic_language))) + { + if (!eina_list_data_find + (blang_list, + &basic_language_predefined_pairs[i])) + blang_list = eina_list_append + (blang_list, + &basic_language_predefined_pairs[i]); + break; + } + i++; + } + } + E_FREE(basic_language); + e_intl_locale_parts_free(locale_parts); + } + } + /* Sort basic languages */ + blang_list = eina_list_sort(blang_list, eina_list_count(blang_list), _basic_lang_list_sort); + pclose(output); } return 1; } @@ -169,22 +169,22 @@ wizard_page_show(E_Wizard_Page *pg) NULL, NULL, NULL); for (i = 1, l = blang_list; l; l = l->next, i++) { - E_Intl_Pair *pair; + E_Intl_Pair *pair; - pair = l->data; - if (pair->locale_icon) - { - e_prefix_data_snprintf(buf, sizeof(buf), "data/flags/%s", pair->locale_icon); - ic = e_util_icon_add(buf, pg->evas); - } + pair = l->data; + if (pair->locale_icon) + { + e_prefix_data_snprintf(buf, sizeof(buf), "data/flags/%s", pair->locale_icon); + ic = e_util_icon_add(buf, pg->evas); + } else - ic = NULL; - e_widget_ilist_append(ob, ic, _(pair->locale_translation), - NULL, NULL, pair->locale_key); - if (e_intl_language_get()) - { - if (!strcmp(pair->locale_key, e_intl_language_get())) sel = i; - } + ic = NULL; + e_widget_ilist_append(ob, ic, _(pair->locale_translation), + NULL, NULL, pair->locale_key); + if (e_intl_language_get()) + { + if (!strcmp(pair->locale_key, e_intl_language_get())) sel = i; + } } e_widget_ilist_go(ob); e_widget_ilist_thaw(ob); @@ -207,7 +207,7 @@ EAPI int wizard_page_hide(E_Wizard_Page *pg __UNUSED__) { // evas_object_del(pg->data); - /* special - language inits its stuff the moment it goes away */ +/* special - language inits its stuff the moment it goes away */ eina_stringshare_del(e_config->language); e_config->language = eina_stringshare_ref(lang); e_intl_language_set(e_config->language); @@ -225,3 +225,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) e_wizard_labels_update(); return 1; } + diff --git a/src/modules/wizard/page_011.c b/src/modules/wizard/page_011.c index df8a42f6c..dff9a17ba 100644 --- a/src/modules/wizard/page_011.c +++ b/src/modules/wizard/page_011.c @@ -29,7 +29,7 @@ find_rules(void) "/usr/local/X11R6/lib/X11/xkb/rules/xfree86.lst", NULL }; - + for (; lstfiles[i]; i++) { FILE *f = fopen(lstfiles[i], "r"); @@ -56,17 +56,17 @@ parse_rules(void) char buf[4096]; FILE *f = fopen(rules_file, "r"); if (!f) return 0; - - for (;;) + + for (;; ) { if (!fgets(buf, sizeof(buf), f)) goto err; if (!strncmp(buf, "! layout", 8)) { - for (;;) + for (;; ) { Layout *lay; char name[4096], label[4096]; - + if (!fgets(buf, sizeof(buf), f)) goto err; if (sscanf(buf, "%s %[^\n]", name, label) != 2) break; lay = calloc(1, sizeof(Layout)); @@ -92,7 +92,7 @@ implement_layout(void) Eina_List *l; E_Config_XKB_Layout *nl; Eina_Bool found = EINA_FALSE; - + EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, nl) { if ((nl->name) && (!strcmp(layout, nl->name))) @@ -148,12 +148,12 @@ wizard_page_show(E_Wizard_Page *pg) Layout *lay; const char *label; - lay = l->data; + lay = l->data; ic = e_icon_add(pg->evas); e_xkb_e_icon_flag_setup(ic, lay->name); label = lay->label; if (!label) label = "Unknown"; - e_widget_ilist_append(ob, ic, _(label), NULL, NULL, lay->name); + e_widget_ilist_append(ob, ic, _(label), NULL, NULL, lay->name); if (lay->name) { if (!strcmp(lay->name, "us")) sel = i; @@ -167,7 +167,7 @@ wizard_page_show(E_Wizard_Page *pg) e_widget_ilist_selected_set(ob, sel); e_widget_ilist_nth_show(ob, sel, 0); } - + e_widget_framelist_object_append(of, ob); e_widget_list_object_append(o, of, 1, 1, 0.5); evas_object_show(ob); @@ -191,3 +191,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) implement_layout(); return 1; } + diff --git a/src/modules/wizard/page_020.c b/src/modules/wizard/page_020.c index e95dd8191..505c81fec 100644 --- a/src/modules/wizard/page_020.c +++ b/src/modules/wizard/page_020.c @@ -16,8 +16,8 @@ _profile_change(void *data __UNUSED__, Evas_Object *obj __UNUSED__) dir = strdup(buf); if (!dir) { - e_widget_textblock_markup_set(textblock, _("Unknown")); - return; + e_widget_textblock_markup_set(textblock, _("Unknown")); + return; } snprintf(buf, sizeof(buf), "%s/profile.desktop", dir); desk = efreet_desktop_new(buf); @@ -56,7 +56,7 @@ wizard_page_show(E_Wizard_Page *pg) o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Profile")); of = e_widget_framelist_add(pg->evas, _("Select one"), 0); - + ob = e_widget_ilist_add(pg->evas, 32 * e_scale, 32 * e_scale, &profile); e_widget_size_min_set(ob, 140 * e_scale, 70 * e_scale); ilist = ob; @@ -68,45 +68,45 @@ wizard_page_show(E_Wizard_Page *pg) for (i = 0, l = profiles; l; l = l->next, i++) { Efreet_Desktop *desk = NULL; - char buf[PATH_MAX], *prof; - const char *label, *dir; - Evas_Object *ic; + char buf[PATH_MAX], *prof; + const char *label, *dir; + Evas_Object *ic; - prof = l->data; - if (e_config_profile_get()) - { - if (!strcmp(prof, e_config_profile_get())) - { - free(prof); - continue; - } - } - e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s", prof); - // if it's not a system profile - don't offer it - if (!ecore_file_is_dir(buf)) - { - free(prof); - continue; - } - dir = strdup(buf); - if (!dir) - { - free(prof); - continue; - } + prof = l->data; + if (e_config_profile_get()) + { + if (!strcmp(prof, e_config_profile_get())) + { + free(prof); + continue; + } + } + e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s", prof); + // if it's not a system profile - don't offer it + if (!ecore_file_is_dir(buf)) + { + free(prof); + continue; + } + dir = strdup(buf); + if (!dir) + { + free(prof); + continue; + } if (!strcmp(prof, "standard")) sel = i; - snprintf(buf, sizeof(buf), "%s/profile.desktop", dir); + snprintf(buf, sizeof(buf), "%s/profile.desktop", dir); desk = efreet_desktop_new(buf); - label = prof; - if ((desk) && (desk->name)) label = desk->name; - snprintf(buf, sizeof(buf), "%s/icon.edj", dir); - if ((desk) && (desk->icon)) - snprintf(buf, sizeof(buf), "%s/%s", dir, desk->icon); - else - e_prefix_data_concat_static(buf, "data/images/enlightenment.png"); - ic = e_util_icon_add(buf, pg->evas); - e_widget_ilist_append(ob, ic, label, NULL, NULL, prof); - free(prof); + label = prof; + if ((desk) && (desk->name)) label = desk->name; + snprintf(buf, sizeof(buf), "%s/icon.edj", dir); + if ((desk) && (desk->icon)) + snprintf(buf, sizeof(buf), "%s/%s", dir, desk->icon); + else + e_prefix_data_concat_static(buf, "data/images/enlightenment.png"); + ic = e_util_icon_add(buf, pg->evas); + e_widget_ilist_append(ob, ic, label, NULL, NULL, prof); + free(prof); if (desk) efreet_desktop_free(desk); } if (profiles) eina_list_free(profiles); @@ -139,7 +139,7 @@ EAPI int wizard_page_hide(E_Wizard_Page *pg __UNUSED__) { // evas_object_del(pg->data); - // actually apply profile +// actually apply profile if (!profile) profile = "standard"; e_config_profile_set(profile); e_config_profile_del(e_config_profile_get()); @@ -153,3 +153,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_030.c b/src/modules/wizard/page_030.c index 509f4cc42..e09b7dc67 100644 --- a/src/modules/wizard/page_030.c +++ b/src/modules/wizard/page_030.c @@ -18,8 +18,8 @@ EAPI int wizard_page_show(E_Wizard_Page *pg __UNUSED__) { char buf[PATH_MAX]; - - snprintf(buf, sizeof(buf), "%s/etc/xdg/menus/enlightenment.menu", + + snprintf(buf, sizeof(buf), "%s/etc/xdg/menus/enlightenment.menu", e_prefix_get()); e_config->default_system_menu = eina_stringshare_add(buf); return 0; /* 1 == show ui, and wait for user, 0 == just continue */ @@ -36,3 +36,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_040.c b/src/modules/wizard/page_040.c index 54b108f4d..734136d30 100644 --- a/src/modules/wizard/page_040.c +++ b/src/modules/wizard/page_040.c @@ -27,7 +27,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) if (!extra_desks) return 0; EINA_LIST_FREE(extra_desks, file) { - snprintf(buf, sizeof(buf), "%s/extra_desktops/%s", + snprintf(buf, sizeof(buf), "%s/extra_desktops/%s", e_wizard_dir_get(), file); extra_desk = efreet_desktop_uncached_new(buf); if (extra_desk) @@ -35,7 +35,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) if (extra_desk->exec) { char abuf[4096], dbuf[4096]; - + found = 0; if (sscanf(extra_desk->exec, "%4000s", abuf) == 1) { @@ -49,7 +49,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) if (sscanf(desk->exec, "%4000s", dbuf) == 1) { char *p1, *p2; - + p1 = strrchr(dbuf, '/'); if (p1) p1++; else p1 = dbuf; @@ -66,11 +66,11 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) if (!found) { // copy file - snprintf(abuf, sizeof(abuf), + snprintf(abuf, sizeof(abuf), "%s/applications", efreet_data_home_get()); ecore_file_mkpath(abuf); - snprintf(abuf, sizeof(abuf), + snprintf(abuf, sizeof(abuf), "%s/applications/%s", efreet_data_home_get(), file); ecore_file_cp(buf, abuf); @@ -94,3 +94,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_050.c b/src/modules/wizard/page_050.c index c9d168407..b7e71b47e 100644 --- a/src/modules/wizard/page_050.c +++ b/src/modules/wizard/page_050.c @@ -24,7 +24,7 @@ _scale_preview_sel_set(Evas_Object *ob, int sel) double *sc, scl; int v; Eina_List *l; - + rc = evas_object_data_get(ob, "rec"); if (sel) { @@ -46,7 +46,7 @@ static void _scale_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) { Evas_Object *ob = data; - + _scale_preview_sel_set(ob, 1); } @@ -57,54 +57,54 @@ _scale_preview_new(Evas *e, double sc, double *scp) const char *file; char buf[64]; int v; - + #define SZW 110 #define SZH 80 ob = e_widget_preview_add(e, SZW, SZH); e_widget_preview_vsize_set(ob, SZW, SZH); - + bg = edje_object_add(e_widget_preview_evas_get(ob)); file = e_bg_file_get(0, 0, 0, 0); edje_object_file_set(bg, file, "e/desktop/background"); evas_object_move(bg, 0, 0); evas_object_resize(bg, 640, 480); evas_object_show(bg); - + cm = edje_object_add(e_widget_preview_evas_get(ob)); e_theme_edje_object_set(cm, "base/theme/borders", "e/comp/default"); evas_object_move(cm, 16, 16); evas_object_resize(cm, 320, 400); evas_object_show(cm); - + bd = edje_object_add(e_widget_preview_evas_get(ob)); e_theme_edje_object_set(bd, "base/theme/borders", "e/widgets/border/default/border"); edje_object_part_swallow(cm, "e.swallow.content", bd); evas_object_show(bd); - + wb = edje_object_add(e_widget_preview_evas_get(ob)); e_theme_edje_object_set(wb, "base/theme/dialog", "e/widgets/dialog/main"); edje_object_part_swallow(bd, "e.swallow.client", wb); evas_object_show(wb); - + rc = evas_object_rectangle_add(e_widget_preview_evas_get(ob)); evas_object_move(rc, 0, 0); evas_object_resize(rc, 640, 480); evas_object_color_set(rc, 0, 0, 0, 192); evas_object_show(rc); - + snprintf(buf, sizeof(buf), "%1.1f %s", sc, _("Title")); edje_object_part_text_set(bd, "e.text.title", buf); edje_object_signal_emit(bd, "e,state,focused", "e"); - + edje_object_signal_emit(cm, "e,state,visible,on", "e"); edje_object_signal_emit(cm, "e,state,shadow,on", "e"); edje_object_signal_emit(cm, "e,state,focus,on", "e"); - + edje_object_scale_set(bd, sc); edje_object_scale_set(cm, sc); edje_object_scale_set(bg, sc); edje_object_scale_set(wb, sc); - + evas_object_data_set(ob, "rec", rc); v = sc * 1000; evas_object_data_set(ob, "scale", (void *)(unsigned long)v); @@ -114,7 +114,7 @@ _scale_preview_new(Evas *e, double sc, double *scp) EVAS_CALLBACK_MOUSE_DOWN, _scale_down, ob); obs = eina_list_append(obs, ob); - + return ob; } @@ -123,48 +123,48 @@ wizard_page_show(E_Wizard_Page *pg) { Evas_Object *o, *of, *ob; Evas_Coord sw, sh; - + o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Sizing")); - + of = e_widget_frametable_add(pg->evas, _("Select preferred size"), 1); e_widget_frametable_content_align_set(of, 0.5, 0.5); - + ob = _scale_preview_new(pg->evas, 0.80, &scale); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 0, 0, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + ob = _scale_preview_new(pg->evas, 1.00, &scale); _scale_preview_sel_set(ob, 1); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 1, 0, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + ob = _scale_preview_new(pg->evas, 1.20, &scale); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 0, 1, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + ob = _scale_preview_new(pg->evas, 1.50, &scale); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 1, 1, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + ob = _scale_preview_new(pg->evas, 1.70, &scale); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 0, 2, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + ob = _scale_preview_new(pg->evas, 2.00, &scale); e_widget_size_min_get(ob, &sw, &sh); e_widget_frametable_object_append_full(of, ob, 1, 2, 1, 1, 0, 0, 1, 1, 0.5, 0.5, sw, sh, sw, sh); evas_object_show(ob); - + e_widget_list_object_append(o, of, 0, 0, 0.5); evas_object_show(ob); evas_object_show(of); - + e_wizard_page_show(o); // pg->data = o; return 1; /* 1 == show ui, and wait for user, 0 == just continue */ @@ -175,7 +175,7 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__) { obs = eina_list_free(obs); // evas_object_del(pg->data); - + e_config->scale.use_dpi = 0; e_config->scale.use_custom = 1; e_config->scale.factor = scale; @@ -188,3 +188,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_060.c b/src/modules/wizard/page_060.c index 01de44433..ae6e6e464 100644 --- a/src/modules/wizard/page_060.c +++ b/src/modules/wizard/page_060.c @@ -23,21 +23,21 @@ wizard_page_show(E_Wizard_Page *pg) E_Radio_Group *rg; if (e_config->focus_policy == E_FOCUS_CLICK) focus_mode = 0; - + o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Window Focus")); - + of = e_widget_framelist_add(pg->evas, _("Focus by ..."), 0); rg = e_widget_radio_group_new(&focus_mode); - + ob = e_widget_radio_add(pg->evas, _("Click"), 0, rg); e_widget_framelist_object_append(of, ob); evas_object_show(ob); ob = e_widget_radio_add(pg->evas, _("Mouse Over"), 1, rg); e_widget_framelist_object_append(of, ob); evas_object_show(ob); - + e_widget_list_object_append(o, of, 0, 0, 0.5); evas_object_show(of); @@ -78,3 +78,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_070.c b/src/modules/wizard/page_070.c index 846450c58..55ba244f4 100644 --- a/src/modules/wizard/page_070.c +++ b/src/modules/wizard/page_070.c @@ -22,17 +22,17 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) int i; const char *selected = NULL; const char *search[] = - { - "gnome", - "Humanity", - "Humanity-Dark", - "ubuntu-mono-light", - "ubuntu-mono-dark", - "ubuntu-mono-light", - "unity-icon-theme", - NULL - }; - + { + "gnome", + "Humanity", + "Humanity-Dark", + "ubuntu-mono-light", + "ubuntu-mono-dark", + "ubuntu-mono-light", + "unity-icon-theme", + NULL + }; + if (!themes) return 0; for (i = 0; search[i]; i++) { @@ -66,3 +66,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_080.c b/src/modules/wizard/page_080.c index cd0962e15..14382dcbf 100644 --- a/src/modules/wizard/page_080.c +++ b/src/modules/wizard/page_080.c @@ -34,16 +34,18 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) Efreet_Desktop *desk; char name[PATH_MAX], buf2[PATH_MAX], *p; int n; - + if (buf[0] == '#') continue; p = buf; - while (isspace(*p)) p++; - for (;;) + while (isspace(*p)) + p++; + for (;; ) { n = sscanf(p, "%s", name); if (n != 1) break; p += strlen(name); - while (isspace(*p)) p++; + while (isspace(*p)) + p++; snprintf(buf2, sizeof(buf2), "%s.desktop", name); desk = efreet_util_desktop_file_id_find(buf2); if (desk) @@ -70,3 +72,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_090.c b/src/modules/wizard/page_090.c index 9e27cc321..09199cada 100644 --- a/src/modules/wizard/page_090.c +++ b/src/modules/wizard/page_090.c @@ -83,30 +83,30 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) } #ifdef __FreeBSD__ do { - int mib_state[4]; - int state = 0; - size_t len; - - /* Read some information on first run. */ - len = 4; - sysctlnametomib("hw.acpi.battery.state", mib_state, &len); - len = sizeof(state); - if (sysctl(mib_state, 4, &state, &len, NULL, 0) != -1) - hav_bat = 1; - } while (0); + int mib_state[4]; + int state = 0; + size_t len; + + /* Read some information on first run. */ + len = 4; + sysctlnametomib("hw.acpi.battery.state", mib_state, &len); + len = sizeof(state); + if (sysctl(mib_state, 4, &state, &len, NULL, 0) != -1) + hav_bat = 1; + } while (0); #endif if (!hav_bat) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "battery")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -128,3 +128,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_100.c b/src/modules/wizard/page_100.c index 4995354c5..002aa414c 100644 --- a/src/modules/wizard/page_100.c +++ b/src/modules/wizard/page_100.c @@ -48,10 +48,10 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) #ifdef __FreeBSD__ char buf[PATH_MAX]; size_t len = 0; - + len = sizeof(buf); if (sysctlbyname("dev.cpu.0.freq_levels", buf, &len, NULL, 0) == 0) - hav_cpufreq = 1; + hav_cpufreq = 1; #else char *str, *p; @@ -73,14 +73,14 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "cpufreq")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -102,3 +102,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_110.c b/src/modules/wizard/page_110.c index cace9c5fe..1f614df2c 100644 --- a/src/modules/wizard/page_110.c +++ b/src/modules/wizard/page_110.c @@ -13,25 +13,25 @@ static void _recommend_connman(E_Wizard_Page *pg) { Evas_Object *o, *of, *ob; - + o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Network Management")); - of = e_widget_framelist_add(pg->evas, + of = e_widget_framelist_add(pg->evas, _("Connman network service not found"), 0); - + ob = e_widget_label_add - (pg->evas, _("Install Connman for network management support")); + (pg->evas, _("Install Connman for network management support")); e_widget_framelist_object_append(of, ob); evas_object_show(ob); - + e_widget_list_object_append(o, of, 0, 0, 0.5); evas_object_show(ob); evas_object_show(of); - + e_wizard_page_show(o); // pg->data = o; - + e_wizard_button_next_enable_set(1); } @@ -60,14 +60,14 @@ _connman_timeout(void *data) E_Wizard_Page *pg = data; E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "connman")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -83,6 +83,7 @@ _connman_timeout(void *data) _recommend_connman(pg); return EINA_FALSE; } + #endif EAPI int @@ -102,34 +103,34 @@ wizard_page_show(E_Wizard_Page *pg) { int have_connman = 0; E_DBus_Connection *c; - + c = e_dbus_bus_get(DBUS_BUS_SYSTEM); if (c) { -#ifdef HAVE_ECONNMAN +#ifdef HAVE_ECONNMAN if (e_connman_system_init(c)) { handler = ecore_event_handler_add - (E_CONNMAN_EVENT_MANAGER_IN, _connman_in, NULL); + (E_CONNMAN_EVENT_MANAGER_IN, _connman_in, NULL); if (connman_timeout) ecore_timer_del(connman_timeout); connman_timeout = ecore_timer_add(2.0, _connman_timeout, pg); have_connman = 1; e_wizard_button_next_enable_set(0); } -#endif +#endif } if (!have_connman) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "connman")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -164,3 +165,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_120.c b/src/modules/wizard/page_120.c index f8c6afbd3..6123808ae 100644 --- a/src/modules/wizard/page_120.c +++ b/src/modules/wizard/page_120.c @@ -8,9 +8,9 @@ #endif /* -static char * -read_file(const char *file) -{ + static char * + read_file(const char *file) + { FILE *f = fopen(file, "r"); size_t len; char buf[4096], *p; @@ -28,8 +28,8 @@ read_file(const char *file) } fclose(f); return strdup(buf); -} -*/ + } + */ EAPI int wizard_page_init(E_Wizard_Page *pg __UNUSED__) @@ -56,14 +56,14 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "temperature")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -85,3 +85,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_130.c b/src/modules/wizard/page_130.c index 0a6ae323e..5b2b20130 100644 --- a/src/modules/wizard/page_130.c +++ b/src/modules/wizard/page_130.c @@ -24,14 +24,14 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "backlight")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -53,3 +53,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_140.c b/src/modules/wizard/page_140.c index 35a9f6c62..8215961a9 100644 --- a/src/modules/wizard/page_140.c +++ b/src/modules/wizard/page_140.c @@ -25,14 +25,14 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "mixer")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -54,3 +54,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_150.c b/src/modules/wizard/page_150.c index f6412ec2d..02a26c2b0 100644 --- a/src/modules/wizard/page_150.c +++ b/src/modules/wizard/page_150.c @@ -15,7 +15,7 @@ match_file_glob(FILE *f, const char *globbing) { char buf[32768]; int found = 0; - + while (fgets(buf, sizeof(buf), f)) { if (e_util_glob_match(buf, globbing)) @@ -34,7 +34,7 @@ match_xorg_log(const char *globbing) FILE *f; int i; char buf[PATH_MAX]; - + for (i = 0; i < 5; i++) { snprintf(buf, sizeof(buf), "/var/log/Xorg.%i.log", i); @@ -65,68 +65,68 @@ wizard_page_show(E_Wizard_Page *pg) Evas_Object *o, *of, *ob; Ecore_Evas *ee; Ecore_X_Window_Attributes att; - + if (!ecore_x_composite_query()) return 0; if (!ecore_x_damage_query()) return 0; - + memset((&att), 0, sizeof(Ecore_X_Window_Attributes)); ecore_x_window_attributes_get(ecore_x_window_root_first_get(), &att); if ((att.depth != 24) && (att.depth != 32)) return 0; - + ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 320, 240); if (ee) { ecore_evas_free(ee); if ( - (match_xorg_log("*(II)*NVIDIA*: Creating default Display*")) || - (match_xorg_log("*(II)*intel*: Creating default Display*")) || - (match_xorg_log("*(II)*NOUVEAU*: Creating default Display*")) || - (match_xorg_log("*(II)*RADEON*: Creating default Display*")) - ) + (match_xorg_log("*(II)*NVIDIA*: Creating default Display*")) || + (match_xorg_log("*(II)*intel*: Creating default Display*")) || + (match_xorg_log("*(II)*NOUVEAU*: Creating default Display*")) || + (match_xorg_log("*(II)*RADEON*: Creating default Display*")) + ) { do_gl = 1; do_vsync = 1; } } - + o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Compositing")); - + of = e_widget_framelist_add(pg->evas, _("Transparent windows and effects"), 0); - + ob = e_widget_textblock_add(pg->evas); e_widget_size_min_set(ob, 200 * e_scale, 180 * e_scale); e_widget_textblock_markup_set - (ob, - _("Compositing provides translucency
" - "for windows, window effects like
" - "fading in and out and zooming
" - "when they appear and dissapear.
" - "It is highly recommended to
" - "enable this for a better
" - "experience, but it comes at a
" - "cost. It requires extra CPU
" - "or a GLSL Shader capable GPU
" - "with well written drivers.
" - "It also will add between 10 to
" - "100 MB to the memory needed
" - "for Enlightenment." - ) - ); + (ob, + _("Compositing provides translucency
" + "for windows, window effects like
" + "fading in and out and zooming
" + "when they appear and dissapear.
" + "It is highly recommended to
" + "enable this for a better
" + "experience, but it comes at a
" + "cost. It requires extra CPU
" + "or a GLSL Shader capable GPU
" + "with well written drivers.
" + "It also will add between 10 to
" + "100 MB to the memory needed
" + "for Enlightenment." + ) + ); e_widget_framelist_object_append(of, ob); - + ob = e_widget_check_add(pg->evas, _("Enable Compositing"), &(do_comp)); e_widget_framelist_object_append(of, ob); - + if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11)) { ob = e_widget_check_add(pg->evas, _("Hardware Accelerated (OpenGL)"), &(do_gl)); e_widget_framelist_object_append(of, ob); - + ob = e_widget_check_add(pg->evas, _("Tear-free Rendering (OpenGL only)"), &(do_vsync)); e_widget_framelist_object_append(of, ob); } - + e_widget_list_object_append(o, of, 0, 0, 0.5); evas_object_show(of); @@ -143,14 +143,14 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__) { E_Config_Module *em; Eina_List *l; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "comp")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; @@ -165,25 +165,25 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__) E_Config_DD *conf_edd = NULL; E_Config_DD *conf_match_edd = NULL; Config *cfg = NULL; - + EINA_LIST_FOREACH(e_config->modules, l, em) { if (!em->name) continue; if (!strcmp(em->name, "dropshadow")) { e_config->modules = eina_list_remove_list - (e_config->modules, l); + (e_config->modules, l); if (em->name) eina_stringshare_del(em->name); free(em); break; } } - + e_config->use_composite = 1; - + e_mod_comp_cfdata_edd_init(&(conf_edd), &(conf_match_edd)); cfg = e_mod_comp_cfdata_config_new(); - + if (do_gl) { cfg->engine = ENGINE_GL; @@ -196,7 +196,7 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__) cfg->smooth_windows = 0; cfg->vsync = 0; } - + e_config_domain_save("module.comp", conf_edd, cfg); E_CONFIG_DD_FREE(conf_match_edd); E_CONFIG_DD_FREE(conf_edd); @@ -211,3 +211,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_160.c b/src/modules/wizard/page_160.c index 97dcf7eea..f62eb5828 100644 --- a/src/modules/wizard/page_160.c +++ b/src/modules/wizard/page_160.c @@ -28,9 +28,9 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) if (!files) return 0; EINA_LIST_FREE(files, file) { - snprintf(buf, sizeof(buf), "%s/favorites/%s", + snprintf(buf, sizeof(buf), "%s/favorites/%s", e_wizard_dir_get(), file); - snprintf(buf2, sizeof(buf2), "%s/fileman/favorites/%s", + snprintf(buf2, sizeof(buf2), "%s/fileman/favorites/%s", e_user_dir_get(), file); ecore_file_cp(buf, buf2); free(file); @@ -50,7 +50,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) ecore_file_cp(buf, buf2); free(file); } - + return 0; /* 1 == show ui, and wait for user, 0 == just continue */ } @@ -65,3 +65,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_170.c b/src/modules/wizard/page_170.c index b92e3f0da..148549385 100644 --- a/src/modules/wizard/page_170.c +++ b/src/modules/wizard/page_170.c @@ -23,40 +23,40 @@ EAPI int wizard_page_show(E_Wizard_Page *pg) { Evas_Object *o, *of, *ob; - + o = e_widget_list_add(pg->evas, 1, 0); e_wizard_title_set(_("Updates")); - + of = e_widget_framelist_add(pg->evas, _("Check for available updates"), 0); - + ob = e_widget_textblock_add(pg->evas); e_widget_size_min_set(ob, 200 * e_scale, 180 * e_scale); e_widget_textblock_markup_set - (ob, - _("Enlightenment can check for new
" - "versions, updates, securiity and
" - "bugfixes, as well as available add-ons.
" - "
" - "This is very useful, because it lets you
" - "you know about available bug fixes and
" - "security fixes when they happen. As a
" - "bi-product of this, Enlightenment will
" - "connect to enlightenment.org and transmit
" - "some information as a result much like any
" - "web browser might do. No personal information
" - "such as username, password or any personal
" - "files will be transmitted. If you do not like
" - "this, please disable this below. It is highly
" - "advised that you do not disable this as it
" - "may leave you vulnerable or having to live
" - "with bugs." - ) - ); + (ob, + _("Enlightenment can check for new
" + "versions, updates, securiity and
" + "bugfixes, as well as available add-ons.
" + "
" + "This is very useful, because it lets you
" + "you know about available bug fixes and
" + "security fixes when they happen. As a
" + "bi-product of this, Enlightenment will
" + "connect to enlightenment.org and transmit
" + "some information as a result much like any
" + "web browser might do. No personal information
" + "such as username, password or any personal
" + "files will be transmitted. If you do not like
" + "this, please disable this below. It is highly
" + "advised that you do not disable this as it
" + "may leave you vulnerable or having to live
" + "with bugs." + ) + ); e_widget_framelist_object_append(of, ob); - + ob = e_widget_check_add(pg->evas, _("Enable update checking"), &(do_up)); e_widget_framelist_object_append(of, ob); - + e_widget_list_object_append(o, of, 0, 0, 0.5); evas_object_show(of); @@ -78,3 +78,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) { return 1; } + diff --git a/src/modules/wizard/page_200.c b/src/modules/wizard/page_200.c index 8759ca1b7..5ab941ae5 100644 --- a/src/modules/wizard/page_200.c +++ b/src/modules/wizard/page_200.c @@ -37,3 +37,4 @@ wizard_page_apply(E_Wizard_Page *pg __UNUSED__) e_sys_action_do(E_SYS_RESTART, NULL); return 1; } +