summaryrefslogtreecommitdiffstats
path: root/source/xap/pan/pan.glib-2.68.0.diff
diff options
context:
space:
mode:
Diffstat (limited to 'source/xap/pan/pan.glib-2.68.0.diff')
-rw-r--r--source/xap/pan/pan.glib-2.68.0.diff743
1 files changed, 743 insertions, 0 deletions
diff --git a/source/xap/pan/pan.glib-2.68.0.diff b/source/xap/pan/pan.glib-2.68.0.diff
new file mode 100644
index 000000000..e02f28ca3
--- /dev/null
+++ b/source/xap/pan/pan.glib-2.68.0.diff
@@ -0,0 +1,743 @@
+diff -aurN pan-0.146/pan/data/article-cache.cc pan-0.146-mod/pan/data/article-cache.cc
+--- pan-0.146/pan/data/article-cache.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/data/article-cache.cc 2021-04-05 18:50:26.132408821 +0200
+@@ -26,12 +26,10 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <dirent.h>
+-
+- #include <glib.h>
+- #include <glib/gi18n.h>
+- #include <gmime/gmime.h>
+ }
+-
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <gmime/gmime.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/file-util.h>
+ #include <pan/general/macros.h>
+diff -aurN pan-0.146/pan/data/article-cache.h pan-0.146-mod/pan/data/article-cache.h
+--- pan-0.146/pan/data/article-cache.h 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/data/article-cache.h 2021-04-05 18:49:41.686408990 +0200
+@@ -22,9 +22,7 @@
+
+ #include <map>
+ #include <vector>
+-extern "C" {
+- #include <glib.h> // for guint64
+-}
++#include <glib.h> // for guint64
+ #include <pan/general/string-view.h>
+ #include <pan/general/quark.h>
+
+diff -aurN pan-0.146/pan/data-impl/data-impl.cc pan-0.146-mod/pan/data-impl/data-impl.cc
+--- pan-0.146/pan/data-impl/data-impl.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/data-impl/data-impl.cc 2021-04-05 18:59:43.045406696 +0200
+@@ -22,10 +22,8 @@
+ **************/
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include <glib.h> // for g_build_filename
+-}
++#include <glib/gi18n.h>
++#include <glib.h> // for g_build_filename
+ #include <pan/general/debug.h>
+ #include <pan/general/file-util.h>
+ #include <pan/general/log.h>
+diff -aurN pan-0.146/pan/data-impl/profiles.cc pan-0.146-mod/pan/data-impl/profiles.cc
+--- pan-0.146/pan/data-impl/profiles.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/data-impl/profiles.cc 2021-04-05 07:03:32.546986596 +0200
+@@ -240,7 +240,7 @@
+ }
+ out << indent(--depth) << "</profile>\n";
+ }
+- out << indent(--depth) << "</profiles>\n\n";
++ out << indent(--depth) << "</profiles>\n";
+ out << indent(--depth) << "</posting>\n";
+ }
+
+diff -aurN pan-0.146/pan/general/file-util.cc pan-0.146-mod/pan/general/file-util.cc
+--- pan-0.146/pan/general/file-util.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/general/file-util.cc 2021-04-05 18:44:45.568410120 +0200
+@@ -27,13 +27,12 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+- #include <glib.h>
+- #include <glib/gi18n.h>
+ #ifndef G_OS_WIN32
+ #include <pwd.h>
+ #endif
+ }
+-
++#include <glib.h>
++#include <glib/gi18n.h>
+ #include "debug.h"
+ #include "log.h"
+ #include "messages.h"
+diff -aurN pan-0.146/pan/general/file-util.h pan-0.146-mod/pan/general/file-util.h
+--- pan-0.146/pan/general/file-util.h 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/general/file-util.h 2021-04-05 18:43:33.527410395 +0200
+@@ -25,9 +25,9 @@
+ extern "C" {
+ #include <stddef.h>
+ #include <stdio.h>
+- #include <glib.h>
+- #include <glib/gstdio.h>
+ }
++#include <glib.h>
++#include <glib/gstdio.h>
+ #include <pan/general/string-view.h>
+
+ #define g_freopen freopen
+diff -aurN pan-0.146/pan/general/line-reader.cc pan-0.146-mod/pan/general/line-reader.cc
+--- pan-0.146/pan/general/line-reader.cc 2017-12-23 20:51:55.000000000 +0100
++++ pan-0.146-mod/pan/general/line-reader.cc 2021-04-05 18:45:43.352409899 +0200
+@@ -1,9 +1,7 @@
+ #include <config.h>
+ #include <cstdio>
+ #include <cstdlib>
+-extern "C"{
+- #include <glib/gi18n.h>
+-}
++#include <glib/gi18n.h>
+ #include <cerrno>
+ #include "file-util.h"
+ #include "line-reader.h"
+diff -aurN pan-0.146/pan/general/text-match.cc pan-0.146-mod/pan/general/text-match.cc
+--- pan-0.146/pan/general/text-match.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/general/text-match.cc 2021-04-05 18:46:30.698409719 +0200
+@@ -20,9 +20,9 @@
+ #include <config.h>
+ extern "C" {
+ #include <ctype.h>
+- #include <glib.h>
+- #include <glib/gi18n.h>
+ }
++#include <glib.h>
++#include <glib/gi18n.h>
+ #include "debug.h"
+ #include "log.h"
+ #include "text-match.h"
+diff -aurN pan-0.146/pan/gui/actions.cc pan-0.146-mod/pan/gui/actions.cc
+--- pan-0.146/pan/gui/actions.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/actions.cc 2021-04-05 19:03:23.526405855 +0200
+@@ -18,11 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
+-
++#include "gtk-compat.h"
++#include <glib/gi18n.h>
+ #include <pan/general/macros.h>
+ #include <pan/general/debug.h>
+ #include <pan/data-impl/data-impl.h>
+diff -aurN pan-0.146/pan/gui/dl-headers-ui.cc pan-0.146-mod/pan/gui/dl-headers-ui.cc
+--- pan-0.146/pan/gui/dl-headers-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/dl-headers-ui.cc 2021-04-05 19:04:01.884405709 +0200
+@@ -18,11 +18,9 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib.h>
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib.h>
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/macros.h>
+ #include <pan/tasks/queue.h>
+ #include <pan/tasks/task-xover.h>
+diff -aurN pan-0.146/pan/gui/group-prefs.cc pan-0.146-mod/pan/gui/group-prefs.cc
+--- pan-0.146/pan/gui/group-prefs.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/group-prefs.cc 2021-04-05 19:04:41.030405560 +0200
+@@ -21,8 +21,8 @@
+ #include <config.h>
+ #include <sys/types.h> // chmod
+ #include <sys/stat.h> // chmod
+- #include <glib.h>
+ }
++#include <glib.h>
+ #include <iostream>
+ #include <fstream>
+ #include <pan/general/file-util.h>
+diff -aurN pan-0.146/pan/gui/group-prefs-dialog.cc pan-0.146-mod/pan/gui/group-prefs-dialog.cc
+--- pan-0.146/pan/gui/group-prefs-dialog.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/group-prefs-dialog.cc 2021-04-05 19:05:19.236405414 +0200
+@@ -19,13 +19,13 @@
+
+ #include <config.h>
+ extern "C" {
+- #include <glib/gi18n.h>
+- #include <glib.h>
+- #include "gtk-compat.h"
+ #ifdef HAVE_GTKSPELL
+ #include <enchant/enchant.h>
+ #endif
+ }
++#include <glib/gi18n.h>
++#include <glib.h>
++#include "gtk-compat.h"
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include <pan/data/data.h>
+diff -aurN pan-0.146/pan/gui/gui.cc pan-0.146-mod/pan/gui/gui.cc
+--- pan-0.146/pan/gui/gui.cc 2019-05-04 18:10:27.000000000 +0200
++++ pan-0.146-mod/pan/gui/gui.cc 2021-04-05 19:00:49.351406443 +0200
+@@ -25,9 +25,9 @@
+ extern "C" {
+ #include <sys/types.h> // for chmod
+ #include <sys/stat.h> // for chmod
+- #include <glib/gi18n.h>
+ #include <dirent.h>
+ }
++#include <glib/gi18n.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/e-util.h>
+ #include <pan/general/file-util.h>
+diff -aurN pan-0.146/pan/gui/header-pane.cc pan-0.146-mod/pan/gui/header-pane.cc
+--- pan-0.146/pan/gui/header-pane.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/header-pane.cc 2021-04-05 19:06:37.048405117 +0200
+@@ -19,10 +19,9 @@
+
+ extern "C" {
+ #include <config.h>
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+- #include "gtk-compat.h"
+ }
++#include "gtk-compat.h"
++#include <glib/gi18n.h>
+ #include <cctype>
+ #include <cmath>
+ #include <algorithm>
+diff -aurN pan-0.146/pan/gui/post-ui.cc pan-0.146-mod/pan/gui/post-ui.cc
+--- pan-0.146/pan/gui/post-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/post-ui.cc 2021-04-05 07:03:32.564986261 +0200
+@@ -1598,86 +1598,178 @@
+ GMimeMessage*
+ PostUI :: new_message_from_ui (Mode mode, bool copy_body)
+ {
++#ifdef HAVE_GMIME_30
+
+ GMimeMessage * msg(0);
+- msg = g_mime_message_new (false);
++ msg = g_mime_message_new (true);
++ const char * charset_cstr = _charset.c_str();
+
+ // headers from the ui: From
+ const Profile profile (get_current_profile ());
+ std::string s;
+ profile.get_from_header (s);
+-#ifdef HAVE_GMIME_30
+- g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_SENDER, NULL, s.c_str());
++ g_mime_message_add_mailbox (msg, GMIME_ADDRESS_TYPE_FROM, profile.username.c_str(), profile.address.c_str());
++
++ // headers from the ui: Subject
++ const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry)));
++ if (cpch) {
++ g_mime_message_set_subject (msg, cpch, charset_cstr);
++ }
++
++ // headers from the ui: To
++ const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry)));
++ if (!to.empty())
++ pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str);
++
++ // headers from the ui: Newsgroups
++ const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry)));
++ if (!groups.empty())
++ g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, charset_cstr);
++
++ // headers from the ui: Followup-To
++ const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry)));
++ if (!followupto.empty())
++ g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, charset_cstr);
++
++ // headers from the ui: Reply-To
++ const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry)));
++ if (!replyto.empty())
++ g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, charset_cstr);
++
++ // headers from posting profile(via prefs): X-Face
++ if (!profile.xface.empty())
++ {
++ std::string f;
++ f += " " + profile.xface;
++ g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str(), charset_cstr);
++ }
++
++ // add the 'hidden headers' (references)
++ const gchar * h_key_str;
++ foreach_const (str2str_t, _hidden_headers, it)
++ if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0))
++ {
++ h_key_str = it->first.c_str();
++ if ( g_ascii_strncasecmp (h_key_str, "Content", 7) )
++ {
++ g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), charset_cstr);
++ }
++ }
++
++ // build headers from the 'more headers' entry field
++ std::map<std::string,std::string> headers;
++ GtkTextBuffer * buf (_headers_buf);
++ GtkTextIter start, end;
++ gtk_text_buffer_get_bounds (buf, &start, &end);
++ char * pch = gtk_text_buffer_get_text (buf, &start, &end, false);
++ StringView key, val, v(pch);
++ v.trim ();
++ while (v.pop_token (val, '\n') && val.pop_token(key,':')) {
++ key.trim ();
++ val.eat_chars (1);
++ val.trim ();
++ std::string key_str (key.to_string());
++ if (extra_header_is_editable (key, val))
++ g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(),
++ val.to_string().c_str(), charset_cstr);
++ }
++ g_free (pch);
++
++ // User-Agent
++ if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true))
++ g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), charset_cstr);
++
++ // Message-ID for single text-only posts
++ if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) {
++ const std::string message_id = generate_message_id(profile);
++ pan_g_mime_message_set_message_id (msg, message_id.c_str());
++ }
++
++ // body & charset
++ {
++ std::string body;
++ if (copy_body) body = get_body();
++
++ GMimeStream * stream = g_mime_stream_mem_new_with_buffer (body.c_str(), body.size());
++
++ const std::string charset ((mode==POSTING && !_charset.empty()) ? _charset : "UTF-8");
++ if (charset != "UTF-8") {
++ // add a wrapper to convert from UTF-8 to $charset
++ GMimeStream * tmp = g_mime_stream_filter_new (stream);
++ g_object_unref (stream);
++ GMimeFilter * filter = g_mime_filter_charset_new ("UTF-8", charset.c_str());
++ g_mime_stream_filter_add (GMIME_STREAM_FILTER(tmp), filter);
++ g_object_unref (filter);
++ stream = tmp;
++ }
++ GMimeDataWrapper * content_object = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_DEFAULT);
++ g_object_unref (stream);
++ GMimePart * part = g_mime_part_new ();
++ g_mime_part_set_content (part, content_object);
++
++ pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str());
++ GMimeContentType * type = g_mime_content_type_parse (NULL, pch);
++ g_free (pch);
++ g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted.
++
++ if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc);
++
++ g_object_unref (content_object);
++ g_mime_message_set_mime_part (msg, GMIME_OBJECT(part));
++ g_object_unref (part);
++ }
++
++ return msg;
++
+ #else
++
++ GMimeMessage * msg(0);
++ msg = g_mime_message_new (false);
++
++ // headers from the ui: From
++ const Profile profile (get_current_profile ());
++ std::string s;
++ profile.get_from_header (s);
+ g_mime_message_set_sender (msg, s.c_str());
+-#endif
+
+ // headers from the ui: Subject
+ const char * cpch (gtk_entry_get_text (GTK_ENTRY(_subject_entry)));
+ if (cpch) {
+-#ifdef HAVE_GMIME_30
+- g_mime_message_set_subject (msg, cpch, NULL);
+-#else
+ g_mime_message_set_subject (msg, cpch);
+-#endif
+ }
+
+ // headers from the ui: To
+ const StringView to (gtk_entry_get_text (GTK_ENTRY(_to_entry)));
+ if (!to.empty())
+-#ifdef HAVE_GMIME_30
+- pan_g_mime_message_add_recipients_from_string (msg, GMIME_ADDRESS_TYPE_TO, to.str);
+-#else
+ pan_g_mime_message_add_recipients_from_string (msg, GMIME_RECIPIENT_TYPE_TO, to.str);
+-#endif
+
+ // headers from the ui: Newsgroups
+ const StringView groups (gtk_entry_get_text (GTK_ENTRY(_groups_entry)));
+ if (!groups.empty())
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str, NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, "Newsgroups", groups.str);
+-#endif
+
+ // headers from the ui: Followup-To
+ const StringView followupto (gtk_entry_get_text (GTK_ENTRY(_followupto_entry)));
+ if (!followupto.empty())
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str, NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, "Followup-To", followupto.str);
+-#endif
+
+ // headers from the ui: Reply-To
+ const StringView replyto (gtk_entry_get_text (GTK_ENTRY(_replyto_entry)));
+ if (!replyto.empty())
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str, NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, "Reply-To", replyto.str);
+-#endif
+
+ // headers from posting profile(via prefs): X-Face
+ if (!profile.xface.empty())
+ {
+ std::string f;
+ f += " " + profile.xface;
+-#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());
+-#endif
+ }
+
+ // add the 'hidden headers'
+ foreach_const (str2str_t, _hidden_headers, it)
+ if ((mode==DRAFTING) || (it->first.find ("X-Draft-")!=0))
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str(), NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, it->first.c_str(), it->second.c_str());
+-#endif
+
+ // build headers from the 'more headers' entry field
+ std::map<std::string,std::string> headers;
+@@ -1693,23 +1785,14 @@
+ val.trim ();
+ std::string key_str (key.to_string());
+ if (extra_header_is_editable (key, val))
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(),
+- val.to_string().c_str(), NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, key.to_string().c_str(),
+ val.to_string().c_str());
+-#endif
+ }
+ g_free (pch);
+
+ // User-Agent
+ if ((mode==POSTING || mode == UPLOADING) && _prefs.get_flag (USER_AGENT_PREFS_KEY, true))
+-#ifdef HAVE_GMIME_30
+- g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent(), NULL);
+-#else
+ g_mime_object_set_header ((GMimeObject *) msg, "User-Agent", get_user_agent());
+-#endif
+
+ // Message-ID for single text-only posts
+ if (mode==DRAFTING || ((mode==POSTING || mode==UPLOADING) && _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false))) {
+@@ -1738,19 +1821,10 @@
+ g_object_unref (stream);
+ GMimePart * part = g_mime_part_new ();
+ pch = g_strdup_printf ("text/plain; charset=%s", charset.c_str());
+-
+-#ifdef HAVE_GMIME_30
+- GMimeContentType * type = g_mime_content_type_parse (NULL, pch);
+-#else
+ GMimeContentType * type = g_mime_content_type_new_from_string (pch);
+-#endif
+ g_free (pch);
+ g_mime_object_set_content_type ((GMimeObject *) part, type); // part owns type now. type isn't refcounted.
+-#ifdef HAVE_GMIME_30
+- g_mime_part_set_content(part, content_object);
+-#else
+ g_mime_part_set_content_object (part, content_object);
+-#endif
+ if (mode != UPLOADING) g_mime_part_set_content_encoding (part, _enc);
+ g_object_unref (content_object);
+ g_mime_message_set_mime_part (msg, GMIME_OBJECT(part));
+@@ -1758,6 +1832,8 @@
+ }
+
+ return msg;
++
++#endif
+ }
+
+ void
+diff -aurN pan-0.146/pan/gui/prefs-ui.cc pan-0.146-mod/pan/gui/prefs-ui.cc
+--- pan-0.146/pan/gui/prefs-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/prefs-ui.cc 2021-04-05 19:07:26.592404928 +0200
+@@ -18,10 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include <pan/general/file-util.h>
+diff -aurN pan-0.146/pan/gui/progress-view.cc pan-0.146-mod/pan/gui/progress-view.cc
+--- pan-0.146/pan/gui/progress-view.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/progress-view.cc 2021-04-05 19:08:01.207404796 +0200
+@@ -18,9 +18,7 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include "gtk-compat.h"
+-}
++#include "gtk-compat.h"
+ #include <pan/general/string-view.h>
+ #include <pan/usenet-utils/mime-utils.h>
+ #include "progress-view.h"
+diff -aurN pan-0.146/pan/gui/save-attach-ui.cc pan-0.146-mod/pan/gui/save-attach-ui.cc
+--- pan-0.146/pan/gui/save-attach-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/save-attach-ui.cc 2021-04-05 19:09:43.571404405 +0200
+@@ -18,10 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include <pan/icons/pan-pixbufs.h>
+diff -aurN pan-0.146/pan/gui/save-ui.cc pan-0.146-mod/pan/gui/save-ui.cc
+--- pan-0.146/pan/gui/save-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/save-ui.cc 2021-04-05 19:08:49.801404611 +0200
+@@ -18,10 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include <pan/icons/pan-pixbufs.h>
+diff -aurN pan-0.146/pan/gui/score-add-ui.cc pan-0.146-mod/pan/gui/score-add-ui.cc
+--- pan-0.146/pan/gui/score-add-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/score-add-ui.cc 2021-04-05 19:10:11.844404298 +0200
+@@ -20,9 +20,7 @@
+ #include <config.h>
+ #include <cassert>
+ #include <climits>
+-extern "C" {
+- #include <glib/gi18n.h>
+-}
++#include <glib/gi18n.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/text-match.h>
+ #include "hig.h"
+diff -aurN pan-0.146/pan/gui/score-view-ui.cc pan-0.146-mod/pan/gui/score-view-ui.cc
+--- pan-0.146/pan/gui/score-view-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/score-view-ui.cc 2021-04-05 19:10:51.159404148 +0200
+@@ -18,10 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/debug.h>
+ #include "pad.h"
+ #include "score-add-ui.h"
+diff -aurN pan-0.146/pan/gui/server-ui.cc pan-0.146-mod/pan/gui/server-ui.cc
+--- pan-0.146/pan/gui/server-ui.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/server-ui.cc 2021-04-05 19:11:30.464403998 +0200
+@@ -21,12 +21,9 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <climits>
+-extern "C" {
+- #include <glib.h>
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
+-
++#include <glib.h>
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/icons/pan-pixbufs.h>
+ #include <pan/general/file-util.h>
+ #include <pan/general/macros.h>
+diff -aurN pan-0.146/pan/gui/task-pane.cc pan-0.146-mod/pan/gui/task-pane.cc
+--- pan-0.146/pan/gui/task-pane.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/gui/task-pane.cc 2021-04-05 19:12:05.829403863 +0200
+@@ -18,11 +18,9 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib.h>
+- #include <glib/gi18n.h>
+- #include "gtk-compat.h"
+-}
++#include <glib.h>
++#include <glib/gi18n.h>
++#include "gtk-compat.h"
+ #include <pan/general/e-util.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/file-util.h>
+diff -aurN pan-0.146/pan/tasks/nntp.cc pan-0.146-mod/pan/tasks/nntp.cc
+--- pan-0.146/pan/tasks/nntp.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/nntp.cc 2021-04-05 18:57:01.768407312 +0200
+@@ -22,10 +22,8 @@
+ #include <cstdarg>
+ #include <cstdlib> // abort, atoi, strtoul
+ #include <cstdio> // snprintf
+-extern "C" {
+- #include <glib.h>
+- #include <glib/gi18n.h>
+-}
++#include <glib.h>
++#include <glib/gi18n.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/log.h>
+ #include <pan/general/messages.h>
+diff -aurN pan-0.146/pan/tasks/socket.cc pan-0.146-mod/pan/tasks/socket.cc
+--- pan-0.146/pan/tasks/socket.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/socket.cc 2021-04-05 18:58:43.178406925 +0200
+@@ -21,9 +21,7 @@
+ #include <cstdarg>
+ #include <ctime>
+ #include <cmath>
+-extern "C" {
+- #include <glib.h>
+-}
++#include <glib.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/string-view.h>
+ #include "socket.h"
+diff -aurN pan-0.146/pan/tasks/task-groups.cc pan-0.146-mod/pan/tasks/task-groups.cc
+--- pan-0.146/pan/tasks/task-groups.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/task-groups.cc 2021-04-05 18:52:54.804408254 +0200
+@@ -20,9 +20,9 @@
+ #include <config.h>
+ #include <cassert>
+ extern "C" {
+- #include <glib/gi18n.h>
+ #include <stdlib.h>
+ }
++#include <glib/gi18n.h>
+ #include <pan/general/debug.h>
+ #include <pan/general/macros.h>
+ #include <pan/general/messages.h>
+diff -aurN pan-0.146/pan/tasks/task-post.cc pan-0.146-mod/pan/tasks/task-post.cc
+--- pan-0.146/pan/tasks/task-post.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/task-post.cc 2021-04-05 18:54:43.554407839 +0200
+@@ -18,9 +18,7 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib/gi18n.h>
+-}
++#include <glib/gi18n.h>
+ #include "task-post.h"
+ #include <pan/general/debug.h>
+ #include <pan/general/log.h>
+diff -aurN pan-0.146/pan/tasks/task-xover.cc pan-0.146-mod/pan/tasks/task-xover.cc
+--- pan-0.146/pan/tasks/task-xover.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/task-xover.cc 2021-04-05 18:55:26.528407675 +0200
+@@ -26,10 +26,9 @@
+ #define PROTOTYPES
+ #include <stdio.h>
+ #include <uulib/uudeview.h>
++}
+ #include <glib/gi18n.h>
+ #include <gmime/gmime-utils.h>
+-}
+-
+ #include <fstream>
+ #include <iostream>
+ #include <pan/general/debug.h>
+diff -aurN pan-0.146/pan/tasks/task-xoverinfo.cc pan-0.146-mod/pan/tasks/task-xoverinfo.cc
+--- pan-0.146/pan/tasks/task-xoverinfo.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/tasks/task-xoverinfo.cc 2021-04-05 18:56:10.119407509 +0200
+@@ -24,10 +24,10 @@
+ #define PROTOTYPES
+ #include <stdio.h>
+ #include <uulib/uudeview.h>
+- #include <glib/gi18n.h>
+- #include <gmime/gmime-utils.h>
+ #include <zlib.h>
+ }
++#include <glib/gi18n.h>
++#include <gmime/gmime-utils.h>
+ #include <fstream>
+ #include <iostream>
+ #include <pan/general/debug.h>
+diff -aurN pan-0.146/pan/usenet-utils/filter-info.cc pan-0.146-mod/pan/usenet-utils/filter-info.cc
+--- pan-0.146/pan/usenet-utils/filter-info.cc 2017-12-29 18:15:47.000000000 +0100
++++ pan-0.146-mod/pan/usenet-utils/filter-info.cc 2021-04-05 18:48:09.801409341 +0200
+@@ -18,10 +18,8 @@
+ */
+
+ #include <config.h>
+-extern "C" {
+- #include <glib.h>
+- #include <glib/gi18n.h>
+-}
++#include <glib.h>
++#include <glib/gi18n.h>
+ #include <pan/general/macros.h>
+ #include "filter-info.h"
+
+diff -aurN pan-0.146/README.windows pan-0.146-mod/README.windows
+--- pan-0.146/README.windows 2019-10-12 21:57:23.000000000 +0200
++++ pan-0.146-mod/README.windows 1970-01-01 01:00:00.000000000 +0100
+@@ -1,16 +0,0 @@
+-
+- http://pan.rebelbase.com/download/releases/0.146/
+- has a full list of changes since the previous release.
+-
+- On Windows, Pan requires GTK 2.16.0 or higher, which can be found at
+- <http://gtk-win.sourceforge.net/>.
+-
+- Found a bug? Have a suggestion?
+- Send feedback to the pan-users@nongnu.org mailing list.
+-
+- Information on building Pan on Windows can be found at
+- <https://gitlab.gnome.org/GNOME/pan/raw/master/README.mingw>.
+-
+- See the following page for more information on Pan builds for Windows:
+- <http://pan.rebelbase.com/download/>.
+-