[EGIT] [efl] 01/01: use eina_file_access() instead of access() if possible

2024-04-02 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch vtorri_access
in repository efl.


View the commit online.
commit 0ad2c7c8c6a8c24d64db439c7a09c570c3745d2c
Author: Vincent Torri 
AuthorDate: Fri Mar 29 05:41:17 2024 +0100

use eina_file_access() instead of access() if possible
---
 src/lib/ecore_evas/ecore_evas_module.c | 11 +---
 src/lib/ecore_file/ecore_file.c| 98 ++
 src/lib/eet/eet_lib.c  |  2 +
 src/lib/eeze/eeze_disk.c   | 18 +++
 src/lib/eeze/eeze_disk_libmount.c  |  2 +-
 src/lib/eina/eina_prefix.c |  6 +--
 src/lib/elementary/elm_main.c  |  4 +-
 src/lib/ethumb/ethumb.c|  2 +-
 8 files changed, 22 insertions(+), 121 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index 4fdd8f70b0..0a4c6de997 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -22,15 +22,6 @@ static Eina_Module *_ecore_evas_vnc = NULL;
 # define ECORE_EVAS_ENGINE_NAME "module.so"
 #endif
 
-static inline Eina_Bool
-_file_exists(const char *file)
-{
-   if (!file) return EINA_FALSE;
-
-   if (access(file, F_OK) == -1) return EINA_FALSE;
-   return EINA_TRUE;
-}
-
 
 static Eina_Module *
 _ecore_evas_vnc_server_module_try_load(const char *prefix,
@@ -219,7 +210,7 @@ _ecore_evas_available_engines_get(void)
  eina_strbuf_append_printf(buf, "%s/%s/" ECORE_EVAS_ENGINE_NAME,
info->path, MODULE_ARCH);
 
- if (_file_exists(eina_strbuf_string_get(buf)))
+ if (eina_file_access(eina_strbuf_string_get(buf), EINA_FILE_ACCESS_MODE_EXIST))
{
   const char *name;
 
diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c
index 66bdfe542e..a1a0a27874 100644
--- a/src/lib/ecore_file/ecore_file.c
+++ b/src/lib/ecore_file/ecore_file.c
@@ -606,111 +606,19 @@ ecore_file_dir_get(const char *file)
 EAPI Eina_Bool
 ecore_file_can_read(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, R_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_READ);
 }
 
 EAPI Eina_Bool
 ecore_file_can_write(const char *file)
 {
-   if (!file) return EINA_FALSE;
-   if (!access(file, W_OK)) return EINA_TRUE;
-   return EINA_FALSE;
+   return eina_file_access(file, EINA_FILE_ACCESS_MODE_WRITE);
 }
 
 EAPI Eina_Bool
 ecore_file_can_exec(const char *file)
 {
-#ifdef _WIN32
-   HANDLE h;
-   HANDLE fm;
-   char *base;
-   char *base_nt;
-   LARGE_INTEGER sz;
-   WORD characteristics;
-#endif
-
-   if (!file || !*file) return EINA_FALSE;
-
-#ifdef _WIN32
-   /*
-* we parse the file to check if it is a PE file (EXE or DLL)
-* and we finally check whether it's a DLL or not.
-* Reference :
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
-*/
-   h = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL,
-  OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-   if (h == INVALID_HANDLE_VALUE)
- goto test_bat;
-
-   if (!GetFileSizeEx(h, &sz))
- goto close_h;
-
-   /* a PE file must have at least the DOS and NT headers */
-   if (sz.QuadPart < (LONGLONG)(sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS)))
- goto close_h;
-
-   fm = CreateFileMapping(h, NULL, PAGE_READONLY, 0, 0, NULL);
-   if (fm == NULL)
- goto close_h;
-
-   base = (char *)MapViewOfFile(fm, FILE_MAP_READ, 0, 0, 0);
-   CloseHandle(fm);
-   if (base == NULL)
- goto close_h;
-
-   /*
-* the PE file begins with the DOS header.
-* First magic number : the DOS header must begin with a DOS magic number,
-* that is "MZ", that is 0x5a4d, stored in a WORD.
-*/
-   if (*((WORD *)base) != 0x5a4d)
- goto unmap_view;
-
-   /*
-* The position of the NT header is located at the offset 0x3c.
-*/
-   base_nt = base + *((DWORD *)(base + 0x3c));
-   /*
-* The NT header begins with the magic number "PE\0\0", that is
-* 0x4550, stored in a DWORD.
-*/
-   if (*((DWORD *)base_nt) != 0x4550)
- goto unmap_view;
-
-   /*
-* to get informations about executable (EXE or DLL), we look at
-* the 'Characteristics' member of the NT header, located at the offset
-* 22 (4 for the magic number, 18 for the offset) from base_nt.
-* https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#characteristics
-*/
-   characteristics = *((WORD *)(base_nt + 4 + 18));
-
-   UnmapViewOfFile(base);
-   CloseHandle(h);
-
-   /*
-* 0x0002 : if set, EXE or DLL
-* 0x2000 : if set, DLL
-*/
-   if ((characteristics & 0x0002) && !(characteristics & 0x2000))
- return EINA_TRUE;
- unmap_view:
-   UnmapViewOfFile(base);
- close_h:
-   CloseHandle(h);
- test_bat:
-   /*
-* a .bat file, considered as an executable, is only a text file,
-* so we r

[EGIT] [e16] 07/11: session: Rename some macros

2024-04-02 Thread Enlightenment Git

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 e0cd65cc10960813f04b35cc633ff6335a05d397
Author: Kim Woelders 
AuthorDate: Fri Mar 15 15:59:03 2024 +0100

session: Rename some macros
---
 src/main.c| 4 ++--
 src/session.c | 8 
 src/session.h | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main.c b/src/main.c
index 63230f36..b5428211 100644
--- a/src/main.c
+++ b/src/main.c
@@ -472,9 +472,9 @@ static void
 RunInitPrograms(void)
 {
 if (Mode.wm.session_start)
-SessionHelper(ESESSION_INIT);
+SessionHelper(ESESSHLP_INIT);
 
-SessionHelper(ESESSION_START);
+SessionHelper(ESESSHLP_START);
 
 if (Mode.firsttime && Mode.wm.master)
 {
diff --git a/src/session.c b/src/session.c
index 72004ec2..803a4333 100644
--- a/src/session.c
+++ b/src/session.c
@@ -450,7 +450,7 @@ doSMExit(int mode, const char *params)
 #endif
 
 if (mode != EEXIT_THEME && mode != EEXIT_RESTART)
-SessionHelper(ESESSION_STOP);
+SessionHelper(ESESSHLP_STOP);
 
 LangExit();
 
@@ -743,15 +743,15 @@ SessionHelper(int when)
 {
 switch (when)
 {
-case ESESSION_INIT:
+case ESESSHLP_INIT:
 if (Conf.session.enable_script && Conf.session.script)
 _SessionRunProg(Conf.session.script, "init");
 break;
-case ESESSION_START:
+case ESESSHLP_START:
 if (Conf.session.enable_script && Conf.session.script)
 _SessionRunProg(Conf.session.script, "start");
 break;
-case ESESSION_STOP:
+case ESESSHLP_STOP:
 if (Conf.session.enable_script && Conf.session.script)
 _SessionRunProg(Conf.session.script, "stop");
 break;
diff --git a/src/session.h b/src/session.h
index 7f145428..c666cffd 100644
--- a/src/session.h
+++ b/src/session.h
@@ -33,9 +33,9 @@
 #define EEXIT_THEME 5
 #define EEXIT_EXEC  6
 
-#define ESESSION_INIT   0
-#define ESESSION_START  1
-#define ESESSION_STOP   2
+#define ESESSHLP_INIT   0
+#define ESESSHLP_START  1
+#define ESESSHLP_STOP   2
 
 voidSessionInit(void);
 voidSessionExit(int mode, const char *params);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 05/11: session: Add missing newline in error message

2024-04-02 Thread Enlightenment Git

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 d836ee5ea14c168f50791dbd2dabc174f82f4bff
Author: Kim Woelders 
AuthorDate: Fri Mar 29 19:09:43 2024 +0100

session: Add missing newline in error message
---
 src/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/session.c b/src/session.c
index 438a1929..1e308d7b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -367,7 +367,7 @@ ice_init(void)
 EFREE_SET(Mode.session.sm_client_id, client_id);
 
 if (error_string_ret[0])
-Eprintf("While connecting to session manager: %s.", error_string_ret);
+Eprintf("While connecting to session manager: %s\n", error_string_ret);
 
 if (!sm_conn)
 return;


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 11/11: session: Rearrange logout functions

2024-04-02 Thread Enlightenment Git

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 e318bb07fe7f14cd4fb27baeb98f747ae40a35ee
Author: Kim Woelders 
AuthorDate: Fri Mar 29 19:27:32 2024 +0100

session: Rearrange logout functions

We can now also do shutdown when we don't have dialogs enabled.
---
 src/session.c | 69 ---
 1 file changed, 33 insertions(+), 36 deletions(-)

diff --git a/src/session.c b/src/session.c
index ce10ff2e..f97b3f7e 100644
--- a/src/session.c
+++ b/src/session.c
@@ -534,18 +534,46 @@ doSMExit(int mode, const char *params)
 #define LOGOUT_HIBERNATE6
 
 static void
-_SessionLogout(void)
+_SessionLogout(int how)
 {
 #if USE_SM
+if (EDebug(EDBUG_TYPE_SESSION))
+Eprintf("%s: how=%d smc=%p\n", __func__, how, sm_conn);
+
 if (sm_conn)
 {
 SmcRequestSaveYourself(sm_conn, SmSaveBoth, True, SmInteractStyleAny,
False, True);
+return;
 }
-else
+#else
+if (EDebug(EDBUG_TYPE_SESSION))
+Eprintf("%s: how=%d\n", __func__, how);
+
 #endif  /* USE_SM */
+
+switch (how)
 {
+default:
+break;
+case LOGOUT_EXIT:
 SessionExit(EEXIT_EXIT, NULL);
+break;
+case LOGOUT_REBOOT:
+SessionExit(EEXIT_EXEC, Conf.session.cmd_reboot);
+break;
+case LOGOUT_HALT:
+SessionExit(EEXIT_EXEC, Conf.session.cmd_halt);
+break;
+case LOGOUT_LOCK:
+Espawn("%s", Conf.session.cmd_lock);
+break;
+case LOGOUT_SUSPEND:
+Espawn("%s", Conf.session.cmd_suspend);
+break;
+case LOGOUT_HIBERNATE:
+Espawn("%s", Conf.session.cmd_hibernate);
+break;
 }
 }
 
