Enlightenment CVS committal Author : raster Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_border.h e_int_menus.c e_ipc_handlers.h e_main.c e_utils.c e_utils.h Log Message: todo-- =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.317 retrieving revision 1.318 diff -u -3 -r1.317 -r1.318 --- e_border.c 8 Jul 2005 06:14:35 -0000 1.317 +++ e_border.c 8 Jul 2005 08:43:26 -0000 1.318 @@ -1878,6 +1878,22 @@ } } +Evas_List * +e_border_immortal_windows_get(void) +{ + Evas_List *list = NULL, *l; + + for (l = borders; l; l = l->next) + { + E_Border *bd; + + bd = l->data; + if (bd->lock_life) + list = evas_list_append(list, bd); + } + return list; +} + /* local subsystem functions */ static void _e_border_free(E_Border *bd) @@ -5532,7 +5548,7 @@ NEW_LOCK_MI(_("Close"), lock_close); /* NEW_LOCK_MI(_("Focus In"), lock_focus_in);*/ /* NEW_LOCK_MI(_("Focus Out"), lock_focus_out);*/ -/* NEW_LOCK_MI(_("Lifespan"), lock_life);*/ + NEW_LOCK_MI(_("Lifespan"), lock_life); m = e_menu_new(); bd->border_remember_menu = m; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v retrieving revision 1.90 retrieving revision 1.91 diff -u -3 -r1.90 -r1.91 --- e_border.h 7 Jul 2005 09:27:04 -0000 1.90 +++ e_border.h 8 Jul 2005 08:43:26 -0000 1.91 @@ -511,6 +511,7 @@ EAPI void e_border_ping(E_Border *bd); EAPI void e_border_move_cancel(void); EAPI void e_border_resize_cancel(void); +EAPI Evas_List *e_border_immortal_windows_get(void); extern EAPI int E_EVENT_BORDER_RESIZE; extern EAPI int E_EVENT_BORDER_MOVE; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -3 -r1.78 -r1.79 --- e_int_menus.c 4 Jul 2005 10:24:22 -0000 1.78 +++ e_int_menus.c 8 Jul 2005 08:43:26 -0000 1.79 @@ -331,7 +331,7 @@ static void _e_int_menus_main_exit(void *data, E_Menu *m, E_Menu_Item *mi) { - ecore_main_loop_quit(); + if (!e_util_immortal_check()) ecore_main_loop_quit(); } static void =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_ipc_handlers.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- e_ipc_handlers.h 3 Jul 2005 03:12:29 -0000 1.49 +++ e_ipc_handlers.h 8 Jul 2005 08:43:26 -0000 1.50 @@ -1028,7 +1028,7 @@ REQ_NULL(HDL); #elif (TYPE == E_WM_IN) GENERIC(HDL); - ecore_main_loop_quit(); + if (!e_util_immortal_check()) ecore_main_loop_quit(); END_GENERIC(); #elif (TYPE == E_REMOTE_IN) #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_main.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -3 -r1.109 -r1.110 --- e_main.c 5 Jul 2005 12:57:48 -0000 1.109 +++ e_main.c 8 Jul 2005 08:43:26 -0000 1.110 @@ -923,7 +923,7 @@ _e_main_cb_signal_exit(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__) { /* called on ctrl-c, kill (pid) (also SIGINT, SIGTERM and SIGQIT) */ - ecore_main_loop_quit(); + if (!e_util_immortal_check()) ecore_main_loop_quit(); return 1; } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_utils.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- e_utils.c 8 Jul 2005 04:42:50 -0000 1.14 +++ e_utils.c 8 Jul 2005 08:43:27 -0000 1.15 @@ -235,3 +235,26 @@ if (empty == 2) return 1; return 0; } + +int +e_util_immortal_check(void) +{ + Evas_List *wins; + + wins = e_border_immortal_windows_get(); + if (wins) + { + e_error_dialog_show(_("Cannot exit becaose of immortal windows."), + _("Some windows are left with still around with\n" + "the Lifespan lock enabled. This means that\n" + "Enlightenment will not allow itself to exit\n" + "until these windows have been closed or have\n" + "the lifespan lock removed.\n")); + /* FIXME: should really display a list of these lifespan locked */ + /* windows in a dialog and let the user disable their locks in */ + /* this dialog */ + evas_list_free(wins); + return 1; + } + return 0; +} =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_utils.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- e_utils.h 8 Jul 2005 04:42:50 -0000 1.11 +++ e_utils.h 8 Jul 2005 08:43:27 -0000 1.12 @@ -19,6 +19,7 @@ EAPI int e_util_head_exec(int head, char *cmd); EAPI int e_util_strcmp(char *s1, char *s2); EAPI int e_util_both_str_empty(char *s1, char *s2); - +EAPI int e_util_immortal_check(void); + #endif #endif ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs