forked from enlightenment/enlightenment
e17: fix e_utils_config_check, no need to pass both epoch and version
SVN revision: 63029
This commit is contained in:
parent
c4d18d3cfb
commit
f276811f8a
|
@ -1571,14 +1571,14 @@ _e_util_conf_timer_new(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
e_util_module_config_check(const char *module_name, int conf, int epoch, int version)
|
e_util_module_config_check(const char *module_name, int loaded, int current)
|
||||||
{
|
{
|
||||||
if ((conf >> 16) < epoch)
|
if ((loaded >> 16) < (current >> 16))
|
||||||
{
|
{
|
||||||
ecore_timer_add(1.0, _e_util_conf_timer_old, strdup(module_name));
|
ecore_timer_add(1.0, _e_util_conf_timer_old, strdup(module_name));
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
else if (conf > version)
|
else if (loaded > current)
|
||||||
{
|
{
|
||||||
ecore_timer_add(1.0, _e_util_conf_timer_new, strdup(module_name));
|
ecore_timer_add(1.0, _e_util_conf_timer_new, strdup(module_name));
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
|
@ -67,7 +67,9 @@ EAPI int e_util_dir_check(const char *dir);
|
||||||
EAPI void e_util_defer_object_del(E_Object *obj);
|
EAPI void e_util_defer_object_del(E_Object *obj);
|
||||||
EAPI const char *e_util_winid_str_get(Ecore_X_Window win);
|
EAPI const char *e_util_winid_str_get(Ecore_X_Window win);
|
||||||
EAPI void e_util_win_auto_resize_fill(E_Win *win);
|
EAPI void e_util_win_auto_resize_fill(E_Win *win);
|
||||||
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int conf, int epoch, int version);
|
/* check if loaded config version matches the current version, show a
|
||||||
|
dialog warning if loaded version is older or newer than current */
|
||||||
|
EAPI Eina_Bool e_util_module_config_check(const char *module_name, int loaded, int current);
|
||||||
|
|
||||||
EAPI E_Dialog *e_util_image_import_settings_new(const char *path, void (*cb)(void *data, const char *path, Eina_Bool ok, Eina_Bool external, int quality, E_Image_Import_Mode mode), const void *data);
|
EAPI E_Dialog *e_util_image_import_settings_new(const char *path, void (*cb)(void *data, const char *path, Eina_Bool ok, Eina_Bool external, int quality, E_Image_Import_Mode mode), const void *data);
|
||||||
EAPI E_Util_Image_Import_Handle *e_util_image_import(const char *image_path, const char *edje_path, const char *edje_group, Eina_Bool external, int quality, E_Image_Import_Mode mode, void (*cb)(void *data, Eina_Bool ok, const char *image_path, const char *edje_path), const void *data);
|
EAPI E_Util_Image_Import_Handle *e_util_image_import(const char *image_path, const char *edje_path, const char *edje_group, Eina_Bool external, int quality, E_Image_Import_Mode mode, void (*cb)(void *data, Eina_Bool ok, const char *image_path, const char *edje_path), const void *data);
|
||||||
|
|
|
@ -416,9 +416,9 @@ _config_init()
|
||||||
#undef D
|
#undef D
|
||||||
evry_conf = e_config_domain_load("module.everything", conf_edd);
|
evry_conf = e_config_domain_load("module.everything", conf_edd);
|
||||||
|
|
||||||
if (evry_conf && !e_util_module_config_check
|
if (evry_conf && !e_util_module_config_check(_("Everything Module"),
|
||||||
(_("Everything Module"), evry_conf->version,
|
evry_conf->version,
|
||||||
MOD_CONFIG_FILE_EPOCH, MOD_CONFIG_FILE_VERSION))
|
MOD_CONFIG_FILE_VERSION))
|
||||||
_config_free();
|
_config_free();
|
||||||
|
|
||||||
if (!evry_conf)
|
if (!evry_conf)
|
||||||
|
|
|
@ -1384,9 +1384,9 @@ _conf_init(E_Module *m)
|
||||||
_conf = e_config_domain_load("module.everything-apps", conf_edd);
|
_conf = e_config_domain_load("module.everything-apps", conf_edd);
|
||||||
|
|
||||||
|
|
||||||
if (_conf && !e_util_module_config_check
|
if (_conf && !e_util_module_config_check(_("Everything Applications"),
|
||||||
(_("Everything Applications"), _conf->version,
|
_conf->version,
|
||||||
MOD_CONFIG_FILE_EPOCH, MOD_CONFIG_FILE_VERSION))
|
MOD_CONFIG_FILE_VERSION))
|
||||||
_conf_free();
|
_conf_free();
|
||||||
|
|
||||||
_conf_new();
|
_conf_new();
|
||||||
|
|
|
@ -473,7 +473,6 @@ _dir_watcher(void *data, Ecore_File_Monitor *em __UNUSED__, Ecore_File_Event eve
|
||||||
|
|
||||||
_item_fill(file);
|
_item_fill(file);
|
||||||
p->files = eina_list_append(p->files, file);
|
p->files = eina_list_append(p->files, file);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ECORE_FILE_EVENT_DELETED_FILE:
|
case ECORE_FILE_EVENT_DELETED_FILE:
|
||||||
|
@ -1387,7 +1386,8 @@ _plugins_init(const Evry_API *api)
|
||||||
p->config->top_level = EINA_FALSE;
|
p->config->top_level = EINA_FALSE;
|
||||||
p->config->min_query = 3;
|
p->config->min_query = 3;
|
||||||
}
|
}
|
||||||
|
_plugins = eina_list_append(_plugins, p);
|
||||||
|
|
||||||
p = EVRY_PLUGIN_BASE("Recent Files", _module_icon, EVRY_TYPE_FILE,
|
p = EVRY_PLUGIN_BASE("Recent Files", _module_icon, EVRY_TYPE_FILE,
|
||||||
_recentf_begin, _finish, _recentf_fetch);
|
_recentf_begin, _finish, _recentf_fetch);
|
||||||
p->browse = &_recentf_browse;
|
p->browse = &_recentf_browse;
|
||||||
|
@ -1398,7 +1398,8 @@ _plugins_init(const Evry_API *api)
|
||||||
p->config->top_level = EINA_FALSE;
|
p->config->top_level = EINA_FALSE;
|
||||||
p->config->min_query = 3;
|
p->config->min_query = 3;
|
||||||
}
|
}
|
||||||
|
_plugins = eina_list_append(_plugins, p);
|
||||||
|
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1611,9 +1612,9 @@ _conf_init(E_Module *m)
|
||||||
|
|
||||||
_conf = e_config_domain_load("module.everything-files", conf_edd);
|
_conf = e_config_domain_load("module.everything-files", conf_edd);
|
||||||
|
|
||||||
if (_conf && !e_util_module_config_check
|
if (_conf && !e_util_module_config_check(_("Everything Files"),
|
||||||
(_("Everything Files"), _conf->version,
|
_conf->version,
|
||||||
MOD_CONFIG_FILE_EPOCH, MOD_CONFIG_FILE_VERSION))
|
MOD_CONFIG_FILE_VERSION))
|
||||||
_conf_free();
|
_conf_free();
|
||||||
|
|
||||||
if (!_conf) _conf_new();
|
if (!_conf) _conf_new();
|
||||||
|
|
|
@ -1253,7 +1253,7 @@ _mixer_module_configuration_load(E_Config_DD *module_conf_edd)
|
||||||
return _mixer_module_configuration_new();
|
return _mixer_module_configuration_new();
|
||||||
|
|
||||||
if (conf && !e_util_module_config_check (_("Mixer Module"), conf->version,
|
if (conf && !e_util_module_config_check (_("Mixer Module"), conf->version,
|
||||||
MOD_CONFIG_FILE_EPOCH, MOD_CONFIG_FILE_VERSION))
|
MOD_CONFIG_FILE_VERSION))
|
||||||
{
|
{
|
||||||
_mixer_module_configuration_free(conf);
|
_mixer_module_configuration_free(conf);
|
||||||
return _mixer_module_configuration_new();
|
return _mixer_module_configuration_new();
|
||||||
|
|
Loading…
Reference in New Issue