- delay ecore_file shutdown. if we shut it down before closing all apps / windows then anything using file monitors will die and E will sefgault.

SVN revision: 17815
This commit is contained in:
codewarrior 2005-10-23 14:57:51 +00:00 committed by codewarrior
parent db9415d454
commit 80307fd31f
2 changed files with 34 additions and 20 deletions

View File

@ -571,7 +571,7 @@ _e_fm_smart_del(Evas_Object *object)
e_config_domain_save("efm", sd->conf.main_edd, sd->conf.main); e_config_domain_save("efm", sd->conf.main_edd, sd->conf.main);
//if (sd->monitor) ecore_file_monitor_del(sd->monitor); if (sd->monitor) ecore_file_monitor_del(sd->monitor);
sd->monitor = NULL; sd->monitor = NULL;
while (sd->event_handlers) while (sd->event_handlers)
@ -1348,8 +1348,8 @@ _e_fm_dir_set(E_Fm_Smart_Data *sd, const char *dir)
/* Get new files */ /* Get new files */
sd->files = _e_fm_dir_files_get(sd, E_FM_FILE_TYPE_NORMAL); sd->files = _e_fm_dir_files_get(sd, E_FM_FILE_TYPE_NORMAL);
//if (sd->monitor) ecore_file_monitor_del(sd->monitor); if (sd->monitor) ecore_file_monitor_del(sd->monitor);
//sd->monitor = ecore_file_monitor_add(sd->dir, _e_fm_dir_monitor_cb, sd); sd->monitor = ecore_file_monitor_add(sd->dir, _e_fm_dir_monitor_cb, sd);
/* Get special prev dir */ /* Get special prev dir */
if (strcmp(sd->dir, "/")) if (strcmp(sd->dir, "/"))
@ -1495,7 +1495,7 @@ _e_fm_dir_monitor_cb(void *data, Ecore_File_Monitor *ecore_file_monitor,
E_Fm_Smart_Data *sd; E_Fm_Smart_Data *sd;
sd = data; sd = data;
/* FIXME! */ /* FIXME! */
return; return;

View File

@ -261,6 +261,16 @@ main(int argc, char **argv)
exit(-1); exit(-1);
} }
_e_main_shutdown_push(ecore_shutdown); _e_main_shutdown_push(ecore_shutdown);
/* init the file system */
if (!ecore_file_init())
{
e_error_message_show(_("Enlightenment cannot initialize the File system.\n"
"Perhaps you are out of memory?"));
_e_main_shutdown(-1);
}
_e_main_shutdown_push(ecore_file_shutdown);
/* setup my args */ /* setup my args */
ecore_app_args_set(argc, (const char **)argv); ecore_app_args_set(argc, (const char **)argv);
/* setup a handler for when e is asked to exit via a system signal */ /* setup a handler for when e is asked to exit via a system signal */
@ -341,17 +351,27 @@ main(int argc, char **argv)
"Ecore and check they support Software X11 rendering.")); "Ecore and check they support Software X11 rendering."));
_e_main_shutdown(-1); _e_main_shutdown(-1);
} }
_e_main_shutdown_push(ecore_evas_shutdown); _e_main_shutdown_push(ecore_evas_shutdown);
/* init the file system */
if (!ecore_file_init()) /* init the enlightenment thumbnailing system */
{ if (!e_thumb_init())
e_error_message_show(_("Enlightenment cannot initialize the File system.\n" {
"Perhaps you are out of memory?")); e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(-1);
} }
_e_main_shutdown_push(ecore_file_shutdown); _e_main_shutdown_push(e_thumb_shutdown);
/* init the enlightenment file manager */
if (!e_fm_icon_init() || !e_fm_init())
{
e_error_message_show(_("Enlightenment cannot initialize the File manager.\n"));
_e_main_shutdown(-1);
}
_e_main_shutdown_push(e_fm_shutdown);
_e_main_shutdown_push(e_fm_icon_shutdown);
/*** Finished loading subsystems, Loading WM Specifics ***/ /*** Finished loading subsystems, Loading WM Specifics ***/
/* setup directories we will be using for configurations storage etc. */ /* setup directories we will be using for configurations storage etc. */
@ -739,9 +759,6 @@ _e_main_screens_init(void)
if (!e_desk_init()) return 0; if (!e_desk_init()) return 0;
if (!e_gadman_init()) return 0; if (!e_gadman_init()) return 0;
if (!e_menu_init()) return 0; if (!e_menu_init()) return 0;
if (!e_thumb_init()) return 0;
if (!e_fm_icon_init()) return 0;
if (!e_fm_init()) return 0;
num = 0; num = 0;
roots = ecore_x_window_root_list(&num); roots = ecore_x_window_root_list(&num);
@ -796,9 +813,6 @@ _e_main_screens_init(void)
static int static int
_e_main_screens_shutdown(void) _e_main_screens_shutdown(void)
{ {
e_fm_shutdown();
e_fm_icon_shutdown();
e_thumb_shutdown();
e_win_shutdown(); e_win_shutdown();
e_border_shutdown(); e_border_shutdown();
e_focus_shutdown(); e_focus_shutdown();