Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_config.c e_config.h e_main.c e_module.c 


Log Message:


only save config when/if it changes, not always... and fix module data dir...

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_config.c  7 Feb 2005 14:37:37 -0000       1.19
+++ e_config.c  8 Feb 2005 03:51:07 -0000       1.20
@@ -142,6 +142,7 @@
             eb->action = E_BINDING_ACTION_MENU;
             e_config->bindings = evas_list_append(e_config->bindings, eb);
          }
+       e_config_save_queue();
      }
 
    E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0);
@@ -199,6 +200,17 @@
 }
 
 void
+e_config_save_flush(void)
+{
+   if (_e_config_save_job)
+     {
+       ecore_job_del(_e_config_save_job);
+       _e_config_save_job = NULL;
+       e_config_domain_save("e", _e_config_edd, e_config);
+     }
+}
+
+void
 e_config_save_queue(void)
 {
    if (_e_config_save_job) ecore_job_del(_e_config_save_job);
@@ -250,8 +262,8 @@
 static void
 _e_config_save_cb(void *data)
 {
+   printf("SAVE!!!!\n");
    e_module_save_all();
-
    e_config_domain_save("e", _e_config_edd, e_config);
    _e_config_save_job = NULL;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- e_config.h  7 Feb 2005 13:51:09 -0000       1.9
+++ e_config.h  8 Feb 2005 03:51:08 -0000       1.10
@@ -87,6 +87,7 @@
 EAPI int   e_config_domain_save(char *domain, E_Config_DD *edd, void *data);
 
 EAPI int e_config_save(void);
+EAPI void e_config_save_flush(void);
 EAPI void e_config_save_queue(void);
 
 extern EAPI E_Config *e_config;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -3 -r1.43 -r1.44
--- e_main.c    7 Feb 2005 15:06:47 -0000       1.43
+++ e_main.c    8 Feb 2005 03:51:08 -0000       1.44
@@ -320,8 +320,9 @@
    ecore_main_loop_begin();
    
    /* ask all modules to save their config and then shutdown */
-   e_module_save_all();
-   e_config_save();
+   /* NB: no need to do this as config shutdown will flush any saves */
+   /*     and all changed config was already saved before */
+   e_config_save_flush();
    e_module_shutdown();
 
    /* unroll our stack of shutdown functions with exit code of 0 */
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_module.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_module.c  7 Feb 2005 15:39:16 -0000       1.13
+++ e_module.c  8 Feb 2005 03:51:08 -0000       1.14
@@ -78,7 +78,7 @@
 {
    E_Module *m;
    char buf[4096];
-   char *modpath;
+   char *modpath, *s;
    Evas_List *l;
    int in_list = 0;
 
@@ -140,7 +140,12 @@
      }
    _e_modules = evas_list_append(_e_modules, m);
    m->name = strdup(name);
-   m->dir = e_file_get_dir(modpath);
+   s = e_file_get_dir(modpath);
+   if (s)
+     {
+       m->dir = e_file_get_dir(s);
+       free(s);
+     }
    m->func.info(m);
    for (l = e_config->modules; l; l = l->next)
      {




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to