[Xfce4-commits] <postler:master> Allow unsubscribing on lists in place of "More"
Christian Dywan
noreply at xfce.org
Tue Jul 5 18:14:04 CEST 2011
Updating branch refs/heads/master
to 41fa4584f5be93ea0e0f907b705f32301fd5d2d2 (commit)
from 0d7a91dccc513c18674406f70b8cf951061a5d28 (commit)
commit 41fa4584f5be93ea0e0f907b705f32301fd5d2d2
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Jul 5 01:28:19 2011 +0200
Allow unsubscribing on lists in place of "More"
Message-specific pieces of information no longer make sense
to show at the top. For now we keep only Unsubscribe.
postler/postler-content.vala | 35 +++--------------------------------
1 files changed, 3 insertions(+), 32 deletions(-)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index d26031f..a486be8 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -16,8 +16,6 @@ struct Postler.EmoticonMapping {
public class Postler.Content : WebKit.WebView {
public Message message { get; private set; }
- string reply;
-
string? save_folder = null;
public string? last_location { get; set; }
@@ -78,9 +76,6 @@ public class Postler.Content : WebKit.WebView {
font-size: 100% !important;
margin: 0em; padding: 0.5em;
}
- .headers #extra_headers {
- display: none;
- }
* {
padding: 0em; margin: 0em;
}
@@ -411,7 +406,7 @@ public class Postler.Content : WebKit.WebView {
string format_header (string header, string? data) {
if (data != null)
- return "<b>%s</b> %s<br>".printf (header, data);
+ return "<br><b>%s</b> %s<br>".printf (header, data);
return "";
}
@@ -852,7 +847,7 @@ public class Postler.Content : WebKit.WebView {
list_unsubscribe = message.get_field ("list-unsubscribe");
if (list_unsubscribe != null) {
list_unsubscribe = Postler.Contact.address_from_string (list_unsubscribe);
- list_unsubscribe = linkify_address (list_unsubscribe);
+ list_unsubscribe = linkify_address ("<%s> %s".printf (_("Unsubscribe"), list_unsubscribe));
}
/* Emoticons */
@@ -875,13 +870,7 @@ public class Postler.Content : WebKit.WebView {
<div class="headers">
<b>%s</b><br>
%s
- <span style="float: right;"><a href="#more" id="more">%s</a></span>
- <span id="extra_headers">
- %s
- %s
%s
- %s
- </span>
</div>
<div class="body">%s</div>
"""
@@ -890,14 +879,7 @@ public class Postler.Content : WebKit.WebView {
content_stylesheet,
message.subject,
linkify_address (reply_uri (message, "Re: ", message.recipients)),
- reply != null || message.organization != null
- || message.application != null
- || list_unsubscribe != null
- ? "%s »".printf (_("More")) : "",
- format_header (_("Reply To:"), reply),
- format_header (_("Organization:"), message.organization),
- format_header (_("Application:"), message.application),
- format_header (_("Unsubscribe:"), list_unsubscribe),
+ format_header (_("Mailing List:"), list_unsubscribe),
body_markup),
"text/html", "UTF-8", "file://" + template_path);
} catch (GLib.Error error) {
@@ -1019,17 +1001,6 @@ public class Postler.Content : WebKit.WebView {
return true;
}
- if (uri.has_suffix ("#more")) {
- decision.ignore ();
- settings.set ("enable-scripts", true);
- execute_script ("""
- document.getElementById ('more').style.display = 'none';
- document.getElementById ('extra_headers').style.display = 'block';
- """);
- settings.set ("enable-scripts", false);
- return true;
- }
-
if (uri != null && uri.has_prefix ("about:"))
return false;
if (uri.has_prefix ("file:///"))
More information about the Xfce4-commits
mailing list