From 16bec1dd218f2252238e061d2dd73877fc95229c Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 15 Feb 2006 03:11:36 +0000 Subject: [PATCH] shutdown on restart needs some things to shut down, not all. SVN revision: 20469 --- src/bin/e_apps.c | 18 ++++++++++++++++++ src/bin/e_apps.h | 2 ++ src/bin/e_main.c | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/src/bin/e_apps.c b/src/bin/e_apps.c index 97db51fb4..4e570fb2e 100644 --- a/src/bin/e_apps.c +++ b/src/bin/e_apps.c @@ -176,6 +176,24 @@ e_app_shutdown(void) return 1; } +EAPI void +e_app_unmonitor_all(void) +{ + Evas_List *l; + + for (l = _e_apps_list; l; l = l->next) + { + E_App *a; + + a = l->data; + if (a->monitor) + { + ecore_file_monitor_del(a->monitor); + a->monitor = NULL; + } + } +} + EAPI E_App * e_app_raw_new(void) { diff --git a/src/bin/e_apps.h b/src/bin/e_apps.h index c84718ca3..bc9902007 100644 --- a/src/bin/e_apps.h +++ b/src/bin/e_apps.h @@ -89,6 +89,8 @@ struct _E_App_Autopsy EAPI int e_app_init (void); EAPI int e_app_shutdown (void); +EAPI void e_app_unmonitor_all (void); + EAPI E_App *e_app_new (const char *path, int scan_subdirs); EAPI E_App *e_app_empty_new (const char *path); EAPI void e_app_image_size_set (E_App *a, int w, int h); diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 0c4326bea..33ef42d6a 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -712,6 +712,10 @@ main(int argc, char **argv) /* if we were flagged to restart, then restart. */ if (restart) { + /* selected shutdown */ + e_app_unmonitor_all(); + e_ipc_shutdown(); + ecore_file_shutdown(); ecore_app_restart(); }