[Xfce4-commits] <postler:master> Use signature from ~/.signature if the file exists
Christian Dywan
noreply at xfce.org
Mon May 31 00:26:01 CEST 2010
Updating branch refs/heads/master
to 47a7ca44303833b81aad87847eec87623799a8df (commit)
from b82590bc597767f1d45d54497e59d60b530bbb6c (commit)
commit 47a7ca44303833b81aad87847eec87623799a8df
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun May 30 22:53:45 2010 +0200
Use signature from ~/.signature if the file exists
postler/postler-composer.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index fb7d4d2..f6b6378 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -163,7 +163,16 @@ public class Postler.Composer : Gtk.Window {
var settings = content.settings;
if (settings.get_class ().find_property ("enable-spell-checking") != null)
settings.set ("enable-spell-checking", true, null);
- content.clear ();
+
+ string body = "";
+ try {
+ string signature = "";
+ GLib.FileUtils.get_contents (Environment.get_home_dir () + "/.signature",
+ out signature);
+ body += "\n\n--\n" + signature;
+ } catch (GLib.FileError error) { }
+ content.load_string (body,
+ "text/plain", "UTF-8", "about:blank");
}
}
More information about the Xfce4-commits
mailing list