@@ -556,38 +584,7 @@ _SessionLogoutCB(Dialog *d, int val, void *data __UNUSED__)
 {
 DialogClose(d);
 
-#if USE_SM
-if (sm_conn)
-{
-_SessionLogout();
-}
-else
-#endif  /* USE_SM */
-{
-switch (val)
-{
-default:
-break;
-case LOGOUT_EXIT:
-SessionExit(EEXIT_EXIT, NULL);
-break;
-case LOGOUT_REBOOT:
-SessionExit(EEXIT_EXEC, Conf.session.cmd_reboot);
-break;
-case LOGOUT_HALT:
-SessionExit(EEXIT_EXEC, Conf.session.cmd_halt);
-break;
-case LOGOUT_LOCK:
-Espawn("%s", Conf.session.cmd_lock);
-break;
-case LOGOUT_SUSPEND:
-Espawn("%s", Conf.session.cmd_suspend);
-break;
-case LOGOUT_HIBERNATE:
-Espawn("%s", Conf.session.cmd_hibernate);
-break;
-}
-}
+_SessionLogout(val);
 }
 
 #define ISSET(s) ((s && *s != '\0') ? 1 : 0)
@@ -735,7 +732,7 @@ SessionLogout(int mode)
 _SessionLogoutConfirm();
 else
 #endif
