[Commits] [SCM] claws branch, gtk3, updated. 4.1.0-3-gdeb7bc34a

wwp at claws-mail.org wwp at claws-mail.org
Tue Apr 12 12:10:38 UTC 2022


The branch, gtk3 has been updated
       via  deb7bc34ad28c07744e5c691f4b24727278b3925 (commit)
      from  4f125f1829e19a0172b1a31b6e0b702d71406058 (commit)

Summary of changes:
 src/compose.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit deb7bc34ad28c07744e5c691f4b24727278b3925
Author: wwp <subscript at free.fr>
Date:   Tue Apr 12 14:09:12 2022 +0200

    Fixing compilation issue due to the use of GLIB 2.50's G_PID_FORMAT in translated strings (also depends on the GLIBC/gettext version).

diff --git a/src/compose.c b/src/compose.c
index cdd32937b..8092815cd 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9813,19 +9813,27 @@ static gboolean compose_get_ext_editor_cmd_valid()
 static gboolean compose_ext_editor_kill(Compose *compose)
 {
 	GPid pid = compose->exteditor_pid;
+	gchar *pidmsg = NULL;
 
 	if (pid > 0) {
 		AlertValue val;
 		gchar *msg;
 
+		pidmsg = g_strdup_printf
+#if GLIB_CHECK_VERSION(2, 50, 0)
+			 (_("process id: %" G_PID_FORMAT),
+#else
+			 (_("process id: %d"),
+#endif
+			 pid);
+
 		msg = g_strdup_printf
 			(_("The external editor is still working.\n"
 			   "Force terminating the process?\n"
-			   "process id: %" G_PID_FORMAT), pid);
+			   "%s"), pidmsg);
 		val = alertpanel_full(_("Notice"), msg, NULL, _("_No"), NULL, _("_Yes"),
 		      		      NULL, NULL, ALERTFOCUS_FIRST, FALSE, NULL,
 				      ALERT_WARNING);
-			
 		g_free(msg);
 
 		if (val == G_ALERTALTERNATE) {
@@ -9839,8 +9847,8 @@ static gboolean compose_ext_editor_kill(Compose *compose)
 			waitpid(compose->exteditor_pid, NULL, 0);
 #endif /* G_OS_WIN32 */
 
-			g_warning("terminated process id: %" G_PID_FORMAT ", "
-				  "temporary file: %s", pid, compose->exteditor_file);
+			g_warning("terminated %s, temporary file: %s",
+				pidmsg, compose->exteditor_file);
 			g_spawn_close_pid(compose->exteditor_pid);
 
 			compose_set_ext_editor_sensitive(compose, TRUE);
@@ -9849,10 +9857,14 @@ static gboolean compose_ext_editor_kill(Compose *compose)
 			compose->exteditor_file    = NULL;
 			compose->exteditor_pid     = INVALID_PID;
 			compose->exteditor_tag     = -1;
-		} else
+		} else {
+			g_free(pidmsg);
 			return FALSE;
+        }
 	}
 
+	if (pidmsg)
+		g_free(pidmsg);
 	return TRUE;
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list