forked from enlightenment/enlightenment
Add missing eina_shutdown to E's main shutdown stack.
Fix formatting. Remove Whitespace. SVN revision: 41428
This commit is contained in:
parent
43e8b47bb3
commit
69a0f8c84f
|
@ -188,10 +188,7 @@ main(int argc, char **argv)
|
|||
if ((s) && (!getenv("E_RESTART_OK")))
|
||||
{
|
||||
tstart = atof(s);
|
||||
if ((t - tstart) < 5.0)
|
||||
{
|
||||
safe_mode = 1;
|
||||
}
|
||||
if ((t - tstart) < 5.0) safe_mode = 1;
|
||||
}
|
||||
|
||||
tstart = t;
|
||||
|
@ -250,7 +247,8 @@ main(int argc, char **argv)
|
|||
|
||||
if (getenv("E_RESTART")) after_restart = 1;
|
||||
|
||||
if (getenv("DESKTOP_STARTUP_ID")) e_util_env_set("DESKTOP_STARTUP_ID", NULL);
|
||||
if (getenv("DESKTOP_STARTUP_ID"))
|
||||
e_util_env_set("DESKTOP_STARTUP_ID", NULL);
|
||||
|
||||
e_util_env_set("E_RESTART_OK", NULL);
|
||||
e_util_env_set("E_RESTART", "1");
|
||||
|
@ -261,6 +259,7 @@ main(int argc, char **argv)
|
|||
|
||||
TS("eina init");
|
||||
eina_init();
|
||||
_e_main_shutdown_push(eina_shutdown);
|
||||
|
||||
TS("intl init");
|
||||
e_intl_init();
|
||||
|
@ -273,7 +272,6 @@ main(int argc, char **argv)
|
|||
if ((!strcmp(argv[i], "-display")) && (i < (argc - 1)))
|
||||
{
|
||||
i++;
|
||||
|
||||
e_util_env_set("DISPLAY", argv[i]);
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-fake-xinerama-screen")) && (i < (argc - 1)))
|
||||
|
@ -378,8 +376,7 @@ main(int argc, char **argv)
|
|||
/* fixes for FOOLS that keep cp'ing default.edj into ~/.e/e/themes */
|
||||
{
|
||||
e_user_dir_concat_static(buf, "themes/default.edj");
|
||||
if (ecore_file_exists(buf))
|
||||
ecore_file_unlink(buf);
|
||||
if (ecore_file_exists(buf)) ecore_file_unlink(buf);
|
||||
}
|
||||
|
||||
TS("ecore init");
|
||||
|
@ -421,6 +418,7 @@ main(int argc, char **argv)
|
|||
TS("more ecore");
|
||||
/* setup my args */
|
||||
ecore_app_args_set(argc, (const char **)argv);
|
||||
|
||||
/* setup a handler for when e is asked to exit via a system signal */
|
||||
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _e_main_cb_signal_exit, NULL))
|
||||
{
|
||||
|
@ -466,7 +464,8 @@ main(int argc, char **argv)
|
|||
"will handle setting up environment variables, paths,\n"
|
||||
"and launching any other required services etc.\n"
|
||||
"before enlightenment itself begins running.\n");
|
||||
exit(-1);
|
||||
_e_main_shutdown(-1);
|
||||
// exit(-1);
|
||||
}
|
||||
|
||||
TS("ecore_con");
|
||||
|
@ -815,6 +814,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_exec_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Remembers"));
|
||||
TS("remember");
|
||||
/* do remember stuff */
|
||||
|
@ -837,6 +837,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_fm2_shutdown);
|
||||
|
||||
/*
|
||||
TS("fwin");
|
||||
if (!e_fwin_init())
|
||||
|
@ -846,6 +847,7 @@ main(int argc, char **argv)
|
|||
}
|
||||
_e_main_shutdown_push(e_fwin_shutdown);
|
||||
*/
|
||||
|
||||
e_init_status_set(_("Setup Message System"));
|
||||
TS("msg");
|
||||
/* setup generic msg handling etc */
|
||||
|
@ -855,6 +857,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_msg_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup DND"));
|
||||
TS("dnd");
|
||||
/* setup dnd */
|
||||
|
@ -864,6 +867,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_dnd_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Grab Input Handling"));
|
||||
TS("grabinput");
|
||||
/* setup input grabbing co-operation system */
|
||||
|
@ -873,6 +877,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_grabinput_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Modules"));
|
||||
TS("modules");
|
||||
/* setup module loading etc */
|
||||
|
@ -882,6 +887,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_module_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Color Classes"));
|
||||
TS("colorclasses");
|
||||
/* setup color_class */
|
||||
|
@ -891,6 +897,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_color_class_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Gadcon"));
|
||||
TS("gadcon");
|
||||
/* setup gadcon */
|
||||
|
@ -937,8 +944,8 @@ main(int argc, char **argv)
|
|||
e_error_message_show(_("Enlightenment cannot configure the mouse settings."));
|
||||
_e_main_shutdown(-1);
|
||||
}
|
||||
|
||||
_e_main_shutdown_push(e_actions_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Bindings"));
|
||||
TS("bindings");
|
||||
/* init bindings system */
|
||||
|
@ -948,6 +955,7 @@ main(int argc, char **argv)
|
|||
_e_main_shutdown(-1);
|
||||
}
|
||||
_e_main_shutdown_push(e_bindings_shutdown);
|
||||
|
||||
e_init_status_set(_("Setup Popups"));
|
||||
TS("popup");
|
||||
/* init popup system */
|
||||
|
@ -989,7 +997,8 @@ main(int argc, char **argv)
|
|||
|
||||
TS("add idle enterers");
|
||||
/* add in a handler that just before we go idle we flush x - will happen after ecore_evas's idle rendering as it's after ecore_evas_init() */
|
||||
_e_main_idle_enterer_flusher = ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
|
||||
_e_main_idle_enterer_flusher =
|
||||
ecore_idle_enterer_add(_e_main_cb_x_flusher, NULL);
|
||||
|
||||
e_managers_keys_grab();
|
||||
|
||||
|
@ -1006,8 +1015,7 @@ main(int argc, char **argv)
|
|||
{
|
||||
ecore_timer_add(16.0, _e_main_cb_startup_fake_end, NULL);
|
||||
|
||||
if (locked)
|
||||
e_desklock_show();
|
||||
if (locked) e_desklock_show();
|
||||
}
|
||||
|
||||
e_container_all_thaw();
|
||||
|
@ -1049,7 +1057,8 @@ main(int argc, char **argv)
|
|||
_e_main_manage_all();
|
||||
|
||||
/* an idle enterer to be called after all others */
|
||||
_e_main_idle_enterer_after = ecore_idle_enterer_add(_e_main_cb_idler_after, NULL);
|
||||
_e_main_idle_enterer_after =
|
||||
ecore_idle_enterer_add(_e_main_cb_idler_after, NULL);
|
||||
|
||||
e_init_status_set(_("Almost Done"));
|
||||
TS("MAIN LOOP AT LAST");
|
||||
|
@ -1156,9 +1165,7 @@ _e_main_x_shutdown(void)
|
|||
/* ecore_x_ungrab(); */
|
||||
ecore_x_focus_reset();
|
||||
ecore_x_events_allow_all();
|
||||
|
||||
ecore_x_shutdown();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1571,8 +1578,7 @@ static void
|
|||
_e_main_desk_save(void)
|
||||
{
|
||||
Eina_List *ml;
|
||||
char env[1024];
|
||||
char name[1024];
|
||||
char env[1024], name[1024];
|
||||
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
|
@ -1580,20 +1586,17 @@ _e_main_desk_save(void)
|
|||
Eina_List *cl;
|
||||
|
||||
man = ml->data;
|
||||
|
||||
for (cl = man->containers; cl; cl = cl->next)
|
||||
{
|
||||
E_Container *con;
|
||||
Eina_List *zl;
|
||||
|
||||
con = cl->data;
|
||||
|
||||
for (zl = con->zones; zl; zl = zl->next)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = zl->data;
|
||||
|
||||
snprintf(name, sizeof(name), "DESK_%d_%d_%d", man->num, con->num, zone->num);
|
||||
snprintf(env, sizeof(env), "%d,%d", zone->desk_x_current, zone->desk_y_current);
|
||||
e_util_env_set(name, env);
|
||||
|
@ -1616,7 +1619,6 @@ _e_main_desk_restore(E_Manager *man, E_Container *con)
|
|||
int desk_x, desk_y;
|
||||
|
||||
zone = zl->data;
|
||||
|
||||
snprintf(name, sizeof(name), "DESK_%d_%d_%d", man->num, con->num, zone->num);
|
||||
env = getenv(name);
|
||||
if (!env) continue;
|
||||
|
|
Loading…
Reference in New Issue