[geary/wip/728002-webkit2: 76/96] Reimplement inserting additional replies into the composer.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/728002-webkit2: 76/96] Reimplement inserting additional replies into the composer.
- Date: Sat, 14 Jan 2017 12:18:13 +0000 (UTC)
commit 6798d1fa99371371367f1405374450a7fb56c2d9
Author: Michael James Gratton <mike vee net>
Date: Wed Jan 4 15:27:36 2017 +1100
Reimplement inserting additional replies into the composer.
src/client/composer/composer-web-view.vala | 6 +++---
src/client/composer/composer-widget.vala | 2 +-
src/client/web-process/util-composer.vala | 5 -----
3 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/client/composer/composer-web-view.vala b/src/client/composer/composer-web-view.vala
index 09fa718..a3f1c0f 100644
--- a/src/client/composer/composer-web-view.vala
+++ b/src/client/composer/composer-web-view.vala
@@ -160,10 +160,10 @@ public class ComposerWebView : ClientWebView {
}
/**
- * Inserts some text at the current cursor location, quoting it.
+ * Inserts some HTML at the current cursor location.
*/
- public void insert_quote(string text) {
- // XXX
+ public void insert_html(string markup) {
+ execute_editing_command_with_argument("insertHTML", markup);
}
/**
diff --git a/src/client/composer/composer-widget.vala b/src/client/composer/composer-widget.vala
index 31de05e..be5e2e6 100644
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@ -938,7 +938,7 @@ public class ComposerWidget : Gtk.EventBox {
if (referred != null && quote != null && quote != this.last_quote) {
this.last_quote = quote;
// Always use reply styling, since forward styling doesn't work for inline quotes
- this.editor.insert_quote(
+ this.editor.insert_html(
Geary.RFC822.Utils.quote_email_for_reply(referred, quote, Geary.RFC822.TextFormat.HTML)
);
diff --git a/src/client/web-process/util-composer.vala b/src/client/web-process/util-composer.vala
index 4d87eaf..ad12337 100644
--- a/src/client/web-process/util-composer.vala
+++ b/src/client/web-process/util-composer.vala
@@ -19,11 +19,6 @@ namespace Util.Composer {
private const string EDITING_DELETE_CONTAINER_ID = "WebKit-Editing-Delete-Container";
- public void insert_quote(WebKit.WebPage page, string quote) {
- WebKit.DOM.Document document = page.get_dom_document();
- document.exec_command("insertHTML", false, quote);
- }
-
public string get_block_quote_representation(WebKit.WebPage page) {
return Util.DOM.get_text_representation(page.get_dom_document(), "blockquote");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]