cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2136038a7a1a863874b04a04ad8d9046a411019c

commit 2136038a7a1a863874b04a04ad8d9046a411019c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Mar 29 14:52:52 2016 -0700

    elementary: only complain once during init when elm prefs module is not 
installed.
---
 src/lib/elementary/elm_main.c  | 6 ++++--
 src/lib/elementary/elm_prefs.c | 8 +++++---
 src/lib/elementary/elm_priv.h  | 2 +-
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index d0bbb7d..1795192 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -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();
diff --git a/src/lib/elementary/elm_prefs.c b/src/lib/elementary/elm_prefs.c
index 87e12e0..91a7286 100644
--- a/src/lib/elementary/elm_prefs.c
+++ b/src/lib/elementary/elm_prefs.c
@@ -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
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index f8a5786..a9772a9 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -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 */

-- 


Reply via email to