Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_actions.c e_main.c 


Log Message:
Keep all actions in a list so we can safely shutdown.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_actions.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- e_actions.c 25 Mar 2007 22:44:59 -0000      1.96
+++ e_actions.c 4 Apr 2007 22:35:08 -0000       1.97
@@ -63,7 +63,6 @@
 
 /* local subsystem functions */
 static void _e_action_free(E_Action *act);
-static Evas_Bool _e_actions_cb_free(Evas_Hash *hash, const char *key, void 
*data, void *fdata);
 static E_Maximize _e_actions_maximize_parse(const char *maximize);
 static int _action_groups_sort_cb(void *d1, void *d2);
 
@@ -1915,6 +1914,7 @@
 
 /* local subsystem globals */
 static Evas_Hash *actions = NULL;
+static Evas_List *action_list = NULL;
 static Evas_List *action_names = NULL;
 static Evas_List *action_groups = NULL;
 
@@ -2253,10 +2253,18 @@
 EAPI int
 e_actions_shutdown(void)
 {
+   Evas_List *l, *tmp;
+
    e_action_predef_name_all_del();
    action_names = evas_list_free(action_names);
-   while (actions)
-     evas_hash_foreach(actions, _e_actions_cb_free, NULL);
+   evas_hash_free(actions);
+   actions = NULL;
+   for (l = action_list; l;)
+     {
+       tmp = l;
+       l = l->next;
+       e_object_del(E_OBJECT(tmp->data));
+     }
    return 1;
 }
 
@@ -2279,6 +2287,7 @@
        act->name = name;
        actions = evas_hash_direct_add(actions, act->name, act);
        action_names = evas_list_append(action_names, name);
+       action_list = evas_list_append(action_list, act);
      }
    return act;
 }
@@ -2442,15 +2451,8 @@
 {
    actions = evas_hash_del(actions, act->name, act);
    action_names = evas_list_remove(action_names, act->name);
+   action_list = evas_list_remove(action_list, act);
    free(act);
-}
-
-static Evas_Bool
-_e_actions_cb_free(Evas_Hash *hash __UNUSED__, const char *key __UNUSED__,
-                  void *data, void *fdata __UNUSED__)
-{
-   e_object_del(E_OBJECT(data));
-   return 0;
 }
 
 static E_Maximize
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_main.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -3 -r1.215 -r1.216
--- e_main.c    4 Apr 2007 22:25:41 -0000       1.215
+++ e_main.c    4 Apr 2007 22:35:08 -0000       1.216
@@ -587,8 +587,7 @@
        e_error_message_show(_("Enlightenment cannot set up its actions 
system."));
        _e_main_shutdown(-1);
      }
-// seem to have gotten into an infitie loop here - disable for now.   
-//   _e_main_shutdown_push(e_actions_shutdown);
+   _e_main_shutdown_push(e_actions_shutdown);
    TS("bindings");
    /* init bindings system */
    if (!e_bindings_init())



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to