summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 09:08:33 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2012-12-21 09:08:33 +0000
commit4ee20a2c2f91d778218056acac667a855395a530 (patch)
tree18c8ded76b13cad7ebf99315b27db5d5f87a8d3a
parente049fbf4ee23df67054f9e59945ef866877f5b17 (diff)
use edje_file_group_exists instead of manually iterating the groups
SVN revision: 81524
-rw-r--r--src/bin/e_bg.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index be88808bc..34bcd213f 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -148,9 +148,7 @@ EAPI const char *
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 Eina_List *l, *entries;
152 const char *bgfile = ""; 151 const char *bgfile = "";
153 char *entry;
154 int ok = 0; 152 int ok = 0;
155 153
156 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);
@@ -185,19 +183,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
185 } 183 }
186 if (bgfile && eina_str_has_extension(bgfile, ".edj")) 184 if (bgfile && eina_str_has_extension(bgfile, ".edj"))
187 { 185 {
188 entries = edje_file_collection_list(bgfile); 186 ok = edje_file_group_exists(bgfile, "e/desktop/background");
189 if (entries)
190 {
191 EINA_LIST_FOREACH(entries, l, entry)
192 {
193 if (!strcmp(entry, "e/desktop/background"))
194 {
195 ok = 1;
196 break;
197 }
198 }
199 edje_file_collection_list_free(entries);
200 }
201 } 187 }
202 else if ((bgfile) && (bgfile[0])) 188 else if ((bgfile) && (bgfile[0]))
203 ok = 1; 189 ok = 1;