[Xfce4-commits] <postler:master> Avoid leading or traling comma in address string

Christian Dywan noreply at xfce.org
Fri Feb 25 21:48:02 CET 2011


Updating branch refs/heads/master
         to 7211e8fd9bef76482860f728155c9913d507a580 (commit)
       from 617fabdfdddf9dd60efbe50c47c1b1683fe6a5a4 (commit)

commit 7211e8fd9bef76482860f728155c9913d507a580
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Feb 25 20:19:42 2011 +0100

    Avoid leading or traling comma in address string

 postler/postler-recipiententry.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/postler/postler-recipiententry.vala b/postler/postler-recipiententry.vala
index 5ef408e..33d0191 100644
--- a/postler/postler-recipiententry.vala
+++ b/postler/postler-recipiententry.vala
@@ -24,7 +24,11 @@ namespace Postler {
                 real_text = "";
                 foreach (var button in get_children ())
                     real_text += "," + button.tooltip_text;
+                if (real_text.has_prefix (","))
+                    real_text = real_text.substring (1, -1);
                 real_text += entry.text;
+                if (real_text.has_suffix (","))
+                    real_text = real_text.slice (0, -1);
             }
             return real_text;
         }



More information about the Xfce4-commits mailing list