[pan2: 6/8] patch for user agent in ui (miroslav sabljic)
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2: 6/8] patch for user agent in ui (miroslav sabljic)
- Date: Fri, 21 Dec 2012 22:03:24 +0000 (UTC)
commit 6a8de8bcc89e044a0001fef9cba45d7305c138de
Author: Heinrich MÃller <henmull src gnome org>
Date: Fri Dec 21 21:58:58 2012 +0100
patch for user agent in ui (miroslav sabljic)
pan/gui/body-pane.cc | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index 5cf5ba0..e14c64e 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -1148,6 +1148,29 @@ BodyPane :: set_text_from_message (GMimeMessage * message)
l = add_header_line (s, message, _("Newsgroups"), "Newsgroups", fallback_charset);
w = std::max (w, l);
}
+ const StringView user_agent(
+ g_mime_object_get_header((GMimeObject *) message,
+ "User-Agent"));
+ if (!user_agent.empty()) {
+ l = add_header_line(s, message, _("User-Agent"), "User-Agent",
+ fallback_charset);
+ w = std::max(w, l);
+ }
+ const StringView x_newsreader(
+ g_mime_object_get_header((GMimeObject *) message,
+ "X-Newsreader"));
+ if (!x_newsreader.empty()) {
+ l = add_header_line(s, message, _("User-Agent"), "X-Newsreader",
+ fallback_charset);
+ w = std::max(w, l);
+ }
+ const StringView x_mailer(
+ g_mime_object_get_header((GMimeObject *) message, "X-Mailer"));
+ if (!x_mailer.empty()) {
+ l = add_header_line(s, message, _("User-Agent"), "X-Mailer",
+ fallback_charset);
+ w = std::max(w, l);
+ }
const StringView followup_to (g_mime_object_get_header ((GMimeObject *) message, "Followup-To"));
if (!followup_to.empty() && (followup_to!=newsgroups)) {
l = add_header_line (s, message, _("Followup-To"), "Followup-To", fallback_charset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]