This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository e16.
View the commit online.
commit af8665e634a8f56217a9fe8d56e2b531c382827c
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Mar 8 14:07:41 2024 +0100
session: Add shutdown command
---
config/settings.menu | 1 +
config/strings.c | 1 +
src/ipc.c | 4 +++-
src/session.c | 9 +++++++++
src/session.h | 1 +
5 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/config/settings.menu b/config/settings.menu
index e4a257ae..3ac8b5cc 100644
--- a/config/settings.menu
+++ b/config/settings.menu
@@ -8,3 +8,4 @@
"Theme menu" NULL menu theme.menu
"Restart" NULL "exit restart"
"Log out" NULL "exit logout"
+"Shut down" NULL "exit shutdown"
diff --git a/config/strings.c b/config/strings.c
index d5401cdc..68135561 100644
--- a/config/strings.c
+++ b/config/strings.c
@@ -105,6 +105,7 @@ const char *txt[] = {
_("Theme menu"),
_("Restart"),
_("Log out"),
+ _("Shut down"),
/* winops.menu */
_("Window Options"),
_("Close"),
diff --git a/src/ipc.c b/src/ipc.c
index 04745c42..00e7321c 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -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
diff --git a/src/session.c b/src/session.c
index 803a4333..69baf122 100644
--- a/src/session.c
+++ b/src/session.c
@@ -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;
diff --git a/src/session.h b/src/session.h
index c666cffd..7e6d9081 100644
--- a/src/session.h
+++ b/src/session.h
@@ -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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.