-_SessionLogout();
+_SessionLogout(LOGOUT_EXIT);
 break;
 
 case ESESSION_SHUTDOWN:
@@ -744,7 +741,7 @@ SessionLogout(int mode)
 _SessionLogoutConfirm();
 else
 #endif
-_SessionLogout();
+_SessionLogout(LOGOUT_HALT);
 break;
 }
 }


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 06/11: session: Add some SM connection debug messages

2024-04-02 Thread Enlightenment Git

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 5aaa2857e64401ec18990930b730d022162ff160
Author: Kim Woelders 
AuthorDate: Sat Mar 30 09:23:24 2024 +0100

session: Add some SM connection debug messages
---
 src/session.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/session.c b/src/session.c
index 1e308d7b..72004ec2 100644
--- a/src/session.c
+++ b/src/session.c
@@ -303,6 +303,9 @@ ice_io_error_handler(IceConn connection __UNUSED__)
 static void
 ice_exit(void)
 {
+if (EDebug(EDBUG_TYPE_SESSION))
+Eprintf("%s: smc=%p\n", __func__, sm_conn);
+
 SmcCloseConnection(sm_conn, 0, NULL);
 sm_conn = NULL;
 EventFdUnregister(sm_efd);
@@ -341,7 +344,7 @@ ice_init(void)
 int sm_fd;
 
 if (!getenv("SESSION_MANAGER"))
-return;
+goto done;
 
 IceSetIOErrorHandler(ice_io_error_handler);
 
@@ -370,7 +373,7 @@ ice_init(void)
 Eprintf("While connecting to session manager: %s\n", error_string_ret);
 
 if (!sm_conn)
-return;
+goto done;
 
 style[0] = SmRestartIfRunning;
 style[1] = 0;
@@ -392,6 +395,10 @@ ice_init(void)
 fcntl(sm_fd, F_SETFD, fcntl(sm_fd, F_GETFD, 0) | FD_CLOEXEC);
 
 sm_efd = EventFdRegister(sm_fd, ice_msgs_process);
+
+  done:
+if (EDebug(EDBUG_TYPE_SESSION))
+Eprintf("%s: smc=%p\n", __func__, sm_conn);
 }
 
 #endif  /* USE_SM */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 02/11: session: Eliminate SetSMID()

2024-04-02 Thread Enlightenment Git

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 7a6a475b20a241acaf5001253550a0de7ac97deb
Author: Kim Woelders 
AuthorDate: Sun Mar 10 21:55:18 2024 +0100

session: Eliminate SetSMID()
---
 src/E.h   |  7 ++-
 src/main.c|  6 --
 src/session.c | 28 
 src/session.h |  3 +--
 4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/src/E.h b/src/E.h
index 1c7a0061..1f507eaa 100644
--- a/src/E.h
+++ b/src/E.h
@@ -3,7 +3,7 @@
 /*/
 /*
  * 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
@@ -400,6 +400,11 @@ typedef struct {
 EX_Pixmap   ext_pmap;
 charext_pmap_valid;
 } root;
+#if USE_SM
+struct {
+char   *sm_client_id;
+} session;
+#endif
 struct {
 boolcache_rebuild;
 char   *paths;
diff --git a/src/main.c b/src/main.c
index 6b271d18..63230f36 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2022 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
@@ -195,7 +195,9 @@ main(int argc, char **argv)
 Dpy.screen = Strtoi(eoptarg, 10);
 break;
 case 'S':
-SetSMID(eoptarg);
+#if USE_SM
+Mode.session.sm_client_id = Estrdup(eoptarg);
+#endif
 break;
 case 't':
 theme = Estrdup(eoptarg);
diff --git a/src/session.c b/src/session.c
index e765a8a1..57102081 100644
--- a/src/session.c
+++ b/src/session.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
@@ -49,7 +49,6 @@ static char restarting = 0;
  */
 #define USE_DISCARD_PROPERTY 0
 
-static char*sm_client_id = NULL;
 static SmcConn  sm_conn = NULL;
 
 static int  sm_efd = 0;
@@ -204,7 +203,7 @@ set_save_props(SmcConn smc_conn, int master_flag)
 restartVal[n++].value = (char *)"-Q";
 restartVal[n++].value = (char *)s;
 }
-s = sm_client_id;
+s = Mode.session.sm_client_id;
 restartVal[n++].value = (char *)"-S";
 restartVal[n++].value = (char *)s;
 
@@ -362,9 +361,10 @@ ice_init(void)
   SmcSaveYourselfProcMask | SmcDieProcMask |
   SmcSaveCompleteProcMask |
   SmcShutdownCancelledProcMask, &callbacks,
-  sm_client_id, &client_id, 4096, error_string_ret);
+  Mode.session.sm_client_id, &client_id,
+  4096, error_string_ret);
 
-EFREE_SET(sm_client_id, client_id);
+EFREE_SET(Mode.session.sm_client_id, client_id);
 
 if (error_string_ret[0])
 Eprintf("While connecting to session manager: %s.", error_string_ret);
@@ -414,19 +414,6 @@ SessionInit(void)
 #endif
 }
 
