discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=187fd44936bbc2ab15623fae0c4cb113ce256e8d

commit 187fd44936bbc2ab15623fae0c4cb113ce256e8d
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Jul 24 14:31:29 2015 -0400

    add an actual module no-save blacklist
    
    this should make it easier to keep track of modules that should be
    blocked from having their load states saved
---
 src/bin/e_module.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/bin/e_module.c b/src/bin/e_module.c
index d12d817..fc4f6ed 100644
--- a/src/bin/e_module.c
+++ b/src/bin/e_module.c
@@ -131,6 +131,22 @@ _module_monitor_error(void *d EINA_UNUSED, int type 
EINA_UNUSED, Eio_Monitor_Err
    return ECORE_CALLBACK_RENEW;
 }
 
+static Eina_Bool
+_module_is_nosave(const char *name)
+{
+   const char *blacklist[] =
+   {
+      "comp",
+      "conf_comp",
+      "xwayland",
+   };
+   unsigned int i;
+
+   for (i = 0; i < EINA_C_ARRAY_LENGTH(blacklist); i++)
+     if (eina_streq(name, blacklist[i])) return EINA_TRUE;
+   return !strncmp(name, "wl_", 3); //block wl_* modules from being saved
+}
+
 /* externally accessible functions */
 EINTERN int
 e_module_init(void)
@@ -240,10 +256,7 @@ e_module_all_load(void)
      {
         if ((!em) || (!em->name)) continue;
 
-        if ((!e_util_strcmp(em->name, "comp")) || (!e_util_strcmp(em->name, 
"conf_comp")) ||
-            (eina_streq(em->name, "xwayland")) ||
-            (!strncmp(em->name, "wl_", 3)) //block wl_* modules from being 
saved
-           )
+        if (_module_is_nosave(em->name))
           {
              eina_stringshare_del(em->name);
              e_config->modules = eina_list_remove_list(e_config->modules, l);

-- 


Reply via email to