summaryrefslogtreecommitdiff
path: root/src/bin/e_bg.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 22:58:17 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 22:58:17 +0000
commit32c5b6e9fd7b4c84be61f01e26613521a49f4f67 (patch)
tree37b2a05d5b78470a1ca152a70028e933650866ca /src/bin/e_bg.c
parent41868cd499ca4e2c3ac192f31c244e90a567e182 (diff)
possibly the last bug fix before release, yet another stringshare bug
ticket #2072 SVN revision: 81620
Diffstat (limited to 'src/bin/e_bg.c')
-rw-r--r--src/bin/e_bg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index 13a05aa..5bbd2a5 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -148,7 +148,7 @@ EAPI Eina_Stringshare *
148e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y) 148e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
149{ 149{
150 const E_Config_Desktop_Background *cfbg; 150 const E_Config_Desktop_Background *cfbg;
151 const char *bgfile = ""; 151 const char *bgfile = NULL;
152 int ok = 0; 152 int ok = 0;
153 153
154 cfbg = e_bg_config_get(container_num, zone_num, desk_x, desk_y); 154 cfbg = e_bg_config_get(container_num, zone_num, desk_x, desk_y);
@@ -156,7 +156,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
156 /* fall back to default */ 156 /* fall back to default */
157 if (cfbg) 157 if (cfbg)
158 { 158 {
159 bgfile = cfbg->file; 159 bgfile = eina_stringshare_ref(cfbg->file);
160 if (bgfile) 160 if (bgfile)
161 { 161 {
162 if (bgfile[0] != '/') 162 if (bgfile[0] != '/')
@@ -164,13 +164,14 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
164 const char *bf; 164 const char *bf;
165 165
166 bf = e_path_find(path_backgrounds, bgfile); 166 bf = e_path_find(path_backgrounds, bgfile);
167 if (bf) bgfile = bf; 167 if (bf)
168 eina_stringshare_replace(&bgfile, bf);
168 } 169 }
169 } 170 }
170 } 171 }
171 else 172 else
172 { 173 {
173 bgfile = e_config->desktop_default_background; 174 bgfile = eina_stringshare_ref(e_config->desktop_default_background);
174 if (bgfile) 175 if (bgfile)
175 { 176 {
176 if (bgfile[0] != '/') 177 if (bgfile[0] != '/')
@@ -178,7 +179,8 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
178 const char *bf; 179 const char *bf;
179 180
180 bf = e_path_find(path_backgrounds, bgfile); 181 bf = e_path_find(path_backgrounds, bgfile);
181 if (bf) bgfile = bf; 182 if (bf)
183 eina_stringshare_replace(&bgfile, bf);
182 } 184 }
183 } 185 }
184 if (bgfile && eina_str_has_extension(bgfile, ".edj")) 186 if (bgfile && eina_str_has_extension(bgfile, ".edj"))
@@ -188,8 +190,8 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
188 else if ((bgfile) && (bgfile[0])) 190 else if ((bgfile) && (bgfile[0]))
189 ok = 1; 191 ok = 1;
190 if (!ok) 192 if (!ok)
191 bgfile = eina_stringshare_add(e_theme_edje_file_get("base/theme/background", 193 eina_stringshare_replace(&bgfile, e_theme_edje_file_get("base/theme/background",
192 "e/desktop/background")); 194 "e/desktop/background"));
193 } 195 }
194 196
195 return bgfile; 197 return bgfile;