-#if USE_SM
-void
-SetSMID(const char *smid)
-{
-sm_client_id = Estrdup(smid);
-}
-#else
-void
-SetSMID(const char *smid __UNUSED__)
-{
-}
-#endif  /* USE_SM */
-
 static void
 SessionSave(int shutdown)
 {
@@ -518,8 +505,9 @@ doSMExit(int mode, const char *params)
 l += Esnprintf(s + l, sizeof(s) - l, " -w %dx%d",
WinGetW(VROOT), WinGetH(VROOT));
 #if USE_SM
-if (sm_client_id)
-l += Esnprintf(s + l, sizeof(s) - l, " -S %s", sm_client_id);
+if (Mode.session.sm_client_id)
+l += Esnprintf(s + l, sizeof(s) - l, " -S %s",
+   Mode.session.sm_client_id);
 #endif
 #ifdef USE_EXT_INIT_WIN
 if (new_init_win_ext != NoXID)
diff --git a/src/session.h b/src/session.h
index 53cf8069..7f145428 100644
--- a/src/session.h
+++ b/src/session.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
- * Copyright (C) 2004-2007 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
@@ -40,6 +40,5 @@
 voidSess

[EGIT] [e16] 03/11: session: Eliminate SessionSave()

2024-04-02 Thread Enlightenment Git

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 93f8594e4d450ddb82766f9804b399186b55
Author: Kim Woelders 
AuthorDate: Sun Mar 10 21:46:25 2024 +0100

session: Eliminate SessionSave()
---
 src/session.c | 21 ++---
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/session.c b/src/session.c
index 57102081..0b4bad1e 100644
--- a/src/session.c
+++ b/src/session.c
@@ -414,20 +414,6 @@ SessionInit(void)
 #endif
 }
 
-static void
-SessionSave(int shutdown)
-{
-if (EDebug(EDBUG_TYPE_SESSION))
-Eprintf("%s: %d\n", __func__, shutdown);
-
-SnapshotsSaveReal();
-
-#if USE_SM
-if (shutdown && sm_conn)
-ice_exit();
-#endif  /* USE_SM */
-}
-
 /*
  * Normally, the SM will throw away all the session data for a client
  * that breaks its connection unexpectedly. In order to avoid this we 
@@ -449,7 +435,12 @@ doSMExit(int mode, const char *params)
 
 restarting = 1;
 
-SessionSave(1);
+SnapshotsSaveReal();
+
+#if USE_SM
+if (sm_conn)
+ice_exit();
+#endif
 
 if (mode != EEXIT_THEME && mode != EEXIT_RESTART)
 SessionHelper(ESESSION_STOP);


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 09/11: session: Introduce SessionLogout()

2024-04-02 Thread Enlightenment Git

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 f0a3f894b452377112c3d3f7c7352d5a65d3174c
Author: Kim Woelders 
AuthorDate: Fri Mar 15 15:57:24 2024 +0100

session: Introduce SessionLogout()
---
 src/ipc.c |  6 +++---
 src/session.c | 46 --
 src/session.h | 13 +++--
 3 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/src/ipc.c b/src/ipc.c
index 00e7321c..5650c46c 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1097,16 +1097,16 @@ IPC_Exit(const char *params)
 
 if (!param1[0])
 SessionExit(EEXIT_EXIT, NULL);
-else if (!strcmp(param1, "logout"))
-SessionExit(EEXIT_LOGOUT, NULL);
 else if (!strcmp(param1, "restart"))
 SessionExit(EEXIT_RESTART, NULL);
 else if (!strcmp(param1, "theme"))
 SessionExit(EEXIT_THEME, p2);
 else if (!strcmp(param1, "exec"))
 SessionExit(EEXIT_EXEC, p2);
+else if (!strcmp(param1, "logout"))
+SessionLogout(ESESSION_LOGOUT);
 else if (!strcmp(param1, "shutdown"))
-SessionExit(EEXIT_SHUTDOWN, NULL);
+SessionLogout(ESESSION_SHUTDOWN);
 }
 
 #if ENABLE_DIALOGS
diff --git a/src/session.c b/src/session.c
index 69baf122..3854a694 100644
--- a/src/session.c
+++ b/src/session.c
@@ -714,24 +714,6 @@ SessionExit(int mode, const char *param)
 Eprintf("%s: already in progress ... now exiting\n", __func__);
 exit(1);
 break;
-
-case EEXIT_LOGOUT:
-#if ENABLE_DIALOGS
-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;
 }
 
   done:
@@ -739,6 +721,34 @@ SessionExit(int mode, const char *param)
 doSMExit(mode, param);
 }
 
+void
+SessionLogout(int mode)
+{
+switch (mode)
+{
+default:   /* We should not go here - ignore */
+break;
+
+case ESESSION_LOGOUT:
+#if ENABLE_DIALOGS
+if (Conf.session.enable_logout_dialog)
+_SessionLogoutConfirm();
+else
+#endif
+_SessionLogout();
+break;
+
+case ESESSION_SHUTDOWN:
+#if ENABLE_DIALOGS
+if (Conf.session.enable_logout_dialog)
+_SessionLogoutConfirm();
+else
+#endif
+_SessionLogout();
+break;
+}
+}
+
 static void
 _SessionRunProg(const char *prog, const char *params)
 {
diff --git a/src/session.h b/src/session.h
index 7e6d9081..c7b748b8 100644
--- a/src/session.h
+++ b/src/session.h
@@ -24,15 +24,15 @@
 #ifndef _SESSION_H_
 #define _SESSION_H_
 
-/* session.c */
 #define EEXIT_QUIT  0
 #define EEXIT_EXIT  1
 #define EEXIT_ERROR 2
-#define EEXIT_LOGOUT3
-#define EEXIT_RESTART   4
-#define EEXIT_THEME 5
-#define EEXIT_EXEC  6
-#define EEXIT_SHUTDOWN  7
+#define EEXIT_RESTART   3
+#define EEXIT_THEME 4
+#define EEXIT_EXEC  5
+
+#define ESESSION_LOGOUT0
+#define ESESSION_SHUTDOWN  1
 
 #define ESESSHLP_INIT   0
 #define ESESSHLP_START  1
@@ -40,6 +40,7 @@
 
 voidSessionInit(void);
 voidSessionExit(int mode, const char *params);
+voidSessionLogout(int mode);
 voidSessionHelper(int when);
 
 #endif  /* _SESSION_H_ */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 01/11: Spec file: Set high rpm release number for non-release rpms

2024-04-02 Thread Enlightenment Git

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 73dade6c922406825db7e33917707d77e90a7b4e
Author: Kim Woelders 
AuthorDate: Sat Mar 9 09:30:15 2024 +0100

Spec file: Set high rpm release number for non-release rpms

Should normally avoid that distro rpms get installed over private build
ones.
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index b7f868cf..7c5f34c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,7 @@ version.h: FORCE
 
 dist-hook: $(top_builddir)/$(PACKAGE).spec
 
-RPR_DEV = `echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
+RPR_DEV = `echo -n "99.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD`
 RPR_REL = 1
 SED_DEV = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_DEV)/"
 SED_REL = "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPR_REL)/"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 04/11: session: Mark some private functions as such

