session: Add shutdown command
This commit is contained in:
parent
e0cd65cc10
commit
af8665e634
|
@ -8,3 +8,4 @@
|
|||
"Theme menu" NULL menu theme.menu
|
||||
"Restart" NULL "exit restart"
|
||||
"Log out" NULL "exit logout"
|
||||
"Shut down" NULL "exit shutdown"
|
||||
|
|
|
@ -105,6 +105,7 @@ const char *txt[] = {
|
|||
_("Theme menu"),
|
||||
_("Restart"),
|
||||
_("Log out"),
|
||||
_("Shut down"),
|
||||
/* winops.menu */
|
||||
_("Window Options"),
|
||||
_("Close"),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2023 Kim Woelders
|
||||
* Copyright (C) 2004-2024 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -1105,6 +1105,8 @@ IPC_Exit(const char *params)
|
|||
SessionExit(EEXIT_THEME, p2);
|
||||
else if (!strcmp(param1, "exec"))
|
||||
SessionExit(EEXIT_EXEC, p2);
|
||||
else if (!strcmp(param1, "shutdown"))
|
||||
SessionExit(EEXIT_SHUTDOWN, NULL);
|
||||
}
|
||||
|
||||
#if ENABLE_DIALOGS
|
||||
|
|
|
@ -720,6 +720,15 @@ SessionExit(int mode, const char *param)
|
|||
if (Conf.session.enable_logout_dialog)
|
||||
_SessionLogoutConfirm();
|
||||
else
|
||||
#endif
|
||||
_SessionLogout();
|
||||
return;
|
||||
|
||||
case EEXIT_SHUTDOWN:
|
||||
#if ENABLE_DIALOGS
|
||||
if (Conf.session.enable_logout_dialog)
|
||||
_SessionLogoutConfirm();
|
||||
else
|
||||
#endif
|
||||
_SessionLogout();
|
||||
return;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#define EEXIT_RESTART 4
|
||||
#define EEXIT_THEME 5
|
||||
#define EEXIT_EXEC 6
|
||||
#define EEXIT_SHUTDOWN 7
|
||||
|
||||
#define ESESSHLP_INIT 0
|
||||
#define ESESSHLP_START 1
|
||||
|
|
Loading…
Reference in New Issue