[geary] Strip quote chrome from selection when replying
- From: Robert Schroll <rschroll src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Strip quote chrome from selection when replying
- Date: Wed, 8 Oct 2014 22:13:24 +0000 (UTC)
commit 3b173a0672254a3c816d5180eedfc6e3d6dd525f
Author: Robert Schroll <rschroll gmail com>
Date: Fri Sep 19 02:15:15 2014 -0400
Strip quote chrome from selection when replying
https://bugzilla.gnome.org/show_bug.cgi?id=712912
.../conversation-viewer/conversation-viewer.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-viewer.vala
b/src/client/conversation-viewer/conversation-viewer.vala
index a7103a8..0148335 100644
--- a/src/client/conversation-viewer/conversation-viewer.vala
+++ b/src/client/conversation-viewer/conversation-viewer.vala
@@ -249,6 +249,15 @@ public class ConversationViewer : Gtk.Box {
include_dummy = true;
}
dummy.append_child(range.clone_contents());
+
+ // Remove the chrome we put around quotes, leaving only the blockquote element.
+ WebKit.DOM.NodeList quotes = dummy.query_selector_all(".quote_container");
+ for (int i = 0; i < quotes.length; i++) {
+ WebKit.DOM.Element div = (WebKit.DOM.Element) quotes.item(i);
+ WebKit.DOM.Element blockquote = div.query_selector("blockquote");
+ div.get_parent_element().replace_child(blockquote, div);
+ }
+
quote = include_dummy ? dummy.get_outer_html() : dummy.get_inner_html();
return anchor_email;
} catch (Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]