[PATCH] Re: Attaching and quoting messages



Here's the preferences stuff: a new check button on the 
Settings->Preferences->Mail options->Outgoing for `automatically quote 
original when replying'.  It defaults to TRUE, so as not to surprise 
anyone.
diff -Nur --exclude=CVS balsa-cvs/src/balsa-app.h balsa-autoquote/src/balsa-app.h
--- balsa-cvs/src/balsa-app.h	Mon Sep 24 07:50:01 2001
+++ balsa-autoquote/src/balsa-app.h	Thu Oct 11 14:12:20 2001
@@ -270,6 +270,9 @@
     /* arp --- string to prefix "replied to" messages. */
     gchar *quote_str;
 
+    /* reply/forward: automatically quote original when replying */
+    gboolean autoquote;
+
     /* reply/forward: don't include text/html parts */
     gboolean reply_strip_html;
 
diff -Nur --exclude=CVS balsa-cvs/src/pref-manager.c balsa-autoquote/src/pref-manager.c
--- balsa-cvs/src/pref-manager.c	Sun Oct  7 06:35:28 2001
+++ balsa-autoquote/src/pref-manager.c	Thu Oct 11 16:11:34 2001
@@ -92,6 +92,7 @@
     GtkWidget *remember_open_mboxes;
     GtkWidget *mblist_show_mb_content_info;
     GtkWidget *always_queue_sent_mail;
+    GtkWidget *autoquote;
     GtkWidget *reply_strip_html_parts;
     GtkWidget *forward_attached;
 
@@ -397,6 +398,8 @@
 		       GTK_SIGNAL_FUNC(properties_modified_cb), property_box);
     gtk_signal_connect(GTK_OBJECT(pui->always_queue_sent_mail), "toggled",
 		       GTK_SIGNAL_FUNC(properties_modified_cb), property_box);
+    gtk_signal_connect(GTK_OBJECT(pui->autoquote), "toggled",
+		       GTK_SIGNAL_FUNC(properties_modified_cb), property_box);
     gtk_signal_connect(GTK_OBJECT(pui->reply_strip_html_parts), "toggled",
 		       GTK_SIGNAL_FUNC(properties_modified_cb), property_box);
     gtk_signal_connect(GTK_OBJECT(pui->forward_attached), "toggled",
@@ -619,6 +622,8 @@
 	gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pui->wraplength));
     balsa_app.send_rfc2646_format_flowed =
 	GTK_TOGGLE_BUTTON(pui->send_rfc2646_format_flowed)->active;
+    balsa_app.autoquote =
+	GTK_TOGGLE_BUTTON(pui->autoquote)->active;
     balsa_app.reply_strip_html =
 	GTK_TOGGLE_BUTTON(pui->reply_strip_html_parts)->active;
     balsa_app.forward_attached =
@@ -869,6 +874,8 @@
 				 balsa_app.send_rfc2646_format_flowed);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->always_queue_sent_mail),
 				 balsa_app.always_queue_sent_mail);
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->autoquote),
+				 balsa_app.autoquote);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->reply_strip_html_parts),
 				 balsa_app.reply_strip_html);
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pui->forward_attached),
@@ -1609,13 +1616,18 @@
     gtk_container_set_border_width(GTK_CONTAINER(table2), 2);
     pui->quote_str = attach_entry(_("Reply prefix:"), 4, table2);
 
+    pui->autoquote =
+        gtk_check_button_new_with_label(_("Automatically quote original "
+                                          "when replying"));
+    gtk_box_pack_start(GTK_BOX(vbox2), pui->autoquote, FALSE, TRUE, 0);
+
     pui->reply_strip_html_parts =
-	gtk_check_button_new_with_label(_("don't include HTML parts as text when replying or forwarding mail"));
+	gtk_check_button_new_with_label(_("Don't include HTML parts as text when replying or forwarding mail"));
     gtk_box_pack_start(GTK_BOX(vbox2), pui->reply_strip_html_parts,
 		       FALSE, TRUE, 0);
 
     pui->forward_attached =
-	gtk_check_button_new_with_label(_("forward a mail as attachment instead of quoting it"));
+	gtk_check_button_new_with_label(_("Forward a mail as attachment instead of quoting it"));
     gtk_box_pack_start(GTK_BOX(vbox2), pui->forward_attached,
 		       FALSE, TRUE, 0);
 
diff -Nur --exclude=CVS balsa-cvs/src/save-restore.c balsa-autoquote/src/save-restore.c
--- balsa-cvs/src/save-restore.c	Mon Sep 24 07:50:02 2001
+++ balsa-autoquote/src/save-restore.c	Thu Oct 11 14:10:24 2001
@@ -672,6 +672,8 @@
 	balsa_app.wraplength = 40;
     balsa_app.send_rfc2646_format_flowed =
 	gnome_config_get_bool("SendRFC2646FormatFlowed=true");
+    balsa_app.autoquote = 
+	gnome_config_get_bool("AutoQuote=true");
     balsa_app.reply_strip_html = 
 	gnome_config_get_bool("StripHtmlInReply=true");
     balsa_app.forward_attached = 
@@ -910,6 +912,7 @@
     gnome_config_set_int("WrapLength", balsa_app.wraplength);
     gnome_config_set_bool("SendRFC2646FormatFlowed",
 			   balsa_app.send_rfc2646_format_flowed);
+    gnome_config_set_bool("AutoQuote", balsa_app.autoquote);
     gnome_config_set_bool("StripHtmlInReply", balsa_app.reply_strip_html);
     gnome_config_set_bool("ForwardAttached", balsa_app.forward_attached);
 
diff -Nur --exclude=CVS balsa-cvs/src/sendmsg-window.c balsa-autoquote/src/sendmsg-window.c
--- balsa-cvs/src/sendmsg-window.c	Wed Oct 10 07:46:43 2001
+++ balsa-autoquote/src/sendmsg-window.c	Thu Oct 11 14:17:19 2001
@@ -1608,7 +1608,8 @@
 
 /* fillBody --------------------------------------------------------------
    fills the body of the message to be composed based on the given message.
-   First quotes the original one and then adds the signature.
+   First quotes the original one, if autoquote is set,
+   and then adds the signature.
    Optionally prepends the signature to quoted text.
 */
 static void
@@ -1618,7 +1619,7 @@
     gchar *signature;
     gint pos = 0;
 
-    if (type != SEND_NORMAL && message)
+    if (type != SEND_NORMAL && message && balsa_app.autoquote)
 	body = quoteBody(msg, message, type);
     else
 	body = g_string_new("");


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