summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2009-06-20 07:37:26 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2009-06-20 07:37:26 +0000
commitd55abb6de7c77a9ebbb760be33bef4ad47a0ee3f (patch)
tree1b516ffc96984dbf37080a8d1a92c76bb58a5251
parentba552d05f1d9da219c927a6a06862d017f36456a (diff)
clean shutdown on all cases, use eina macros to free list.
SVN revision: 41125
-rw-r--r--src/bin/ui.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bin/ui.c b/src/bin/ui.c
index ee2187a..2c09665 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -52,15 +52,13 @@ static int exit_after_test = 0;
52static void 52static void
53_ui_exit(void) 53_ui_exit(void)
54{ 54{
55 while (menu) 55 Menu_Item *mi;
56 {
57 Menu_Item *mi;
58 56
59 mi = (Menu_Item *)menu->data; 57 EINA_LIST_FREE(menu, mi)
58 {
60 free(mi->icon); 59 free(mi->icon);
61 free(mi->text); 60 free(mi->text);
62 free(mi); 61 free(mi);
63 menu = eina_list_remove_list(menu, menu);
64 } 62 }
65 engine_abort(); 63 engine_abort();
66} 64}
@@ -190,7 +188,7 @@ _ui_key(void *data, Evas *e, Evas_Object *obj, void *event_info)
190 (!strcmp(ev->keyname, "q")) || 188 (!strcmp(ev->keyname, "q")) ||
191 (!strcmp(ev->keyname, "Q"))) 189 (!strcmp(ev->keyname, "Q")))
192 { 190 {
193 engine_abort(); 191 _ui_exit();
194 } 192 }
195 if (menu_active) 193 if (menu_active)
196 { 194 {