diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c index 197560d5f..3d6505b1a 100644 --- a/src/bin/e_bg.c +++ b/src/bin/e_bg.c @@ -118,7 +118,6 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y) EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg) { int spec; - const char *ext; if (!cfbg) continue; spec = 0; @@ -143,8 +142,7 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y) if (bf) bgfile = bf; } } - ext = strrchr(bgfile, '.'); - if ((ext) && (!strcasecmp(ext, ".edj"))) + if (eina_str_has_extension(bgfile, ".edj")) { entries = edje_file_collection_list(bgfile); if (entries) @@ -198,8 +196,6 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y) } else { - const char *ext; - bgfile = e_config->desktop_default_background; if (bgfile) { @@ -211,8 +207,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y) if (bf) bgfile = bf; } } - ext = strrchr(bgfile, '.'); - if ((ext) && (!strcasecmp(ext, ".edj"))) + if (eina_str_has_extension(bgfile, ".edj")) { entries = edje_file_collection_list(bgfile); if (entries) diff --git a/src/modules/conf_theme/e_int_config_wallpaper.c b/src/modules/conf_theme/e_int_config_wallpaper.c index 364073d3a..8d9392292 100644 --- a/src/modules/conf_theme/e_int_config_wallpaper.c +++ b/src/modules/conf_theme/e_int_config_wallpaper.c @@ -114,9 +114,7 @@ _bg_set(E_Config_Dialog_Data *cfdata) if (!cfdata->o_preview) return; if (cfdata->bg) { - const char *ext = strrchr(cfdata->bg, '.'); - - if ((ext) && (!strcasecmp(ext, ".edj"))) + if (eina_str_has_extension(cfdata->bg, ".edj")) e_widget_preview_edje_set(cfdata->o_preview, cfdata->bg, "e/desktop/background"); else