[Xfce4-commits] <postler:master> Only show Add Contact button if Dexter is installed
Christian Dywan
noreply at xfce.org
Tue Aug 9 01:28:01 CEST 2011
Updating branch refs/heads/master
to 5eac6b9cd2e147a791d4415b28305124a4b121cb (commit)
from 197eed2b52d976b60c236ba422220d48bc35da61 (commit)
commit 5eac6b9cd2e147a791d4415b28305124a4b121cb
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Aug 9 01:27:15 2011 +0200
Only show Add Contact button if Dexter is installed
postler/dexter.vala | 4 ++++
postler/postler-content.vala | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/postler/dexter.vala b/postler/dexter.vala
index a813b5e..a135984 100644
--- a/postler/dexter.vala
+++ b/postler/dexter.vala
@@ -36,6 +36,10 @@ namespace Dexter {
null, null);
} catch (GLib.Error error) { }
}
+ public static bool available { get {
+ return Environment.find_program_in_path ("dexter") != null;
+ }
+ }
public void edit_contact (string name, string email_address) {
try {
if (service == null)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 589ff9f..0396cee 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -750,7 +750,7 @@ public class Postler.Content : WebKit.WebView {
string? sender_name = null;
if (child.can_reply_personally) {
sender_name = Contact.name_from_string (child.sender);
- if (sender_name != _("You")) {
+ if (sender_name != _("You") && Dexter.Dexter.available) {
reply_chunk.append_printf ("""
<span class="contact">%s</span>
""".printf (
More information about the Xfce4-commits
mailing list