[Xfce4-commits] <postler:master> Clear selection after copying the message body
Christian Dywan
noreply at xfce.org
Sun Dec 26 04:50:05 CET 2010
Updating branch refs/heads/master
to 51b354e2d943ee81ef4ca6b937cc4861e036c4c9 (commit)
from ce7ae80cc4c18358be64bccd1623725c59a4431e (commit)
commit 51b354e2d943ee81ef4ca6b937cc4861e036c4c9
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Dec 25 12:40:38 2010 +0100
Clear selection after copying the message body
postler/postler-composer.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 535f7d9..e5644bb 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -139,6 +139,8 @@ public class Postler.Composer : Gtk.Window {
content.copy_clipboard ();
var clipboard = content.get_clipboard (Gdk.SELECTION_CLIPBOARD);
string body = clipboard.wait_for_text ();
+ clear_selection ();
+
if (attachments.get_iter_first (out att_iter)) {
string boundary = GLib.Checksum.compute_for_string (
GLib.ChecksumType.MD5,
@@ -247,6 +249,12 @@ public class Postler.Composer : Gtk.Window {
printf (text.replace ("'", "\\'")));
}
+ void clear_selection () {
+ content.execute_script ("""
+ window.getSelection ().removeAllRanges ();
+ """);
+ }
+
void action_quote () {
if (!content.can_copy_clipboard ())
content.select_all ();
More information about the Xfce4-commits
mailing list