only save config when/if it changes, not always... and fix module data dir...
SVN revision: 13236
This commit is contained in:
parent
6aebc52d48
commit
ca73c0ff58
|
@ -142,6 +142,7 @@ e_config_init(void)
|
|||
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);
|
||||
|
@ -198,6 +199,17 @@ e_config_save(void)
|
|||
return e_config_domain_save("e", _e_config_edd, e_config);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -250,8 +262,8 @@ e_config_domain_save(char *domain, E_Config_DD *edd, void *data)
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ EAPI void *e_config_domain_load(char *domain, E_Config_DD *edd);
|
|||
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;
|
||||
|
|
|
@ -320,8 +320,9 @@ main(int argc, char **argv)
|
|||
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 */
|
||||
|
|
|
@ -78,7 +78,7 @@ e_module_new(char *name)
|
|||
{
|
||||
E_Module *m;
|
||||
char buf[4096];
|
||||
char *modpath;
|
||||
char *modpath, *s;
|
||||
Evas_List *l;
|
||||
int in_list = 0;
|
||||
|
||||
|
@ -140,7 +140,12 @@ e_module_new(char *name)
|
|||
}
|
||||
_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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue