elementary: only complain once during init when elm prefs module is not installed.

This commit is contained in:
Cedric BAIL 2016-03-29 14:52:52 -07:00
parent 69d62751f2
commit 2136038a7a
3 changed files with 10 additions and 6 deletions

View File

@ -73,6 +73,7 @@ EAPI int ELM_EVENT_PROCESS_FOREGROUND = 0;
static int _elm_init_count = 0;
static int _elm_sub_init_count = 0;
static int _elm_ql_init_count = 0;
static Eina_Bool _elm_prefs_initted = EINA_FALSE;
static int _elm_policies[ELM_POLICY_LAST];
static Ecore_Event_Handler *_elm_exit_handler = NULL;
static Eina_Bool quicklaunch_on = 0;
@ -703,7 +704,7 @@ elm_quicklaunch_sub_init(int argc,
ecore_imf_init();
ecore_con_init();
ecore_con_url_init();
_elm_prefs_init();
_elm_prefs_initted = _elm_prefs_init();
_elm_ews_wm_init();
elm_color_class_init();
}
@ -725,7 +726,8 @@ elm_quicklaunch_sub_shutdown(void)
{
_elm_win_shutdown();
_elm_module_shutdown();
_elm_prefs_shutdown();
if (_elm_prefs_initted)
_elm_prefs_shutdown();
_elm_ews_wm_shutdown();
ecore_con_url_shutdown();
ecore_con_shutdown();

View File

@ -1819,13 +1819,13 @@ elm_prefs_page_widget_common_add(Evas_Object *prefs EINA_UNUSED,
return EINA_TRUE;
}
void
Eina_Bool
_elm_prefs_init(void)
{
Elm_Module *m;
if (++_elm_prefs_init_count != 1)
return;
return EINA_TRUE;
_elm_prefs_descriptors_init();
_elm_prefs_data_init();
@ -1838,7 +1838,7 @@ _elm_prefs_init(void)
--_elm_prefs_init_count;
_elm_prefs_descriptors_shutdown();
_elm_prefs_data_shutdown();
return;
return EINA_FALSE;
}
_elm_prefs_page_widgets_map = eina_hash_string_superfast_new(NULL);
@ -1846,6 +1846,8 @@ _elm_prefs_init(void)
_elm_prefs_item_type_widgets_map = eina_hash_int32_new(NULL);
m->init_func(m);
return EINA_TRUE;
}
void

View File

@ -366,7 +366,7 @@ Eo *_elm_atspi_bridge_get(void);
void _elm_atspi_bridge_init(void);
void _elm_atspi_bridge_shutdown(void);
void _elm_prefs_init(void);
Eina_Bool _elm_prefs_init(void);
void _elm_prefs_shutdown(void);
/* these already issued by the two above, respectively */