elementary/main - elm_config_sub_shutdown is more sensible and removed duplicated codes

SVN revision: 63649
This commit is contained in:
ChunEon Park 2011-09-29 02:00:20 +00:00
parent f77106b902
commit 44c0da0902
3 changed files with 18 additions and 22 deletions

View File

@ -1690,6 +1690,22 @@ _elm_config_init(void)
_elm_recache();
}
void
_elm_config_sub_shutdown(void)
{
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11))
#undef ENGINE_COMPARE
{
#ifdef HAVE_ELEMENTARY_X
ecore_x_disconnect();
#endif
}
}
void
_elm_config_sub_init(void)
{

View File

@ -421,17 +421,6 @@ elm_quicklaunch_sub_init(int argc,
edje_init();
_elm_module_init();
_elm_config_sub_init();
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11))
#undef ENGINE_COMPARE
{
#ifdef HAVE_ELEMENTARY_X
ecore_x_init(NULL);
#endif
}
ecore_evas_init(); // FIXME: check errors
ecore_imf_init();
ecore_con_init();
@ -459,17 +448,7 @@ elm_quicklaunch_sub_shutdown(void)
ecore_con_shutdown();
ecore_imf_shutdown();
ecore_evas_shutdown();
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11))
#undef ENGINE_COMPARE
{
#ifdef HAVE_ELEMENTARY_X
ecore_x_disconnect();
#endif
}
_elm_config_sub_shutdown();
#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||

View File

@ -200,6 +200,7 @@ void _elm_widget_mirrored_reload(Evas_Object *obj);
void _elm_config_init(void);
void _elm_config_sub_init(void);
void _elm_config_shutdown(void);
void _elm_config_sub_shutdown(void);
Eina_Bool _elm_config_save(void);
void _elm_config_reload(void);