have all exits and restarts to use e_sys_action_do()

SVN revision: 39569
devs/princeamd/enlightenment-0.17-elive
Gustavo Sverzut Barbieri 14 years ago
parent 3a79d6a21e
commit 51fe41f439
  1. 8
      src/bin/e_ipc_handlers.h
  2. 6
      src/bin/e_main.c
  3. 10
      src/bin/e_msgbus.c
  4. 10
      src/bin/e_sys.c

@ -1378,8 +1378,7 @@ break;
REQ_NULL(HDL);
#elif (TYPE == E_WM_IN)
GENERIC(HDL);
restart = 1;
ecore_main_loop_quit();
e_sys_action_do(E_SYS_RESTART, NULL);
END_GENERIC();
#elif (TYPE == E_REMOTE_IN)
#endif
@ -1393,7 +1392,7 @@ break;
REQ_NULL(HDL);
#elif (TYPE == E_WM_IN)
GENERIC(HDL);
if (!e_util_immortal_check()) ecore_main_loop_quit();
e_sys_action_do(E_SYS_EXIT, NULL);
END_GENERIC();
#elif (TYPE == E_REMOTE_IN)
#endif
@ -5048,8 +5047,7 @@ break;
e_config_profile_set(s);
e_config_profile_save();
e_config_save_block_set(1);
restart = 1;
ecore_main_loop_quit();
e_sys_action_do(E_SYS_RESTART, NULL);
END_STRING(s);
#elif (TYPE == E_REMOTE_IN)
#endif

@ -1474,16 +1474,14 @@ static int
_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) */
if (!e_util_immortal_check()) ecore_main_loop_quit();
e_sys_action_do(E_SYS_EXIT, NULL);
return 1;
}
static int
_e_main_cb_signal_hup(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__)
{
/* called on SIGHUP to restart Enlightenment */
restart = 1;
ecore_main_loop_quit();
e_sys_action_do(E_SYS_RESTART, NULL);
return 1;
}

@ -127,17 +127,14 @@ _e_msgbus_request_name_cb(void *data, DBusMessage *msg, DBusError *err)
static DBusMessage*
_e_msgbus_core_restart_cb(E_DBus_Object *obj, DBusMessage *msg)
{
restart = 1;
ecore_main_loop_quit();
e_sys_action_do(E_SYS_RESTART, NULL);
return dbus_message_new_method_return(msg);
}
static DBusMessage*
_e_msgbus_core_shutdown_cb(E_DBus_Object *obj, DBusMessage *msg)
{
if (!e_util_immortal_check()) ecore_main_loop_quit();
e_sys_action_do(E_SYS_EXIT, NULL);
return dbus_message_new_method_return(msg);
}
@ -265,8 +262,7 @@ _e_msgbus_profile_set_cb(E_DBus_Object *obj, DBusMessage *msg)
e_config_profile_set(profile);
e_config_profile_save();
e_config_save_block_set(1);
restart = 1;
ecore_main_loop_quit();
e_sys_action_do(E_SYS_RESTART, NULL);
return dbus_message_new_method_return(msg);
}

@ -499,16 +499,22 @@ _e_sys_action_do(E_Sys_Action a, char *param)
switch (a)
{
case E_SYS_EXIT:
// XXX TODO: check for e_fm_op_registry entries and confirm
if (!e_util_immortal_check()) ecore_main_loop_quit();
break;
case E_SYS_RESTART:
restart = 1;
ecore_main_loop_quit();
// XXX TODO: check for e_fm_op_registry entries and confirm
if (!e_util_immortal_check())
{
restart = 1;
ecore_main_loop_quit();
}
break;
case E_SYS_EXIT_NOW:
exit(0);
break;
case E_SYS_LOGOUT:
// XXX TODO: check for e_fm_op_registry entries and confirm
_e_sys_logout_begin(E_SYS_EXIT);
break;
case E_SYS_HALT:

Loading…
Cancel
Save