summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2005-12-25 10:20:25 +0000
committerChristopher Michael <cpmichael1@comcast.net>2005-12-25 10:20:25 +0000
commit8e4bfac183213579e6ce8fa008f83963556f6090 (patch)
tree12d645f8e555414b0243a53ca85f01df3d778878
parent0affc3ee5cfbb9a8cc7bb91f3a72b025394e132e (diff)
Destroy list when finished
SVN revision: 19290
-rw-r--r--src/bin/e_int_config_modules.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c
index 9cf503ad7..e11e66b71 100644
--- a/src/bin/e_int_config_modules.c
+++ b/src/bin/e_int_config_modules.c
@@ -266,7 +266,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
266 o = e_widget_list_add(evas, 0, 1); 266 o = e_widget_list_add(evas, 0, 1);
267 of = e_widget_framelist_add(evas, "Modules", 1); 267 of = e_widget_framelist_add(evas, "Modules", 1);
268 ilist = e_widget_ilist_add(evas, 16, 16, NULL); 268 ilist = e_widget_ilist_add(evas, 16, 16, NULL);
269 e_widget_on_change_hook_set(ilist, _ilist_cb_change, cfdata); 269 e_widget_on_change_hook_set(ilist, _ilist_cb_change, cfdata);
270 270
271 /* Loaded Modules */ 271 /* Loaded Modules */
272 for (l = e_config->modules; l; l = l->next) 272 for (l = e_config->modules; l; l = l->next)
@@ -322,11 +322,10 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
322 /* generate the core widget layout for an advanced dialog */ 322 /* generate the core widget layout for an advanced dialog */
323 Evas_Object *o, *ob, *of, *oc, *ilist, *ilist2; 323 Evas_Object *o, *ob, *of, *oc, *ilist, *ilist2;
324 E_Radio_Group *rg; 324 E_Radio_Group *rg;
325 Evas_List *l, *l2; 325 Evas_List *l;
326 E_Module *m; 326 E_Module *m;
327 Ecore_List *modules; 327 Ecore_List *modules;
328 char full_path[PATH_MAX]; 328 char full_path[PATH_MAX];
329 int loaded;
330 char *icon; 329 char *icon;
331 char buf[PATH_MAX]; 330 char buf[PATH_MAX];
332 331
@@ -399,13 +398,14 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
399 E_Path_Dir *epd; 398 E_Path_Dir *epd;
400 399
401 epd = l->data; 400 epd = l->data;
402 printf("Dir: %s\n", epd->dir); 401 if (ecore_file_is_dir(epd->dir))
403 if ((ecore_file_exists(epd->dir)) && (ecore_file_is_dir(epd->dir)))
404 { 402 {
405 modules = ecore_file_ls(epd->dir); 403 modules = ecore_file_ls(epd->dir);
406 if (modules) 404 if (modules)
407 { 405 {
408 char *mod; 406 char *mod;
407
408 ecore_list_goto_first(modules);
409 while ((mod = ecore_list_next(modules))) 409 while ((mod = ecore_list_next(modules)))
410 { 410 {
411 snprintf(full_path, sizeof(full_path), "%s/%s", epd->dir, mod); 411 snprintf(full_path, sizeof(full_path), "%s/%s", epd->dir, mod);
@@ -414,22 +414,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
414 { 414 {
415 E_Module *m; 415 E_Module *m;
416 m = e_module_find(mod); 416 m = e_module_find(mod);
417 if (m) 417 if (!m)
418 {
419 loaded = 0;
420 for (l2 = e_config->modules; l2; l2 = l2->next)
421 {
422 E_Config_Module *em;
423
424 em = l2->data;
425 if (!strcmp(m->name, em->name))
426 {
427 loaded = 1;
428 break;
429 }
430 }
431 }
432 if ((!m) || (!loaded))
433 { 418 {
434 oc = e_icon_add(evas); 419 oc = e_icon_add(evas);
435 icon = e_path_find(path_modules, buf); 420 icon = e_path_find(path_modules, buf);
@@ -443,6 +428,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
443 } 428 }
444 429
445 ecore_list_destroy(modules); 430 ecore_list_destroy(modules);
431 ecore_list_destroy(l);
446 432
447 e_widget_ilist_go(ilist2); 433 e_widget_ilist_go(ilist2);
448 e_widget_min_size_set(ilist2, 120, 120); 434 e_widget_min_size_set(ilist2, 120, 120);