[Commits] [SCM] claws branch, master, updated. 3.19.0-6-gfebbbbff5

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


The branch, master has been updated
       via  febbbbff58face980511f36b0e538da7f5c1393a (commit)
      from  961f13a4790bdfb2df17050557f2096b5621b9eb (commit)

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


- Log -----------------------------------------------------------------
commit febbbbff58face980511f36b0e538da7f5c1393a
Author: wwp <subscript at free.fr>
Date:   Tue Apr 12 14:06:39 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 d81dd3091..d6e30c9f1 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9845,15 +9845,24 @@ 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, GTK_STOCK_NO,
 				      GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST,
 				      FALSE, NULL, ALERT_WARNING);
@@ -9870,8 +9879,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);
@@ -9880,10 +9889,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