Attachwarner: fix leaked string
[claws.git] / src / plugins / attachwarner / attachwarner.c
index af882f328a24b5007668f6fc1150f98de918c809..4dd8f96eccf39e1a8809c1a1fc0b85f2e819bf81 100644 (file)
@@ -203,6 +203,7 @@ static gboolean attwarn_before_send_hook(gpointer source, gpointer data)
                AlertValue aval;
                gchar *button_label;
                gchar *message;
                AlertValue aval;
                gchar *button_label;
                gchar *message;
+               gchar *bold_text;
                
                debug_print("user has to decide\n");
                if (compose->sending)
                
                debug_print("user has to decide\n");
                if (compose->sending)
@@ -210,14 +211,20 @@ static gboolean attwarn_before_send_hook(gpointer source, gpointer data)
                else
                        button_label = g_strconcat("+", _("_Queue"), NULL);
 
                else
                        button_label = g_strconcat("+", _("_Queue"), NULL);
 
+               bold_text = g_strdup_printf("<span weight=\"bold\">%.20s</span>...",
+                               mention->context);
                message = g_strdup_printf(
                message = g_strdup_printf(
-                               _("An attachment is mentioned in the mail you're sending, but no file was attached. Mention appears on line %d, which begins with text: <span weight=\"bold\">%.20s</span>...\n\n%s it anyway?"),
+                               _("An attachment is mentioned in the mail you're sending, "
+                               "but no file was attached. Mention appears on line %d, "
+                               "which begins with text: %s\n\n%s"),
                                mention->line,
                                mention->line,
-                               mention->context,
-                               compose->sending?_("Send"):_("Queue"));
+                               bold_text,
+                               compose->sending?_("Send it anyway?"):_("Queue it anyway?"));
                aval = alertpanel(_("Attachment warning"), message,
                                  GTK_STOCK_CANCEL, button_label, NULL);
                g_free(message);
                aval = alertpanel(_("Attachment warning"), message,
                                  GTK_STOCK_CANCEL, button_label, NULL);
                g_free(message);
+               g_free(bold_text);
+               g_free(button_label);
                if (aval != G_ALERTALTERNATE)
                        return TRUE;
        }
                if (aval != G_ALERTALTERNATE)
                        return TRUE;
        }