Rename some functions to be more 'illume' specific so we don't get any
potential clashes w/ other modules. SVN revision: 46511
This commit is contained in:
parent
301223f66f
commit
2468456d1b
|
@ -44,7 +44,7 @@ e_illume_zone_config_get(int id)
|
||||||
eina_list_append(_e_illume_cfg->policy.zones, cz);
|
eina_list_append(_e_illume_cfg->policy.zones, cz);
|
||||||
|
|
||||||
/* save it in config */
|
/* save it in config */
|
||||||
e_mod_config_save();
|
e_mod_illume_config_save();
|
||||||
|
|
||||||
/* return a fallback */
|
/* return a fallback */
|
||||||
return cz;
|
return cz;
|
||||||
|
|
|
@ -5,37 +5,37 @@
|
||||||
#include "e_mod_config_policy.h"
|
#include "e_mod_config_policy.h"
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _e_mod_config_free(void);
|
static void _e_mod_illume_config_free(void);
|
||||||
static void _e_mod_config_new(void);
|
static void _e_mod_illume_config_new(void);
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
static E_Config_DD *_conf_edd = NULL;
|
static E_Config_DD *_il_conf_edd = NULL;
|
||||||
static E_Config_DD *_conf_zone_edd = NULL;
|
static E_Config_DD *_il_conf_zone_edd = NULL;
|
||||||
|
|
||||||
/* external variables */
|
/* external variables */
|
||||||
E_Illume_Config *_e_illume_cfg = NULL;
|
E_Illume_Config *_e_illume_cfg = NULL;
|
||||||
|
|
||||||
int
|
EAPI int
|
||||||
e_mod_config_init(void)
|
e_mod_illume_config_init(void)
|
||||||
{
|
{
|
||||||
char buff[PATH_MAX];
|
char buff[PATH_MAX];
|
||||||
|
|
||||||
/* create config structure for zones */
|
/* create config structure for zones */
|
||||||
_conf_zone_edd = E_CONFIG_DD_NEW("Illume_Config_Zone", E_Illume_Config_Zone);
|
_il_conf_zone_edd = E_CONFIG_DD_NEW("Illume_Config_Zone", E_Illume_Config_Zone);
|
||||||
#undef T
|
#undef T
|
||||||
#undef D
|
#undef D
|
||||||
#define T E_Illume_Config_Zone
|
#define T E_Illume_Config_Zone
|
||||||
#define D _conf_zone_edd
|
#define D _il_conf_zone_edd
|
||||||
E_CONFIG_VAL(D, T, id, INT);
|
E_CONFIG_VAL(D, T, id, INT);
|
||||||
E_CONFIG_VAL(D, T, mode.dual, INT);
|
E_CONFIG_VAL(D, T, mode.dual, INT);
|
||||||
E_CONFIG_VAL(D, T, mode.side, INT);
|
E_CONFIG_VAL(D, T, mode.side, INT);
|
||||||
|
|
||||||
/* create config structure for module */
|
/* create config structure for module */
|
||||||
_conf_edd = E_CONFIG_DD_NEW("Illume_Config", E_Illume_Config);
|
_il_conf_edd = E_CONFIG_DD_NEW("Illume_Config", E_Illume_Config);
|
||||||
#undef T
|
#undef T
|
||||||
#undef D
|
#undef D
|
||||||
#define T E_Illume_Config
|
#define T E_Illume_Config
|
||||||
#define D _conf_edd
|
#define D _il_conf_edd
|
||||||
E_CONFIG_VAL(D, T, version, INT);
|
E_CONFIG_VAL(D, T, version, INT);
|
||||||
E_CONFIG_VAL(D, T, animation.vkbd.duration, INT);
|
E_CONFIG_VAL(D, T, animation.vkbd.duration, INT);
|
||||||
E_CONFIG_VAL(D, T, animation.quickpanel.duration, INT);
|
E_CONFIG_VAL(D, T, animation.quickpanel.duration, INT);
|
||||||
|
@ -72,17 +72,17 @@ e_mod_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, policy.home.match.name, INT);
|
E_CONFIG_VAL(D, T, policy.home.match.name, INT);
|
||||||
E_CONFIG_VAL(D, T, policy.home.match.title, INT);
|
E_CONFIG_VAL(D, T, policy.home.match.title, INT);
|
||||||
E_CONFIG_VAL(D, T, policy.home.match.type, INT);
|
E_CONFIG_VAL(D, T, policy.home.match.type, INT);
|
||||||
E_CONFIG_LIST(D, T, policy.zones, _conf_zone_edd);
|
E_CONFIG_LIST(D, T, policy.zones, _il_conf_zone_edd);
|
||||||
|
|
||||||
/* attempt to load existing configuration */
|
/* attempt to load existing configuration */
|
||||||
_e_illume_cfg = e_config_domain_load("module.illume2", _conf_edd);
|
_e_illume_cfg = e_config_domain_load("module.illume2", _il_conf_edd);
|
||||||
|
|
||||||
/* check version */
|
/* check version */
|
||||||
if ((_e_illume_cfg) && ((_e_illume_cfg->version >> 16) < IL_CONFIG_MAJOR))
|
if ((_e_illume_cfg) && ((_e_illume_cfg->version >> 16) < IL_CONFIG_MAJOR))
|
||||||
_e_mod_config_free();
|
_e_mod_illume_config_free();
|
||||||
|
|
||||||
/* create new config if we need to */
|
/* create new config if we need to */
|
||||||
if (!_e_illume_cfg) _e_mod_config_new();
|
if (!_e_illume_cfg) _e_mod_illume_config_new();
|
||||||
|
|
||||||
/* setup category for config panel */
|
/* setup category for config panel */
|
||||||
snprintf(buff, sizeof(buff), "%s/e-module-illume2.edj", _e_illume_mod_dir);
|
snprintf(buff, sizeof(buff), "%s/e-module-illume2.edj", _e_illume_mod_dir);
|
||||||
|
@ -102,8 +102,8 @@ e_mod_config_init(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
EAPI int
|
||||||
e_mod_config_shutdown(void)
|
e_mod_illume_config_shutdown(void)
|
||||||
{
|
{
|
||||||
/* destroy config item entries */
|
/* destroy config item entries */
|
||||||
e_configure_registry_item_del("illume/windows");
|
e_configure_registry_item_del("illume/windows");
|
||||||
|
@ -114,24 +114,24 @@ e_mod_config_shutdown(void)
|
||||||
e_configure_registry_category_del("illume");
|
e_configure_registry_category_del("illume");
|
||||||
|
|
||||||
/* free config structure */
|
/* free config structure */
|
||||||
_e_mod_config_free();
|
_e_mod_illume_config_free();
|
||||||
|
|
||||||
/* free data descriptors */
|
/* free data descriptors */
|
||||||
E_CONFIG_DD_FREE(_conf_zone_edd);
|
E_CONFIG_DD_FREE(_il_conf_zone_edd);
|
||||||
E_CONFIG_DD_FREE(_conf_edd);
|
E_CONFIG_DD_FREE(_il_conf_edd);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
EAPI int
|
||||||
e_mod_config_save(void)
|
e_mod_illume_config_save(void)
|
||||||
{
|
{
|
||||||
return e_config_domain_save("module.illume2", _conf_edd, _e_illume_cfg);
|
return e_config_domain_save("module.illume2", _il_conf_edd, _e_illume_cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* local functions */
|
/* local functions */
|
||||||
static void
|
static void
|
||||||
_e_mod_config_free(void)
|
_e_mod_illume_config_free(void)
|
||||||
{
|
{
|
||||||
E_Illume_Config_Zone *cz;
|
E_Illume_Config_Zone *cz;
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ _e_mod_config_free(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_mod_config_new(void)
|
_e_mod_illume_config_new(void)
|
||||||
{
|
{
|
||||||
E_Illume_Config_Zone *cz;
|
E_Illume_Config_Zone *cz;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
# define IL_CONFIG_MAJOR 0
|
# define IL_CONFIG_MAJOR 0
|
||||||
# define IL_CONFIG_MINOR 1
|
# define IL_CONFIG_MINOR 1
|
||||||
|
|
||||||
int e_mod_config_init(void);
|
EAPI int e_mod_illume_config_init(void);
|
||||||
int e_mod_config_shutdown(void);
|
EAPI int e_mod_illume_config_shutdown(void);
|
||||||
int e_mod_config_save(void);
|
EAPI int e_mod_illume_config_save(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,7 @@ e_modapi_init(E_Module *m)
|
||||||
_e_illume_mod_dir = eina_stringshare_add(m->dir);
|
_e_illume_mod_dir = eina_stringshare_add(m->dir);
|
||||||
|
|
||||||
/* try to initialize the config subsystem */
|
/* try to initialize the config subsystem */
|
||||||
if (!e_mod_config_init())
|
if (!e_mod_illume_config_init())
|
||||||
{
|
{
|
||||||
/* clear module directory variable */
|
/* clear module directory variable */
|
||||||
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
||||||
|
@ -43,7 +43,7 @@ e_modapi_init(E_Module *m)
|
||||||
if (!e_mod_policy_init())
|
if (!e_mod_policy_init())
|
||||||
{
|
{
|
||||||
/* shutdown the config subsystem */
|
/* shutdown the config subsystem */
|
||||||
e_mod_config_shutdown();
|
e_mod_illume_config_shutdown();
|
||||||
|
|
||||||
/* clear module directory variable */
|
/* clear module directory variable */
|
||||||
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
||||||
|
@ -131,7 +131,7 @@ e_modapi_shutdown(E_Module *m)
|
||||||
e_mod_policy_shutdown();
|
e_mod_policy_shutdown();
|
||||||
|
|
||||||
/* shutdown the config subsystem */
|
/* shutdown the config subsystem */
|
||||||
e_mod_config_shutdown();
|
e_mod_illume_config_shutdown();
|
||||||
|
|
||||||
/* clear module directory variable */
|
/* clear module directory variable */
|
||||||
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
if (_e_illume_mod_dir) eina_stringshare_del(_e_illume_mod_dir);
|
||||||
|
@ -143,5 +143,5 @@ e_modapi_shutdown(E_Module *m)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_modapi_save(E_Module *m)
|
e_modapi_save(E_Module *m)
|
||||||
{
|
{
|
||||||
return e_mod_config_save();
|
return e_mod_illume_config_save();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue