diff --git a/TODO b/TODO index e1bc23f89..ccd27f818 100644 --- a/TODO +++ b/TODO @@ -9,7 +9,6 @@ Some of the things (in very short form) that need to be done to E17... ------------------------------------------------------------------------------- * BUG: e17 screen res diaolg doesnt work under xephyr - why? -* BUG: icon theme dialog too big for 640x480 * BUG: the ibar specific menu only shows when you right click on icons (and not on the bar itself). so, if there are no icons you can't get to the config * BUG: "match this window only" doesnt fall back to other unused remembers diff --git a/data/init/Makefile.am b/data/init/Makefile.am index be035cdbd..dc45717b1 100644 --- a/data/init/Makefile.am +++ b/data/init/Makefile.am @@ -10,14 +10,14 @@ EDJE_FLAGS = \ filesdir = $(datadir)/enlightenment/data/init files_DATA = \ -init.edj +default.edj -EXTRA_DIST = init.edc +EXTRA_DIST = default.edc -init.edj: Makefile init.edc +default.edj: Makefile default.edc $(EDJE_CC) $(EDJE_FLAGS) \ - $(top_srcdir)/data/init/init.edc \ - $(top_builddir)/data/init/init.edj + $(top_srcdir)/data/init/default.edc \ + $(top_builddir)/data/init/default.edj clean-local: rm -f *.edj diff --git a/data/init/init.edc b/data/init/default.edc similarity index 99% rename from data/init/init.edc rename to data/init/default.edc index cec3d5f4c..4b43aa94d 100644 --- a/data/init/init.edc +++ b/data/init/default.edc @@ -497,7 +497,7 @@ images { collections { group { - name: "init/splash"; + name: "e/init/splash"; script { public is_ready; public do_end; @@ -1391,7 +1391,7 @@ collections { } } group { - name: "init/extra_screen"; + name: "e/init/extra_screen"; parts { part { name: "background"; diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 98eb39b23..1ba6df21b 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -1480,47 +1480,6 @@ _e_fm2_icon_icon_set(E_Fm2_Icon *ic) evas_object_show(ic->obj_icon); return; } - if (ic->info.mime) - { - /* use mime type to select icon */ - if ( - (!strcmp(ic->info.mime, "image/jpeg")) || - (!strcmp(ic->info.mime, "image/png")) || - (!strcmp(ic->info.mime, "image/gif")) || - (!strcmp(ic->info.mime, "image/tiff")) || - (!strcmp(ic->info.mime, "image/x-xpixmap")) || - (!strcmp(ic->info.mime, "image/svg+xml")) - ) - { - snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); - ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); - e_thumb_icon_file_set(ic->obj_icon, buf, NULL); - e_thumb_icon_size_set(ic->obj_icon, 64, 64); - evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); - _e_fm2_icon_thumb(ic); - edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); - evas_object_show(ic->obj_icon); - } - else - { - /* fixme: quick hack to get some icons - need to have a proper - * mime -> icon mapping users can edit - */ - p = strchr(ic->info.mime, '/'); - if (p) p++; - else p = (char *)ic->info.mime; - snprintf(buf, sizeof(buf), "e/icons/fileman/%s", p); - ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj)); - if (!e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", - buf)) - e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", - "e/icons/fileman/file"); - edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); - evas_object_show(ic->obj_icon); - } - return; - } - /* fallback */ if (S_ISDIR(ic->info.statinfo.st_mode)) { ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj)); @@ -1531,39 +1490,86 @@ _e_fm2_icon_icon_set(E_Fm2_Icon *ic) } else { - if ( - (e_util_glob_case_match(ic->info.file, "*.edj")) - ) + if (ic->info.mime) { - snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); - ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); - e_thumb_icon_file_set(ic->obj_icon, buf, "e/desktop/background"); - e_thumb_icon_size_set(ic->obj_icon, 64, 48); - evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); - _e_fm2_icon_thumb(ic); - edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); - evas_object_show(ic->obj_icon); - } - else if ( - (e_util_glob_case_match(ic->info.file, "*.eap")) + /* use mime type to select icon */ + if ( + (!strcmp(ic->info.mime, "image/jpeg")) || + (!strcmp(ic->info.mime, "image/png")) || + (!strcmp(ic->info.mime, "image/gif")) || + (!strcmp(ic->info.mime, "image/tiff")) || + (!strcmp(ic->info.mime, "image/x-xpixmap")) || + (!strcmp(ic->info.mime, "image/svg+xml")) ) - { - snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); - ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); - e_thumb_icon_file_set(ic->obj_icon, buf, "icon"); - e_thumb_icon_size_set(ic->obj_icon, 64, 64); - evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); - _e_fm2_icon_thumb(ic); - edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); - evas_object_show(ic->obj_icon); + { + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); + ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); + e_thumb_icon_file_set(ic->obj_icon, buf, NULL); + e_thumb_icon_size_set(ic->obj_icon, 64, 64); + evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); + _e_fm2_icon_thumb(ic); + edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); + evas_object_show(ic->obj_icon); + } + else + { + /* fixme: quick hack to get some icons - need to have a proper + * mime -> icon mapping users can edit + */ + p = strchr(ic->info.mime, '/'); + if (p) p++; + else p = (char *)ic->info.mime; + snprintf(buf, sizeof(buf), "e/icons/fileman/%s", p); + ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj)); + if (!e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", + buf)) + e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", + "e/icons/fileman/file"); + edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); + evas_object_show(ic->obj_icon); + } + return; } else { - ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj)); - e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", - "e/icons/fileman/file"); - edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); - evas_object_show(ic->obj_icon); + /* fallback */ + if ( + (e_util_glob_case_match(ic->info.file, "*.edj")) + ) + { + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); + ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); + if (ic->sd->config->icon.key_hint) + e_thumb_icon_file_set(ic->obj_icon, buf, ic->sd->config->icon.key_hint); + else + e_thumb_icon_file_set(ic->obj_icon, buf, "e/desktop/background"); + e_thumb_icon_size_set(ic->obj_icon, 64, 48); + evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); + _e_fm2_icon_thumb(ic); + edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); + evas_object_show(ic->obj_icon); + } + else if ( + (e_util_glob_case_match(ic->info.file, "*.eap")) + ) + { + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); + ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj)); + e_thumb_icon_file_set(ic->obj_icon, buf, "icon"); + e_thumb_icon_size_set(ic->obj_icon, 64, 64); + evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", _e_fm2_cb_icon_thumb_gen, ic); + _e_fm2_icon_thumb(ic); + edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); + evas_object_show(ic->obj_icon); + } + else + { + ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj)); + e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman", + "e/icons/fileman/file"); + edje_object_part_swallow(ic->obj, "e.swallow.icon", ic->obj_icon); + evas_object_show(ic->obj_icon); + } } } } diff --git a/src/bin/e_fm.h b/src/bin/e_fm.h index b24d684de..e69ebdccf 100644 --- a/src/bin/e_fm.h +++ b/src/bin/e_fm.h @@ -47,6 +47,7 @@ struct _E_Fm2_Config struct { unsigned char show; } extension; + const char *key_hint; } icon; /* how to sort files */ struct { diff --git a/src/bin/e_init.c b/src/bin/e_init.c index b40f20b66..1eb510b3d 100644 --- a/src/bin/e_init.c +++ b/src/bin/e_init.c @@ -55,6 +55,13 @@ e_init_init(void) ecore_evas_raise(_e_init_ecore_evas); ecore_evas_show(_e_init_ecore_evas); + if (!e_config->init_default_theme) + s = e_path_find(path_init, "default.edj"); + else if (e_config->init_default_theme[0] != '/') + s = evas_stringshare_add(e_config->init_default_theme); + else + s = e_path_find(path_init, e_config->init_default_theme); + screens = (Evas_List *)e_xinerama_screens_get(); if (screens) { @@ -67,24 +74,12 @@ e_init_init(void) /* first screen */ if (l == screens) { - if (!e_config->init_default_theme) - s = e_path_find(path_init, "init.edj"); - else - s = e_path_find(path_init, e_config->init_default_theme); - edje_object_file_set(o, s, "init/splash"); - if (s) evas_stringshare_del(s); + edje_object_file_set(o, s, "e/init/splash"); _e_init_object = o; } /* other screens */ else - { - if (!e_config->init_default_theme) - s = e_path_find(path_init, "init.edj"); - else - s = e_path_find(path_init, e_config->init_default_theme); - edje_object_file_set(o, s, "init/extra_screen"); - if (s) evas_stringshare_del(s); - } + edje_object_file_set(o, s, "e/init/extra_screen"); evas_object_move(o, scr->x, scr->y); evas_object_resize(o, scr->w, scr->h); evas_object_show(o); @@ -93,17 +88,15 @@ e_init_init(void) else { o = edje_object_add(_e_init_evas); - if (!e_config->init_default_theme) - s = e_path_find(path_init, "init.edj"); - else - s = e_path_find(path_init, e_config->init_default_theme); - edje_object_file_set(o, s, "init/splash"); + edje_object_file_set(o, s, "e/init/splash"); if (s) evas_stringshare_del(s); _e_init_object = o; evas_object_move(o, 0, 0); evas_object_resize(o, w, h); evas_object_show(o); } + if (s) evas_stringshare_del(s); + edje_object_part_text_set(_e_init_object, "disable_text", _("Disable this splash screen in the future?")); edje_object_signal_callback_add(_e_init_object, "disable_state", "*", diff --git a/src/bin/e_int_config_icon_themes.c b/src/bin/e_int_config_icon_themes.c index cddc54605..69e5d8d6c 100644 --- a/src/bin/e_int_config_icon_themes.c +++ b/src/bin/e_int_config_icon_themes.c @@ -53,7 +53,7 @@ e_int_config_icon_themes(E_Container *con) cfd = e_config_dialog_new(con, _("Icon Theme Settings"), - "E", "_config_icon_theme_dialog", + "E", "_config_icon_theme_dialog", "enlightenment/icon_theme", 0, v, NULL); return cfd; } @@ -234,6 +234,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 1; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 1; fmc.list.sort.dirs.last = 0; @@ -250,7 +251,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf e_fm2_pan_max_get, e_fm2_pan_child_size_get); cfdata->gui.o_frame = ob; - e_widget_min_size_set(ob, 200, 290); + e_widget_min_size_set(ob, 200, 120); e_widget_framelist_object_append(of, ob); e_widget_table_object_append(ot, of, 2, 0, 2, 4, 1, 1, 1, 1); diff --git a/src/bin/e_int_config_startup.c b/src/bin/e_int_config_startup.c index 6f2da8ab4..1defaee59 100644 --- a/src/bin/e_int_config_startup.c +++ b/src/bin/e_int_config_startup.c @@ -9,11 +9,17 @@ void _ilist_cb_init_selected(void *data); struct _E_Config_Dialog_Data { + E_Config_Dialog *cfd; + Evas_Object *o_frame; + Evas_Object *o_fm; + Evas_Object *o_up_button; + Evas_Object *o_preview; + Evas_Object *o_personal; + Evas_Object *o_system; + int fmdir; + int show_splash; char *splash; - - E_Config_Dialog *cfd; - Evas_Object *il; }; EAPI E_Config_Dialog * @@ -36,13 +42,169 @@ e_int_config_startup(E_Container *con) return cfd; } +static void +_cb_button_up(void *data1, void *data2) +{ + E_Config_Dialog_Data *cfdata; + + cfdata = data1; + if (cfdata->o_fm) + e_fm2_parent_go(cfdata->o_fm); + if (cfdata->o_frame) + e_widget_scrollframe_child_pos_set(cfdata->o_frame, 0, 0); +} + +static void +_cb_files_changed(void *data, Evas_Object *obj, void *event_info) +{ + E_Config_Dialog_Data *cfdata; + + cfdata = data; + if (!cfdata->o_fm) return; + if (!e_fm2_has_parent_get(cfdata->o_fm)) + { + if (cfdata->o_up_button) + e_widget_disabled_set(cfdata->o_up_button, 1); + } + else + { + if (cfdata->o_up_button) + e_widget_disabled_set(cfdata->o_up_button, 0); + } + if (cfdata->o_frame) + e_widget_scrollframe_child_pos_set(cfdata->o_frame, 0, 0); +} + +static void +_cb_files_selection_change(void *data, Evas_Object *obj, void *event_info) +{ + E_Config_Dialog_Data *cfdata; + Evas_List *selected; + E_Fm2_Icon_Info *ici; + const char *realpath; + char buf[4096]; + + cfdata = data; + if (!cfdata->o_fm) return; + selected = e_fm2_selected_list_get(cfdata->o_fm); + if (!selected) return; + ici = selected->data; + realpath = e_fm2_real_path_get(cfdata->o_fm); + if (!strcmp(realpath, "/")) + snprintf(buf, sizeof(buf), "/%s", ici->file); + else + snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + evas_list_free(selected); + if (ecore_file_is_dir(buf)) return; + E_FREE(cfdata->splash); + cfdata->splash = strdup(buf); + if (cfdata->o_preview) + e_widget_preview_edje_set(cfdata->o_preview, buf, "e/init/splash"); + if (cfdata->o_frame) + e_widget_change(cfdata->o_frame); +} + +static void +_cb_files_selected(void *data, Evas_Object *obj, void *event_info) +{ + E_Config_Dialog_Data *cfdata; + + cfdata = data; + printf("SEL\n"); +} + +static void +_cb_files_files_changed(void *data, Evas_Object *obj, void *event_info) +{ + E_Config_Dialog_Data *cfdata; + const char *p; + char *homedir, buf[4096]; + + cfdata = data; + if (!cfdata->splash) return; + if (!cfdata->o_fm) return; + p = e_fm2_real_path_get(cfdata->o_fm); + if (p) + { + if (strncmp(p, cfdata->splash, strlen(p))) return; + } + homedir = e_user_homedir_get(); + if (!homedir) return; + snprintf(buf, sizeof(buf), "%s/.e/e/init", homedir); + free(homedir); + if (!p) return; + if (!strncmp(cfdata->splash, buf, strlen(buf))) + p = cfdata->splash + strlen(buf) + 1; + else + { + snprintf(buf, sizeof(buf), "%s/data/init", e_prefix_data_get()); + if (!strncmp(cfdata->splash, buf, strlen(buf))) + p = cfdata->splash + strlen(buf) + 1; + else + p = cfdata->splash; + } + e_fm2_select_set(cfdata->o_fm, p, 1); + e_fm2_file_show(cfdata->o_fm, p); +} + +static void +_cb_dir(void *data, Evas_Object *obj, void *event_info) +{ + E_Config_Dialog_Data *cfdata; + char path[4096], *homedir; + + cfdata = data; + if (cfdata->fmdir == 1) + { + snprintf(path, sizeof(path), "%s/data/init", e_prefix_data_get()); + } + else + { + homedir = e_user_homedir_get(); + snprintf(path, sizeof(path), "%s/.e/e/init", homedir); + free(homedir); + } + e_fm2_path_set(cfdata->o_fm, path, "/"); +} + static void _fill_data(E_Config_Dialog_Data *cfdata) { + char path[4096], *homedir; + cfdata->show_splash = e_config->show_splash; cfdata->splash = NULL; if (e_config->init_default_theme) cfdata->splash = strdup(e_config->init_default_theme); + else + { + snprintf(path, sizeof(path), "%s/data/init/default.edj", e_prefix_data_get()); + cfdata->splash = strdup(path); + } + if (cfdata->splash[0] != '/') + { + homedir = e_user_homedir_get(); + snprintf(path, sizeof(path), "%s/.e/e/init/%s", homedir, cfdata->splash); + if (ecore_file_exists(path)) + { + E_FREE(cfdata->splash); + cfdata->splash = strdup(path); + } + else + { + snprintf(path, sizeof(path), "%s/data/init/%s", e_prefix_data_get(), cfdata->splash); + if (ecore_file_exists(path)) + { + E_FREE(cfdata->splash); + cfdata->splash = strdup(path); + } + } + free(homedir); + } + + snprintf(path, sizeof(path), "%s/data/init", e_prefix_data_get()); + if (!strncmp(cfdata->splash, path, strlen(path))) + cfdata->fmdir = 1; } static void * @@ -90,152 +252,101 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) static Evas_Object * _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata) { - Evas_Object *ot, *ob, *il, *im; - char path[4096]; - char *homedir; + Evas_Object *o, *ot, *of, *il, *ol; + char path[4096], *homedir; + const char *f; + E_Fm2_Config fmc; + E_Zone *z; + E_Radio_Group *rg; + + homedir = e_user_homedir_get(); + if (!homedir) return NULL; + + z = e_zone_current_get(cfd->con); ot = e_widget_table_add(evas, 0); - il = e_widget_ilist_add(evas, 48, 48, &(cfdata->splash)); - cfdata->il = il; - e_widget_ilist_selector_set(il, 1); - e_widget_min_size_set(il, 180, 40); + ol = e_widget_table_add(evas, 0); + il = e_widget_table_add(evas, 1); - _load_inits(cfd, il); - im = cfd->data; + rg = e_widget_radio_group_new(&(cfdata->fmdir)); + o = e_widget_radio_add(evas, _("Personal"), 0, rg); + cfdata->o_personal = o; + evas_object_smart_callback_add(o, "changed", + _cb_dir, cfdata); + e_widget_table_object_append(il, o, 0, 0, 1, 1, 1, 1, 0, 0); + o = e_widget_radio_add(evas, _("System"), 1, rg); + cfdata->o_system = o; + evas_object_smart_callback_add(o, "changed", + _cb_dir, cfdata); + e_widget_table_object_append(il, o, 1, 0, 1, 1, 1, 1, 0, 0); - e_widget_table_object_append(ot, il, 0, 0, 1, 2, 1, 1, 1, 1); - e_widget_table_object_append(ot, im, 1, 0, 1, 2, 1, 1, 1, 1); - - ob = e_widget_check_add(evas, _("Show Splash Screen At Boot"), - &(cfdata->show_splash)); - e_widget_table_object_append(ot, ob, 1, 3, 1, 1, 1, 0, 0, 0); + e_widget_table_object_append(ol, il, 0, 0, 1, 1, 0, 0, 0, 0); - homedir = e_user_homedir_get(); - snprintf(path, sizeof(path), "%s/.e/e/init", homedir); - E_FREE(homedir); + o = e_widget_button_add(evas, _("Go up a Directory"), "widget/up_dir", + _cb_button_up, cfdata, NULL); + cfdata->o_up_button = o; + e_widget_table_object_append(ol, o, 0, 1, 1, 1, 0, 0, 0, 0); + + if (cfdata->fmdir == 1) + snprintf(path, sizeof(path), "%s/data/init", e_prefix_data_get()); + else + snprintf(path, sizeof(path), "%s/.e/e/init", homedir); + + o = e_fm2_add(evas); + cfdata->o_fm = o; + memset(&fmc, 0, sizeof(E_Fm2_Config)); + fmc.view.mode = E_FM2_VIEW_MODE_LIST; + fmc.view.open_dirs_in_place = 1; + fmc.view.selector = 1; + fmc.view.single_click = 0; + fmc.view.no_subdir_jump = 0; + fmc.icon.list.w = 48; + fmc.icon.list.h = 48; + fmc.icon.fixed.w = 1; + fmc.icon.fixed.h = 1; + fmc.icon.extension.show = 0; + fmc.icon.key_hint = "e/init/splash"; + fmc.list.sort.no_case = 1; + fmc.list.sort.dirs.first = 0; + fmc.list.sort.dirs.last = 1; + fmc.selection.single = 1; + fmc.selection.windows_modifiers = 0; + e_fm2_config_set(o, &fmc); + evas_object_smart_callback_add(o, "dir_changed", + _cb_files_changed, cfdata); + evas_object_smart_callback_add(o, "selection_change", + _cb_files_selection_change, cfdata); + evas_object_smart_callback_add(o, "selected", + _cb_files_selected, cfdata); + evas_object_smart_callback_add(o, "changed", + _cb_files_files_changed, cfdata); + e_fm2_path_set(o, path, "/"); + + of = e_widget_scrollframe_pan_add(evas, o, + e_fm2_pan_set, + e_fm2_pan_get, + e_fm2_pan_max_get, + e_fm2_pan_child_size_get); + cfdata->o_frame = of; + e_widget_min_size_set(of, 160, 160); + e_widget_table_object_append(ol, of, 0, 2, 1, 1, 1, 1, 1, 1); + e_widget_table_object_append(ot, ol, 0, 0, 1, 1, 1, 1, 1, 1); + + of = e_widget_list_add(evas, 0, 0); + + o = e_widget_preview_add(evas, 320, (320 * z->h) / z->w); + cfdata->o_preview = o; + if (cfdata->splash) + f = cfdata->splash; + e_widget_preview_edje_set(o, f, "e/init/splash"); + e_widget_list_object_append(of, o, 1, 0, 0.5); + + e_widget_table_object_append(ot, of, 1, 0, 1, 1, 0, 1, 0, 1); + + o = e_widget_check_add(evas, _("Show Splash Screen on Login"), + &(cfdata->show_splash)); + e_widget_table_object_append(ot, o, 1, 3, 1, 1, 1, 0, 0, 0); + + free(homedir); return ot; } - -static void -_load_inits(E_Config_Dialog *cfd, Evas_Object *il) -{ - E_Zone *zone; - Evas_Object *im; - Evas_List *init_dirs, *init; - int i = 0; - int selnum = -1; - char *homedir; - - if (!il) return; - - homedir = e_user_homedir_get(); - zone = e_zone_current_get(cfd->dia->win->container); - im = e_widget_preview_add(cfd->dia->win->evas, 320, - (320 * zone->h) / zone->w); - - /* Load inits */ - init_dirs = e_path_dir_list_get(path_init); - for (init = init_dirs; init; init = init->next) - { - E_Path_Dir *d; - int detected; - char *init_file; - Ecore_List *inits; - - d = init->data; - if (!ecore_file_is_dir(d->dir)) continue; - - inits = ecore_file_ls(d->dir); - if (!inits) continue; - - detected = 0; - if (homedir) - { - if (!strncmp(d->dir, homedir, strlen(homedir))) - { - e_widget_ilist_header_append(il, NULL, _("Personal")); - i++; - detected = 1; - } - } - if (!detected) - { - if (!strncmp(d->dir, e_prefix_data_get(), - strlen(e_prefix_data_get()))) - { - e_widget_ilist_header_append(il, NULL, _("System")); - i++; - detected = 1; - } - } - if (!detected) - { - e_widget_ilist_header_append(il, NULL, _("Other")); - i++; - detected = 1; - } - - while ((init_file = ecore_list_next(inits))) - { - Evas_Object *ic = NULL; - char full_path[4096]; - - snprintf(full_path, sizeof(full_path), "%s/%s", d->dir, - init_file); - if (ecore_file_is_dir(full_path)) continue; - if (!e_util_edje_collection_exists(full_path, "init/splash")) - continue; - - ic = e_thumb_icon_add(cfd->dia->win->evas); - e_thumb_icon_file_set(ic, full_path, "init/splash"); - e_thumb_icon_size_set(ic, 64, (64 * zone->h) / zone->w); - e_thumb_icon_begin(ic); - e_widget_ilist_append(il, ic, ecore_file_strip_ext(init_file), - _ilist_cb_init_selected, cfd, full_path); - - if ((e_config->init_default_theme) && - (!strcmp(e_config->init_default_theme, init_file))) - { - selnum = i; - evas_object_del(im); - im = e_widget_preview_add(cfd->dia->win->evas, 320, - (320 * zone->h) / zone->w); - e_widget_preview_edje_set(im, full_path, "init/splash"); - } - i++; - } - E_FREE(init_file); - ecore_list_destroy(inits); - } - E_FREE(homedir); - cfd->data = im; - - evas_list_free(init); - if (init_dirs) e_path_dir_list_free(init_dirs); - - e_widget_ilist_go(il); - if (selnum >= 0) e_widget_ilist_selected_set(il, selnum); -} - -void -_ilist_cb_init_selected(void *data) -{ - E_Config_Dialog *cfd; - E_Config_Dialog_Data *cfdata; - const char *init, *f; - - cfd = data; - if (!cfd) return; - - cfdata = cfd->cfdata; - if (!cfdata) return; - - if (!cfdata->splash[0]) - init = e_path_find(path_init, "init.edj"); - else - { - f = ecore_file_get_file(cfdata->splash); - init = e_path_find(path_init, f); - } - e_widget_preview_edje_set(cfd->data, init, "init/splash"); -} diff --git a/src/bin/e_int_config_theme.c b/src/bin/e_int_config_theme.c index 58ad54690..0d3cb4454 100644 --- a/src/bin/e_int_config_theme.c +++ b/src/bin/e_int_config_theme.c @@ -288,6 +288,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 0; fmc.list.sort.dirs.last = 1; diff --git a/src/bin/e_int_config_wallpaper.c b/src/bin/e_int_config_wallpaper.c index f379826e0..6d0de1218 100644 --- a/src/bin/e_int_config_wallpaper.c +++ b/src/bin/e_int_config_wallpaper.c @@ -405,6 +405,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 0; fmc.list.sort.dirs.last = 1; @@ -545,6 +546,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 0; fmc.list.sort.dirs.last = 1; diff --git a/src/bin/e_test.c b/src/bin/e_test.c index 831a8ba68..385c9f0f2 100644 --- a/src/bin/e_test.c +++ b/src/bin/e_test.c @@ -541,6 +541,7 @@ _e_test_internal(E_Container *con) fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 1; fmc.list.sort.dirs.last = 0; @@ -579,6 +580,7 @@ _e_test_internal(E_Container *con) fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 0; fmc.list.sort.dirs.last = 0; diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c index 69d9dc426..72e5eae08 100644 --- a/src/bin/e_widget_fsel.c +++ b/src/bin/e_widget_fsel.c @@ -332,6 +332,7 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected, fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 0; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 0; fmc.list.sort.dirs.last = 0; @@ -368,6 +369,7 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected, fmc.icon.fixed.w = 1; fmc.icon.fixed.h = 1; fmc.icon.extension.show = 1; + fmc.icon.key_hint = NULL; fmc.list.sort.no_case = 1; fmc.list.sort.dirs.first = 1; fmc.list.sort.dirs.last = 0;