2024-04-02 Thread Enlightenment Git

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 8aacad3ef12d79d23ca3ecc57eb110a235b7ceba
Author: Kim Woelders 
AuthorDate: Sun Mar 10 17:57:51 2024 +0100

session: Mark some private functions as such
---
 src/session.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/session.c b/src/session.c
index 0b4bad1e..438a1929 100644
--- a/src/session.c
+++ b/src/session.c
@@ -520,7 +520,7 @@ doSMExit(int mode, const char *params)
 }
 
 static void
-SessionLogout(void)
+_SessionLogout(void)
 {
 #if USE_SM
 if (sm_conn)
@@ -545,14 +545,14 @@ SessionLogout(void)
 #define LOGOUT_HIBERNATE6
 
 static void
-LogoutCB(Dialog *d, int val, void *data __UNUSED__)
+_SessionLogoutCB(Dialog *d, int val, void *data __UNUSED__)
 {
 DialogClose(d);
 
 #if USE_SM
 if (sm_conn)
 {
-SessionLogout();
+_SessionLogout();
 }
 else
 #endif  /* USE_SM */
@@ -586,7 +586,7 @@ LogoutCB(Dialog *d, int val, void *data __UNUSED__)
 #define ISSET(s) ((s && *s != '\0') ? 1 : 0)
 
 static void
-SessionLogoutConfirm(void)
+_SessionLogoutConfirm(void)
 {
 Dialog *d;
 DItem  *table, *di;
@@ -625,19 +625,19 @@ SessionLogoutConfirm(void)
 if (ISSET(Conf.session.cmd_hibernate))
 {
 tcols += 1;
-DialogItemAddButton(table, _("Hibernate"), LogoutCB,
+DialogItemAddButton(table, _("Hibernate"), _SessionLogoutCB,
 LOGOUT_HIBERNATE, 1, DLG_BUTTON_OK);
 }
 if (ISSET(Conf.session.cmd_suspend))
 {
 tcols += 1;
-DialogItemAddButton(table, _("Suspend"), LogoutCB,
+DialogItemAddButton(table, _("Suspend"), _SessionLogoutCB,
 LOGOUT_SUSPEND, 1, DLG_BUTTON_OK);
 }
 if (ISSET(Conf.session.cmd_lock))
 {
 tcols += 1;
-DialogItemAddButton(table, _("Lock"), LogoutCB,
+DialogItemAddButton(table, _("Lock"), _SessionLogoutCB,
 LOGOUT_LOCK, 1, DLG_BUTTON_OK);
 }
 for (; tcols < ncols; tcols++)
@@ -648,13 +648,13 @@ SessionLogoutConfirm(void)
 if (Conf.session.enable_reboot_halt)
 {
 tcols += 2;
-DialogItemAddButton(table, _("Yes, Shut Down"), LogoutCB,
+DialogItemAddButton(table, _("Yes, Shut Down"), _SessionLogoutCB,
 LOGOUT_HALT, 1, DLG_BUTTON_OK);
-DialogItemAddButton(table, _("Yes, Reboot"), LogoutCB,
+DialogItemAddButton(table, _("Yes, Reboot"), _SessionLogoutCB,
 LOGOUT_REBOOT, 1, DLG_BUTTON_OK);
 }
 tcols += 1;
-DialogItemAddButton(table, _("Yes, Log Out"), LogoutCB,
+DialogItemAddButton(table, _("Yes, Log Out"), _SessionLogoutCB,
 LOGOUT_EXIT, 1, DLG_BUTTON_OK);
 for (; tcols < ncols; tcols++)
 DialogAddItem(table, DITEM_NONE);
@@ -663,7 +663,7 @@ SessionLogoutConfirm(void)
 DialogItemSetColSpan(di, ncols);
 
 DialogBindKey(d, "Escape", DialogCallbackClose, 0, NULL);
-DialogBindKey(d, "Return", LogoutCB, LOGOUT_EXIT, NULL);
+DialogBindKey(d, "Return", _SessionLogoutCB, LOGOUT_EXIT, NULL);
 }
 
 DialogShowCentered(d);
@@ -711,10 +711,10 @@ SessionExit(int mode, const char *param)
 case EEXIT_LOGOUT:
 #if ENABLE_DIALOGS
 if (Conf.session.enable_logout_dialog)
-SessionLogoutConfirm();
+_SessionLogoutConfirm();
 else
 #endif
-SessionLogout();
+_SessionLogout();
 return;
 }
 
@@ -724,7 +724,7 @@ SessionExit(int mode, const char *param)
 }
 
 static void
-SessionRunProg(const char *prog, const char *params)
+_SessionRunProg(const char *prog, const char *params)
 {
 if (EDebug(EDBUG_TYPE_SESSION))
 Eprintf("%s: %s %s\n", __func__, prog, params);
@@ -738,15 +738,15 @@ SessionHelper(int when)
 {
 case ESESSION_INIT:
 if (Conf.session.enable_script && Conf.session.script)
-SessionRunProg(Conf.session.script, "init");
+_SessionRunProg(Conf.session.script, "init");
 break;
 case ESESSION_START:
 if (Conf.session.enable_script && Conf.session.script)
-SessionRunProg(Conf.session.script, "start");
+_SessionRunProg(Conf.session.script, "start");
 break;
 case ESESSION_STOP:
 if (Conf.session.enable_script && Conf.session.script)
-SessionRunProg(Conf.session.script, "stop");
+_SessionRunProg(Conf.session.script, "stop");
 break;
 }
 }


-- 
To stop receiving notification emails l

[EGIT] [e16] 08/11: session: Add shutdown command

2024-04-02 Thread Enlightenment Git

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 
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.





[EGIT] [e16] 10/11: session: Move some #defines

2024-04-02 Thread Enlightenment Git

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 d73aff139121789cd546cb78f314b5768fc8fdc7
Author: Kim Woelders 
AuthorDate: Fri Mar 29 19:29:48 2024 +0100

session: Move some #defines
---
 src/session.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/session.c b/src/session.c
index 3854a694..ce10ff2e 100644
--- a/src/session.c
+++ b/src/session.c
@@ -526,6 +526,13 @@ doSMExit(int mode, const char *params)
 EExit(0);
 }
 
+#define LOGOUT_EXIT 1
+#define LOGOUT_REBOOT   2
+#define LOGOUT_HALT 3
+#define LOGOUT_LOCK 4
+#define LOGOUT_SUSPEND  5
+#define LOGOUT_HIBERNATE6
+
 static void
 _SessionLogout(void)
 {
@@ -544,13 +551,6 @@ _SessionLogout(void)
 
 #if ENABLE_DIALOGS
 
-#define LOGOUT_EXIT 1
-#define LOGOUT_REBOOT   2
-#define LOGOUT_HALT 3
-#define LOGOUT_LOCK 4
-#define LOGOUT_SUSPEND  5
-#define LOGOUT_HIBERNATE6
-
 static void
 _SessionLogoutCB(Dialog *d, int val, void *data __UNUSED__)
 {


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 01/03: dbus: Enable by default

2024-04-02 Thread Enlightenment Git

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 d885dcc5b33d6f7a10308c47fdcc812d8ce42844
Author: Kim Woelders 
AuthorDate: Fri Mar 8 08:04:48 2024 +0100

dbus: Enable by default
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 04f5d6e3..815237b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,8 +377,8 @@ fi
 AM_CONDITIONAL(ENABLE_ZOOM, test "x$enable_zoom" != "xno")
 
 AC_ARG_ENABLE(dbus,
-  AS_HELP_STRING([--enable-dbus], [compile with D-Bus support (experimental) @<:@default=no@:>@]),,
-  enable_dbus=no)
+  AS_HELP_STRING([--enable-dbus], [compile with D-Bus support @<:@default=yes@:>@]),,
+  enable_dbus=yes)
 if test "x$enable_dbus" = "xyes"; then
   PKG_CHECK_MODULES(DBUS, dbus-1, AC_DEFINE(USE_DBUS, 1, [dbus support]), enable_dbus=no)
 fi
@@ -556,6 +556,7 @@ echo "  Render ... $enable_xrender"
 echo "  Sync . $enable_xsync"
 echo "  Composite  $enable_composite"
 echo "  GNOME session support  $with_gnome"
+echo "  D-Bus  $enable_dbus"
 echo "  Window mode helper library ... $enable_libhack"
 echo "  Dialogs .. $enable_dialogs"
 echo
@@ -567,7 +568,6 @@ echo
 echo "Experimental options - DO NOT USE unless you know what you are doing"
 echo "  GLX .. $enable_glx"
 echo "  ScreenSaver .. $enable_xscrnsaver"
-echo "  D-Bus  $enable_dbus"
 echo "  XI2 .. $enable_xi2"
 echo "  Present... $enable_xpresent"
 echo "  Do not use container window .. $enable_containerless"


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 03/03: session: Optionally do logout/shutdown via dbus commands

2024-04-02 Thread Enlightenment Git

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 d54702b07150568ef3916ad5b80aab8f1fcdc406
Author: Kim Woelders 
AuthorDate: Fri Mar 8 14:07:41 2024 +0100

session: Optionally do logout/shutdown via dbus commands
---
 src/session.c | 33 +
 1 file changed, 33 insertions(+)

diff --git a/src/session.c b/src/session.c
index f97b3f7e..7a379b9b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -31,6 +31,9 @@
 #include "snaps.h"
 #include "user.h"
 #include "xwin.h"
+#if USE_DBUS
+#include "edbus.h"
+#endif
 
 #ifdef USE_EXT_INIT_WIN
 static EX_Window new_init_win_ext = NoXID;
@@ -533,6 +536,31 @@ doSMExit(int mode, const char *params)
 #define LOGOUT_SUSPEND  5
 #define LOGOUT_HIBERNATE6
 
+#if USE_DBUS
+static int
+_SessionExitDbus(int how)
+{
+if (Mode.wm.window)
+return -1;
+
+switch (how)
+{
+default:
+case LOGOUT_LOCK:
+case LOGOUT_SUSPEND:
+case LOGOUT_HIBERNATE:
+return -1;
+
+case LOGOUT_EXIT:
+return DbusRequestLogout();
+
+case LOGOUT_REBOOT:
+case LOGOUT_HALT:
+return DbusRequestShutdown();
+}
+}
+#endif  /* USE_DBUS */
+
 static void
 _SessionLogout(int how)
 {
@@ -552,6 +580,11 @@ _SessionLogout(int how)
 
 #endif  /* USE_SM */
 
+#if USE_DBUS
+if (_SessionExitDbus(how) == 0)
+return;
+#endif
+
 switch (how)
 {
 default:


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [e16] 02/03: edbus: Add functions to request logout and shutdown via dbus

2024-04-02 Thread Enlightenment Git

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 cd517589b39952af71d77b859a71324208678854
Author: Kim Woelders 
AuthorDate: Sat Feb 24 06:14:52 2024 +0100

edbus: Add functions to request logout and shutdown via dbus
---
 src/edbus.c | 92 -
 src/edbus.h |  5 +++-
 2 files changed, 95 insertions(+), 2 deletions(-)

diff --git a/src/edbus.c b/src/edbus.c
index cdeca8ff..c6f1633a 100644
--- a/src/edbus.c
+++ b/src/edbus.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2021 Kim Woelders
+ * Copyright (C) 2007-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
@@ -332,3 +332,93 @@ DbusExit(void)
 {
 }
 #endif
+
+static int
+_DbusSendCommand(DBusBusType bus, const char *dest, const char *path,
+ const char *meth, const char *args)
+{
+int err;
+DBusError   dberr;
+DBusConnection *conn;
+DBusMessage*msg, *rpl;
+DBusMessageIter iter;
+const char *iface = dest;
+
+err = -1;
+msg = rpl = NULL;
+dbus_error_init(&dberr);
+
+conn = dbus_bus_get(bus, &dberr);
+if (dbus_error_is_set(&dberr))
+goto quit;
+
+msg = dbus_message_new_method_call(dest, path, iface, meth);
+
+if (args)
+{
+const char *s = args;
+int nr, type, value;
+dbus_message_iter_init_append(msg, &iter);
+for (;;)
+{
+type = *s++;
+if (type == '\0')
+break;
+if (type == ';')
+continue;
+if (*s++ != '=')
+break;
+nr = -1;
+if (type == 'u')
+{
+sscanf(s, "%u%n", &value, &nr);
+if (nr <= 0)
+goto quit;
+s += nr;
+if (!dbus_message_iter_append_basic(&iter,
+DBUS_TYPE_UINT32, &value))
+goto quit;
+}
+else
+{
+goto quit;  /* Unknown type */
+}
+}
+}
+
+rpl = dbus_connection_send_with_reply_and_block(conn, msg, 100, &dberr);
+if (!rpl)
+goto quit;
+
+dbus_connection_flush(conn);
+
+err = 0;
+
+  quit:
+if (dbus_error_is_set(&dberr))
+{
+Eprintf("*** Dbus error: %s\n", dberr.message);
+dbus_error_free(&dberr);
+}
+
+if (msg)
+dbus_message_unref(msg);
+if (rpl)
+dbus_message_unref(rpl);
+
+return err;
+}
+
+int
+DbusRequestLogout(void)
+{
+return _DbusSendCommand(DBUS_BUS_SESSION, "org.gnome.SessionManager",
+"/org/gnome/SessionManager", "Logout", "u=0");
+}
+
+int
+DbusRequestShutdown(void)
+{
+return _DbusSendCommand(DBUS_BUS_SESSION, "org.gnome.SessionManager",
+"/org/gnome/SessionManager", "Shutdown", NULL);
+}
diff --git a/src/edbus.h b/src/edbus.h
index 0f2aba7a..05f97f03 100644
--- a/src/edbus.h
+++ b/src/edbus.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Kim Woelders
+ * Copyright (C) 2007-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
@@ -26,4 +26,7 @@
 voidDbusInit(void);
 voidDbusExit(void);
 
+int DbusRequestLogout(void);
+int DbusRequestShutdown(void);
+
 #endif  /* _EDBUS_H_ */


-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.





[EGIT] [ecrire] 01/01: Updating spanish translation

2024-04-02 Thread Enlightenment Git

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository ecrire.


View the commit online.
commit f75246422a22b36eedf5b0ccaab683a998e48d21
Author: maxerba 
AuthorDate: Tue Apr 2 22:22:42 2024 +0200

Updating spanish translation
---
 po/es.po | 161 +--
 1 file changed, 95 insertions(+), 66 deletions(-)

diff --git a/po/es.po b/po/es.po
index 1e1646f..5782ed5 100644
--- a/po/es.po
+++ b/po/es.po
@@ -5,81 +5,97 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ecrire\n"
-"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2017-11-06 16:42+0900\n"
-"PO-Revision-Date: 2020-07-15 21:06+0100\n"
-"Last-Translator: Roy W. Reese \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-04-01 18:29+0200\n"
+"PO-Revision-Date: 2024-04-01 21:25+0200\n"
+"Last-Translator: RWR\n"
 "Language-Team: Enlightenment Team\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.4.2\n"
 
-#: src/bin/main.c:101
+#: src/bin/main.c:124
 #, c-format
 msgid "%s%s - %s"
 msgstr "%s%s - %s"
 
-#: src/bin/main.c:104
+#: src/bin/main.c:127
 #, c-format
 msgid "%sUntitled %d - %s"
 msgstr "%sSin título %d - %s"
 
-#: src/bin/main.c:128
+#: src/bin/main.c:150
 #, c-format
 msgid "Ln %d, Col %d"
 msgstr "Lín %d, Col %d"
 
-#: src/bin/main.c:737
+#: src/bin/main.c:651 src/bin/main.c:687
 msgid "New"
 msgstr "Nuevo"
 
-#: src/bin/main.c:738
+#: src/bin/main.c:652 src/bin/main.c:688
 msgid "Open"
 msgstr "Abrir"
 
-#: src/bin/main.c:740 src/bin/ui/alerts.c:64
+#: src/bin/main.c:653 src/bin/main.c:690 src/bin/ui/alerts.c:99
 msgid "Save"
 msgstr "Guardar"
 
-#: src/bin/main.c:741
+#: src/bin/main.c:654 src/bin/main.c:691
 msgid "Save As"
 msgstr "Guardar como"
 
-#: src/bin/main.c:746
-msgid "Undo"
-msgstr "Deshacer"
-
-#: src/bin/main.c:748
-msgid "Redo"
-msgstr "Rehacer"
-
-#: src/bin/main.c:751
+#: src/bin/main.c:657 src/bin/main.c:697
 msgid "Cut"
 msgstr "Cortar"
 
-#: src/bin/main.c:753
+#: src/bin/main.c:658 src/bin/main.c:699
 msgid "Copy"
 msgstr "Copiar"
 
-#: src/bin/main.c:755
+#: src/bin/main.c:659 src/bin/main.c:701
 msgid "Paste"
 msgstr "Pegar"
 
-#: src/bin/main.c:758 src/bin/ui/search_dialog.c:148
-#, fuzzy
-msgid "Search"
-msgstr "Buscar por:"
+#: src/bin/main.c:662 src/bin/main.c:704
+msgid "Undo"
+msgstr "Deshacer"
 
-#: src/bin/main.c:760 src/bin/ui/goto_dialog.c:60
-msgid "Jump to"
-msgstr "Ir a"
+#: src/bin/main.c:663 src/bin/main.c:706
+msgid "Redo"
+msgstr "Rehacer"
 
-#: src/bin/main.c:763
+#: src/bin/main.c:666 src/bin/main.c:708 src/bin/ui/search_dialog.c:244
+msgid "Find"
+msgstr "Buscar"
+
+#: src/bin/main.c:667
+msgid "Go to..."
+msgstr "Ir a..."
+
+#: src/bin/main.c:670 src/bin/main.c:711 src/bin/ui/settings.c:133
 msgid "Settings"
 msgstr "Preferencias"
 
-#: src/bin/ui/alerts.c:60
+#: src/bin/main.c:686
+msgid "File"
+msgstr "Archivo"
+
+#: src/bin/main.c:693 src/bin/ui/alerts.c:133 src/bin/ui/settings.c:212
+msgid "Close"
+msgstr "Cerrar"
+
+#: src/bin/main.c:695
+msgid "Edit"
+msgstr "Editar"
+
+#: src/bin/main.c:709 src/bin/ui/goto_dialog.c:84
+msgid "Go to line..."
+msgstr "Ir a la línea..."
+
+#: src/bin/ui/alerts.c:95
 msgid ""
 "Would you like to save changes to document?Any unsaved "
 "changes will be lost."
@@ -87,58 +103,71 @@ msgstr ""
 "Quiere guardar los cambios del documento?Los cambios sin "
 "guardar se perderán."
 
-#: src/bin/ui/alerts.c:69
+#: src/bin/ui/alerts.c:104
 msgid "Discard"
 msgstr "Descartar"
 
-#: src/bin/ui/alerts.c:74
+#: src/bin/ui/alerts.c:109
 msgid "Cancel"
 msgstr "Cancelar"
 
-#: src/bin/ui/font_dialog.c:89
-msgid "Select Font"
-msgstr "Seleccione fuente"
+#: src/bin/ui/alerts.c:129
+msgid "Warning"
+msgstr "Aviso"
 
-#: src/bin/ui/font_dialog.c:114
-msgid "Font size:"
-msgstr "Tamaño de la fuente:"
-
-#: src/bin/ui/font_dialog.c:119
+#: src/bin/ui/file_related.c:27
 #, c-format
-msgid "%.0f pts"
-msgstr "%.0f pts"
+msgid "Unable to save to directory '%s'"
+msgstr "No se puede guardar en directorio '%s'"
 
-#: src/bin/ui/font_dialog.c:158
-msgid "Use Default Font:"
-msgstr "Usar el tipo de letra predefinido:"
+#: src/bin/ui/file_related.c:32
+#, c-format
+msgid "Unable to open directory '%s'"
+msgstr "No se puede abrir el directorio '%s'"
 
-#: src/bin/ui/font_dialog.c:169
-msgid "Set"
-msgstr "Definir"
-
-#: src/bin/ui/goto_dialog.c:82
-msgid "Jump to line:"
-msgstr "Ir a línea:"
-
-#: src/bin/ui/goto_dialog.c:106
+#: src/bin/ui/goto_dialog.c:104
 msgid "Go"
 msgstr "Ir"
 
-#: src/bin/ui/search_dialog.c:170
-msgid "Search for:"
-msgstr "Buscar por:"
-
-#: src/bin/ui/search_dialog.c:194
-msgid "Replace with:"
-msgstr "Sustituir por:"
-
-#: src/bin/ui/search_dialog.c:218
-msgid "Find"
+#: src/bin/ui/search_dialog.c:196
+msgid "Search"
 msgstr "Buscar"
 
-#: src/bin/ui/search_dialog.c:226
+#: src/bin/ui/search_dialog.c:259
 m