From: Enlightenment C. <no...@cv...> - 2006-10-08 21:15:24
|
Enlightenment CVS committal Author : rephorm Project : e17 Module : apps/e Dir : e17/apps/e/src/bin Modified Files: e_bg.c e_bg.h Log Message: break code that finds bg file for a zone into a separate function =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_bg.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- e_bg.c 23 Aug 2006 03:39:01 -0000 1.18 +++ e_bg.c 8 Oct 2006 21:15:21 -0000 1.19 @@ -9,20 +9,12 @@ /* local subsystem globals */ /* externally accessible functions */ -EAPI void -e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition) +EAPI const char * +e_bg_file_get(E_Zone *zone) { - Evas_Object *o; Evas_List *l, *ll, *entries; int ok; const char *bgfile = ""; - const char *trans = ""; - - if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start; - else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk; - else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change; - if ((!trans) || (strlen(trans) < 1)) transition = E_BG_TRANSITION_NONE; - ok = 0; for (l = e_config->desktop_backgrounds; l; l = l->next) { @@ -73,6 +65,23 @@ bgfile = e_theme_edje_file_get("base/theme/background", "e/desktop/background"); } } + return bgfile; +} + +EAPI void +e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition) +{ + Evas_Object *o; + const char *bgfile = ""; + const char *trans = ""; + + if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start; + else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk; + else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change; + if ((!trans) || (strlen(trans) < 1)) transition = E_BG_TRANSITION_NONE; + + bgfile = e_bg_file_get(zone); + if (zone->bg_object) { const char *pfile = ""; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_bg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_bg.h 30 Jun 2005 14:35:18 -0000 1.4 +++ e_bg.h 8 Oct 2006 21:15:21 -0000 1.5 @@ -14,6 +14,7 @@ #ifndef E_BG_H #define E_BG_H +EAPI const char *e_bg_file_get(E_Zone *zone); EAPI void e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition); EAPI void e_bg_add(int container, int zone, int desk_x, int desk_y, char *file); EAPI void e_bg_del(int container, int zone, int desk_x, int desk_y); |