summaryrefslogtreecommitdiff
path: root/src/bin/e_bg.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-06-30 14:35:19 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-06-30 14:35:19 +0000
commitf25d47342818bbafaf26170ab213e9a2d8fe19e0 (patch)
treeaad735ff5612f3d6b1ce067b7ce5ae29542174bd /src/bin/e_bg.c
parent472f87ff96748bd2c5d21386d80b1f74c68e7875 (diff)
use desk x,y as ints
SVN revision: 15586
Diffstat (limited to 'src/bin/e_bg.c')
-rw-r--r--src/bin/e_bg.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index 5ed8c9e..0214051 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -73,10 +73,9 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
73 (zone->container->num != cfbg->container)) continue; 73 (zone->container->num != cfbg->container)) continue;
74 if ((cfbg->zone >= 0) && 74 if ((cfbg->zone >= 0) &&
75 (zone->num != cfbg->zone)) continue; 75 (zone->num != cfbg->zone)) continue;
76 if ((!cfbg->desk) || (strlen(cfbg->desk) == 0)) continue;
77 desk = e_desk_current_get(zone); 76 desk = e_desk_current_get(zone);
78 if (!desk) continue; 77 if (!desk) continue;
79 if (strcmp(cfbg->desk, desk->name)) continue; 78 if ((cfbg->desk_x != desk->x) || (cfbg->desk_y != desk->y)) continue;
80 ok = edje_object_file_set(o, cfbg->file, 79 ok = edje_object_file_set(o, cfbg->file,
81 "desktop/background"); 80 "desktop/background");
82 break; 81 break;
@@ -119,21 +118,22 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
119} 118}
120 119
121void 120void
122e_bg_add(int container, int zone, char *desk, char *file) 121e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
123{ 122{
124 E_Config_Desktop_Background *cfbg; 123 E_Config_Desktop_Background *cfbg;
125 124
126 e_bg_del(container, zone, desk); 125 e_bg_del(container, zone, desk_x, desk_y);
127 cfbg = E_NEW(E_Config_Desktop_Background, 1); 126 cfbg = E_NEW(E_Config_Desktop_Background, 1);
128 cfbg->container = container; 127 cfbg->container = container;
129 cfbg->zone = zone; 128 cfbg->zone = zone;
130 cfbg->desk = strdup(desk); 129 cfbg->desk_x = desk_x;
130 cfbg->desk_y = desk_y;
131 cfbg->file = strdup(file); 131 cfbg->file = strdup(file);
132 e_config->desktop_backgrounds = evas_list_append(e_config->desktop_backgrounds, cfbg); 132 e_config->desktop_backgrounds = evas_list_append(e_config->desktop_backgrounds, cfbg);
133} 133}
134 134
135void 135void
136e_bg_del(int container, int zone, char *desk) 136e_bg_del(int container, int zone, int desk_x, int desk_y)
137{ 137{
138 Evas_List *l; 138 Evas_List *l;
139 139
@@ -143,10 +143,9 @@ e_bg_del(int container, int zone, char *desk)
143 143
144 cfbg = l->data; 144 cfbg = l->data;
145 if ((cfbg->container == container) && (cfbg->zone == zone) && 145 if ((cfbg->container == container) && (cfbg->zone == zone) &&
146 (!strcmp(cfbg->desk, desk))) 146 (cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
147 { 147 {
148 e_config->desktop_backgrounds = evas_list_remove_list(e_config->desktop_backgrounds, l); 148 e_config->desktop_backgrounds = evas_list_remove_list(e_config->desktop_backgrounds, l);
149 IF_FREE(cfbg->desk);
150 IF_FREE(cfbg->file); 149 IF_FREE(cfbg->file);
151 free(cfbg); 150 free(cfbg);
152 break; 151 break;