[evolution-patches] Re: [mail] fix for bug 200624



I'm so sorry, I forgot to attach the patch :)

On 9/24/05, regatta <regatta gmail com> wrote:
> Hi
>
> this is my first patch so please double check before you add it to CVS :)
>
> http://bugzilla.gnome.org/show_bug.cgi?id=200624
>
> this will just remove [] from the subject when the customer forward a message
>
>
>
> --
> Best Regards,
> --------------------
> -*- If Linux doesn't have the solution, you have the wrong problem -*-
>


--
Best Regards,
--------------------
-*- If Linux doesn't have the solution, you have the wrong problem -*-
--- evolution-2.2.3/mail/mail-tools.c	2005-03-15 05:27:49.000000000 +0300
+++ evolution/mail/mail-tools.c	2005-09-24 19:57:37.000000000 +0300
@@ -180,15 +180,15 @@ mail_tool_generate_forward_subject (Came
 	if (subject && *subject) {
 		/* Truncate insanely long subjects */
 		if (strlen (subject) < max_subject_length) {
-			fwd_subj = g_strdup_printf ("[Fwd: %s]", subject);
+			fwd_subj = g_strdup_printf ("Fwd: %s", subject);
 		} else {
 			/* We can't use %.*s because it depends on the locale being C/POSIX
 			   or UTF-8 to work correctly in glibc */
-			/*fwd_subj = g_strdup_printf ("[Fwd: %.*s...]", max_subject_length, subject);*/
+			/*fwd_subj = g_strdup_printf ("Fwd: %.*s...", max_subject_length, subject);*/
 			fwd_subj = g_malloc (max_subject_length + 11);
-			memcpy (fwd_subj, "[Fwd: ", 6);
-			memcpy (fwd_subj + 6, subject, max_subject_length);
-			memcpy (fwd_subj + 6 + max_subject_length, "...]", 5);
+			memcpy (fwd_subj, "Fwd: ", 5);
+			memcpy (fwd_subj + 5, subject, max_subject_length);
+			memcpy (fwd_subj + 5 + max_subject_length, "...", 4);
 		}
 	} else {
 		const CamelInternetAddress *from;
@@ -197,10 +197,10 @@ mail_tool_generate_forward_subject (Came
 		from = camel_mime_message_get_from (msg);
 		if (from) {
 			fromstr = camel_address_format (CAMEL_ADDRESS (from));
-			fwd_subj = g_strdup_printf ("[Fwd: %s]", fromstr);
+			fwd_subj = g_strdup_printf ("Fwd: %s", fromstr);
 			g_free (fromstr);
 		} else
-			fwd_subj = g_strdup ("[Fwd: No Subject]");
+			fwd_subj = g_strdup ("Fwd: No Subject");
 	}
 	
 	return fwd_subj;


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