[pan: 15/21] Applied Face/X-Face patches to GMIME3 code.
- From: Dominique Dumont <ddumont src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan: 15/21] Applied Face/X-Face patches to GMIME3 code.
- Date: Wed, 15 Dec 2021 18:19:59 +0000 (UTC)
commit 3fc114efb5b573127af9144fbee504810926af65
Author: FoxMcCloud45 <foxmccloud45 hotmail com>
Date: Wed Jul 7 10:19:08 2021 +0200
Applied Face/X-Face patches to GMIME3 code.
pan/gui/post-ui.cc | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index ba604fa..65a4bdf 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -1636,11 +1636,30 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body)
if (!replyto.empty())
g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, charset_cstr);
+ // headers from posting profile (via prefs): Face
+ if (!profile.face.empty())
+ {
+ std::string f;
+ f += profile.face;
+
+ for (int i = GMIME_FOLD_BASE64_INTERVAL; i < f.length(); i += GMIME_FOLD_BASE64_INTERVAL)
+ {
+ f.insert (i, " ");
+ }
+ g_mime_object_set_header ((GMimeObject *) msg, "Face", f.c_str(), charset_cstr);
+ }
+
// headers from posting profile(via prefs): X-Face
if (!profile.xface.empty())
{
std::string f;
- f += " " + profile.xface;
+ f += profile.xface;
+
+ // GMIME_FOLD_INTERVAL - 8: Accounting for 'X-Face: ' beginning of header
+ for(int i = GMIME_FOLD_INTERVAL - 8; i < f.length(); i += GMIME_FOLD_INTERVAL)
+ {
+ f.insert(i, " ");
+ }
g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), charset_cstr);
}
@@ -1768,11 +1787,7 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body)
{
f.insert (i, " ");
}
-#ifdef HAVE_GMIME_30
- g_mime_object_set_header ((GMimeObject *) msg, "Face", f.c_str(), NULL);
-#else
g_mime_object_set_header ((GMimeObject *) msg, "Face", f.c_str());
-#endif
}
// headers from posting profile(via prefs): X-Face
@@ -1786,9 +1801,6 @@ PostUI :: new_message_from_ui (Mode mode, bool copy_body)
{
f.insert(i, " ");
}
-#ifdef HAVE_GMIME_30
- g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), NULL);
-#else
g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]