[balsa] sendmsg-window: Fix "Edit with GNOME-Editor"



commit f3268901167491741648638696c5b337f4c0c831
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri May 13 16:12:30 2022 -0400

    sendmsg-window: Fix "Edit with GNOME-Editor"
    
    The editor was being called with the template filename, not the actual
    temporary file's name.

 src/sendmsg-window.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index c9adcf805..9b792ce97 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -776,10 +776,12 @@ sw_edit_activated(GSimpleAction * action,
         return;
     }
 
+    strcpy(filename, TMP_PATTERN);
+    tmpfd = mkstemp(filename);
+
     argc = 2;
     argv = g_new0 (char *, argc + 1);
     argv[0] = g_strdup(g_app_info_get_executable(app));
-    strcpy(filename, TMP_PATTERN);
     argv[1] =
         g_strdup_printf("%s%s",
                         g_app_info_supports_uris(app) ? "file://" : "",
@@ -788,7 +790,6 @@ sw_edit_activated(GSimpleAction * action,
      * terminal??? */
     g_object_unref(app);
 
-    tmpfd = mkstemp(filename);
     tmp = fdopen(tmpfd, "w+");
 
     if(balsa_app.edit_headers) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]