summaryrefslogtreecommitdiff
path: root/src/bin/e_bg.c
diff options
context:
space:
mode:
authorrephorm <rephorm>2006-10-08 21:15:21 +0000
committerrephorm <rephorm@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2006-10-08 21:15:21 +0000
commite41e945e3ba1714db3c184a70331801b9ef482ff (patch)
tree0bd85019cca09b27b0c102b3de26bc70161a11c4 /src/bin/e_bg.c
parent570f436e9aff4392d58ed7ffd387073178d74062 (diff)
break code that finds bg file for a zone into a separate function
SVN revision: 26433
Diffstat (limited to 'src/bin/e_bg.c')
-rw-r--r--src/bin/e_bg.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index d1e6422..6d81f1d 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -9,20 +9,12 @@ static void _e_bg_signal(void *data, Evas_Object *obj, const char *emission, con
9/* local subsystem globals */ 9/* local subsystem globals */
10 10
11/* externally accessible functions */ 11/* externally accessible functions */
12EAPI void 12EAPI const char *
13e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition) 13e_bg_file_get(E_Zone *zone)
14{ 14{
15 Evas_Object *o;
16 Evas_List *l, *ll, *entries; 15 Evas_List *l, *ll, *entries;
17 int ok; 16 int ok;
18 const char *bgfile = ""; 17 const char *bgfile = "";
19 const char *trans = "";
20
21 if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
22 else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk;
23 else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change;
24 if ((!trans) || (strlen(trans) < 1)) transition = E_BG_TRANSITION_NONE;
25
26 ok = 0; 18 ok = 0;
27 for (l = e_config->desktop_backgrounds; l; l = l->next) 19 for (l = e_config->desktop_backgrounds; l; l = l->next)
28 { 20 {
@@ -73,6 +65,23 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
73 bgfile = e_theme_edje_file_get("base/theme/background", "e/desktop/background"); 65 bgfile = e_theme_edje_file_get("base/theme/background", "e/desktop/background");
74 } 66 }
75 } 67 }
68 return bgfile;
69}
70
71EAPI void
72e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
73{
74 Evas_Object *o;
75 const char *bgfile = "";
76 const char *trans = "";
77
78 if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
79 else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk;
80 else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change;
81 if ((!trans) || (strlen(trans) < 1)) transition = E_BG_TRANSITION_NONE;
82
83 bgfile = e_bg_file_get(zone);
84
76 if (zone->bg_object) 85 if (zone->bg_object)
77 { 86 {
78 const char *pfile = ""; 87 const char *pfile = "";