Here you have my second patch - I've really wanted this functionality, so I decided to have a go at implementing it..

This patch also removes the theme path for "econfig" that is set by the init function (and any others it might set) before loading the file

Cheers,
--
Morten
Index: ecore_config.c
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/ecore_config.c,v
retrieving revision 1.3
diff -u -r1.3 ecore_config.c
--- ecore_config.c      18 Sep 2005 12:48:24 -0000      1.3
+++ ecore_config.c      6 Nov 2005 03:24:24 -0000
@@ -76,8 +76,14 @@
 int
 list(const char *file)
 {
-       fprintf(stderr, "Command not yet supported\n");
-       return -1;
+       Ecore_Config_Prop *e;
+       e = __ecore_config_bundle_local->data;
+
+       do {
+               printf("%s\n", ecore_config_as_string_get(e->key));
+       } while(e = e->next);
+
+       return 0;
 }
 
 int
@@ -194,8 +200,17 @@
                }
        }
        
-       // Load configuration from file
        ecore_config_init("econfig");
+
+       // Remove any config not from the file
+       Ecore_Config_Bundle *t;
+       Ecore_Config_Prop *e;
+       t = __ecore_config_bundle_local;
+       while(e = t->data) {
+               ecore_config_dst(e);
+       }
+
+       // Load configuration from file
        ecore_config_file_load(file);
        
        // Execute command

Reply via email to