[PATCH] Attachments in mailto: URLs
- From: "Johan Brannlund" <johan_brn yahoo com>
- To: balsa-list gnome org
- Subject: [PATCH] Attachments in mailto: URLs
- Date: Wed, 1 Nov 2006 04:06:24 +0000 (UTC)
I noticed when trying to mail pictures from f-spot that Balsa didn't
include the attachments. A bit of digging revealed that the reason is that
Balsa doesn't understand things like
"mailto:helmut example com?attach=/tmp/strudel.jpg"
I hacked up a small patch for this, included below. In case it suffers
from whitespace damage, it's also available at
http://nullinfinity.org/attach.patch .
Regards,
Johan
--- origbalsa/src/sendmsg-window.c 2006-10-08 08:52:03.000000000 -0700
+++ balsa/src/sendmsg-window.c 2006-10-31 19:59:41.000000000 -0800
@@ -4596,8 +4596,12 @@
key = decode_and_strdup(ptr,'=', &ptr);
if(ptr) {
val = decode_and_strdup(ptr,'&', &ptr);
- func(data, key, val);
- g_free(val);
+ if (g_ascii_strcasecmp(key, "attach") == 0)
+ add_attachment(data,val,FALSE,NULL);
+ else {
+ func(data, key, val);
+ g_free(val);
+ }
}
g_free(key);
}
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]