[evolution-patches] patch to fix a file being attached anytimes in a message
- From: yinqx yin <jimmy yin sun com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] patch to fix a file being attached anytimes in a message
- Date: Thu, 22 Jul 2004 13:46:43 +0800
Hi,
Attached is a patch to fix the bug that a file can be attached anytimes
in a message in evolution 1.4.
After patched, the composer will refuse the attachment with the same
filename, disposition and size as some one existing in the attachments
list.
regards.
Jimmy
Index: composer/e-msg-composer-attachment-bar.c
+-AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0APQA9AD0
RCS file: /export/src/cvs/evolution/composer/e-msg-composer-attachment-bar.c,v
retrieving revision 1.5
diff -u -r1.5 e-msg-composer-attachment-bar.c
--- composer/e-msg-composer-attachment-bar.c 2004/03/19 01:50:22 1.5
+--+--+-- composer/e-msg-composer-attachment-bar.c 2004/07/21 09:12:58
+-AEAAQA -141,12 +--141,42 +-AEAAQA
add+-AF8-common (EMsgComposerAttachmentBar +-ACo-bar,
EMsgComposerAttachment +-ACo-attachment)
+-AHs
+-- GList +-ACo p+-ADs
+-- CamelMimePart +-ACo-part+-ADs
+-- CamelMimePart +-ACo-new+-AF8-part+-ADs
+-- char +-ACo-file+-AF8-name, +-ACo new+-AF8-file+-AF8-name+-ADs
+-- char +-ACo-disposition, +-ACo new+-AF8-disposition+-ADs
+-- EMsgComposerAttachment +-ACo-old+-AF8-attachment+-ADs
+-- int length,i+-ADs
+--
g+-AF8-return+-AF8-if+-AF8-fail (attachment +-ACEAPQ NULL)+-ADs
g+-AF8-signal+-AF8-connect (attachment, +-ACI-changed+-ACI,
G+-AF8-CALLBACK (attachment+-AF8-changed+-AF8-cb),
bar)+-ADs
+-- new+-AF8-part+-AD0-attachment-+-AD4-body+-ADs
+-- new+-AF8-file+-AF8-name+-AD0-camel+-AF8-mime+-AF8-part+-AF8-get+-AF8-filename(new+-AF8-part)+-ADs
+-- new+-AF8-disposition+-AD0-camel+-AF8-mime+-AF8-part+-AF8-get+-AF8-disposition(new+-AF8-part)+-ADs
+--
+-- p+-AD0-g+-AF8-list+-AF8-first(bar-+-AD4-priv-+-AD4-attachments)+-ADs
+-- length+-AD0-g+-AF8-list+-AF8-length(bar-+-AD4-priv-+-AD4-attachments)+-ADs
+-- i+-AD0-0+-ADs
+-- while(i+-ADw-length)+-AHs
+-- old+-AF8-attachment+-AD0(EMsgComposerAttachment +-ACo)(p-+-AD4-data)+-ADs
+-- part+-AD0-old+-AF8-attachment-+-AD4-body+-ADs
+-- file+-AF8-name+-AD0-camel+-AF8-mime+-AF8-part+-AF8-get+-AF8-filename(part)+-ADs
+-- disposition+-AD0-camel+-AF8-mime+-AF8-part+-AF8-get+-AF8-disposition(part)+-ADs
+-- if((+-ACE-strcmp(file+-AF8-name,new+-AF8-file+-AF8-name))+-ACYAJg
+-- (+-ACE-strcmp(disposition,new+-AF8-disposition))+-ACYAJg
+-- (old+-AF8-attachment-+-AD4-size+-AD0APQ-attachment-+-AD4-size))
+-- +-AHs
+-- g+-AF8-object+-AF8-unref(attachment)+-ADs
+-- return+-ADs
+-- +-AH0
+-- p+-AD0-p-+-AD4-next+-ADs
+-- i+--+--+-ADs
+-- +-AH0
bar-+-AD4-priv-+-AD4-attachments +-AD0 g+-AF8-list+-AF8-append (bar-+-AD4-priv-+-AD4-attachments,
attachment)+-ADs
bar-+-AD4-priv-+-AD4-num+-AF8-attachments+--+--+-ADs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]