Re: [evolution-patches] [Tasks] Fix for bug #311482



Sorry, Resending the patch.
Removing the unnecessary braces in the previous one.

-Simon

On Fri, 2006-02-24 at 19:10 +0800, simon.zheng wrote:
> Hi,
> 
> Bug 311482 â?? attachment name in greek language can't be displayed
> correctly.
> 
> For localized characters, URI is escaped ASCII-encoded like
> "file:///home/zheng/%e5%ae%b6%e5%8e%bb.sxw". This string is regards as
> valid ASCII string when generating mime part and directly showed to
> users. Hence use filename instead of URI.
> 
> Sending a patch for review.
> 
> Thanks,
> -Simon
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.3000
diff -u -p -r1.3000 ChangeLog
--- ChangeLog	24 Feb 2006 02:57:09 -0000	1.3000
+++ ChangeLog	24 Feb 2006 11:17:44 -0000
@@ -1,3 +1,10 @@
+2006-02-24  Simon Zheng  <simon zheng sun com>
+
+	Fixes #311482
+	* gui/dialogs/comp-editor.c: (set_attachment_list): As uri is 
+	encaped ASCII-encoded, it can't be recognized when setting 
+	mime part. Use filename instead of uri.
+
 2006-02-23  Chenthill Palanisamy  <pchenthill novell com>
 
 	Fixes #330677
Index: gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.166
diff -u -p -r1.166 comp-editor.c
--- gui/dialogs/comp-editor.c	10 Feb 2006 22:27:36 -0000	1.166
+++ gui/dialogs/comp-editor.c	24 Feb 2006 11:17:44 -0000
@@ -2297,7 +2297,6 @@ set_attachment_list (CompEditor *editor,
 			camel_data_wrapper_construct_from_stream (wrapper, stream);
 			camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream");
 		}
-		g_free (file_name);
 
 		camel_object_unref (stream);
 		
@@ -2307,12 +2306,13 @@ set_attachment_list (CompEditor *editor,
 	
 		camel_mime_part_set_disposition (part, "attachment");
 
-		char *ptr = strstr (attach_filename, comp_uid);
+		char *ptr = strstr (file_name, comp_uid);
 		if (ptr) {
 			ptr += strlen(comp_uid);
 			if (*ptr++ == '-')
 				camel_mime_part_set_filename (part, ptr); 
 		}
+		g_free (file_name);
 
 		e_attachment_bar_attach_mime_part ((EAttachmentBar *) editor->priv->attachment_bar, part);
 		e_expander_set_expanded (E_EXPANDER (editor->priv->attachment_expander), TRUE);


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