aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-02-02 10:36:14 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-02-02 10:36:14 +0000
commit11b0a6e6708a5ae6bd93f02ad68bcb96b5e2a880 (patch)
treea90a878a28adbffda899842dfd4ce691ac443599
parentconf_interaction: Support tap-to-click with pointer device (diff)
downloadenlightenment-11b0a6e6708a5ae6bd93f02ad68bcb96b5e2a880.tar.gz
theme wallapaper other than edj fix
-rw-r--r--src/modules/conf_display/e_int_config_desklock.c12
-rw-r--r--src/modules/lokker/lokker.c87
2 files changed, 62 insertions, 37 deletions
diff --git a/src/modules/conf_display/e_int_config_desklock.c b/src/modules/conf_display/e_int_config_desklock.c
index 69b08e807..cfca3ad8f 100644
--- a/src/modules/conf_display/e_int_config_desklock.c
+++ b/src/modules/conf_display/e_int_config_desklock.c
@@ -659,7 +659,6 @@ _cb_method_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
if (e_config->desktop_backgrounds)
{
E_Config_Desktop_Background *cdb;
- int y = 0;
if (eina_str_has_extension(e_config->desktop_default_background, "edj"))
{
EINA_LIST_FOREACH(cfdata->gui.bgs, l, bg)
@@ -669,8 +668,6 @@ _cb_method_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
eina_stringshare_del(cbg->file);
free(cbg);
}
- for (y = 0; y < cfdata->zone_count; y++)
- cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "user_background"));
}
/* attempt to set wallpaper from desktop 0,0 on each zone as a desklock bg */
EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cdb)
@@ -695,9 +692,14 @@ _cb_method_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
eina_stringshare_del(cbg->file);
free(cbg);
}
- for (x = 0; x < cfdata->zone_count; x++)
- cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "user_background"));
}
+ EINA_LIST_FREE(cfdata->bgs, cbg)
+ {
+ eina_stringshare_del(cbg->file);
+ free(cbg);
+ }
+ for (x = 0; x < cfdata->zone_count; x++)
+ cfdata->bgs = eina_list_append(cfdata->bgs, desklock_bg_dup(NULL, "user_background"));
break;
case E_DESKLOCK_BACKGROUND_METHOD_CUSTOM:
diff --git a/src/modules/lokker/lokker.c b/src/modules/lokker/lokker.c
index fb73cde72..4b9393346 100644
--- a/src/modules/lokker/lokker.c
+++ b/src/modules/lokker/lokker.c
@@ -347,6 +347,7 @@ static void
_lokker_popup_add(E_Zone *zone)
{
E_Zone *current_zone;
+ Evas_Object *o = NULL;
int total_zone_num;
Lokker_Popup *lp;
E_Config_Desklock_Background *cbg;
@@ -361,19 +362,19 @@ _lokker_popup_add(E_Zone *zone)
lp->zone = zone;
evas = e_comp->evas;
evas_event_freeze(evas);
- lp->bg_object = edje_object_add(evas);
- evas_object_name_set(lp->bg_object, "desklock->bg_object");
if ((!bg) || (!strcmp(bg, "theme_desklock_background")))
{
- e_theme_edje_object_set(lp->bg_object,
- "base/theme/desklock",
+ o = edje_object_add(evas);
+ evas_object_data_set(o, "is_edje", o);
+ e_theme_edje_object_set(o, "base/theme/desklock",
"e/desklock/background");
}
else if (!strcmp(bg, "theme_background"))
{
- e_theme_edje_object_set(lp->bg_object,
- "base/theme/backgrounds",
+ o = edje_object_add(evas);
+ evas_object_data_set(o, "is_edje", o);
+ e_theme_edje_object_set(o, "base/theme/backgrounds",
"e/desktop/background");
}
else
@@ -385,44 +386,66 @@ _lokker_popup_add(E_Zone *zone)
else
f = bg;
- if (e_util_edje_collection_exists(f, "e/desklock/background"))
+ if (eina_str_has_extension(f, ".edj"))
{
- edje_object_file_set(lp->bg_object, f, "e/desklock/background");
+ o = edje_object_add(evas);
+ evas_object_data_set(o, "is_edje", o);
+ if (e_util_edje_collection_exists(f, "e/desklock/background"))
+ {
+ edje_object_file_set(o, f, "e/desklock/background");
+ }
+ else
+ {
+ if (!edje_object_file_set(o, f, "e/desktop/background"))
+ {
+ edje_object_file_set
+ (o, e_theme_edje_file_get("base/theme/desklock",
+ "e/desklock/background"),
+ "e/desklock/background");
+ }
+ }
}
+ else if ((eina_str_has_extension(f, ".gif")) ||
+ (eina_str_has_extension(f, ".png")) ||
+ (eina_str_has_extension(f, ".jpg")) ||
+ (eina_str_has_extension(f, ".jpeg")) ||
+ (eina_str_has_extension(f, ".bmp")))
+ {
+ o = e_icon_add(evas);
+ e_icon_file_key_set(o, f, NULL);
+ e_icon_scale_size_set(o, 0);
+ e_icon_fill_inside_set(o, 0);
+ }
else
{
- if (!edje_object_file_set(lp->bg_object,
- f, "e/desktop/background"))
- {
- edje_object_file_set(lp->bg_object,
- e_theme_edje_file_get("base/theme/desklock",
- "e/desklock/background"),
- "e/desklock/background");
- }
+ o = e_video_add(evas, f, EINA_FALSE);
}
}
+ lp->bg_object = o;
+ evas_object_name_set(lp->bg_object, "desklock->bg_object");
evas_object_move(lp->bg_object, zone->x, zone->y);
evas_object_resize(lp->bg_object, zone->w, zone->h);
evas_object_show(lp->bg_object);
- {
- const char *s;
- s = edje_object_data_get(lp->bg_object, "show_signal");
- lp->show_anim = s && (atoi(s) == 1);
- e_desklock_zone_block_set(zone, !lp->show_anim);
- if (lp->show_anim)
- edje_object_signal_callback_add(lp->bg_object, "e,action,show,done", "e",
- _lokker_cb_show_done, lp);
- s = edje_object_data_get(lp->bg_object, "hide_signal");
- lp->hide_anim = s && (atoi(s) == 1);
- }
+ {
+ const char *s = edje_object_data_get(lp->bg_object, "show_signal");
+ lp->show_anim = s && (atoi(s) == 1);
+ e_desklock_zone_block_set(zone, !lp->show_anim);
+ if ((lp->show_anim) &&
+ (evas_object_data_get(lp->bg_object, "is_edje")))
+ edje_object_signal_callback_add(lp->bg_object,
+ "e,action,show,done", "e",
+ _lokker_cb_show_done, lp);
+ s = edje_object_data_get(lp->bg_object, "hide_signal");
+ lp->hide_anim = s && (atoi(s) == 1);
+ }
lp->comp_object = e_comp_object_util_add(lp->bg_object, 0);
- {
- char buf[1024];
+ {
+ char buf[1024];
- snprintf(buf, sizeof(buf), "desklock.%d", zone->id);
- evas_object_name_set(lp->comp_object, buf);
- }
+ snprintf(buf, sizeof(buf), "desklock.%d", zone->id);
+ evas_object_name_set(lp->comp_object, buf);
+ }
evas_object_layer_set(lp->comp_object, E_LAYER_DESKLOCK);
evas_object_clip_set(lp->comp_object, lp->zone->bg_clip_object);