[Xfce4-commits] <postler:master> Parse multiple comma separated addresses per account
Christian Dywan
noreply at xfce.org
Sat Jun 19 06:50:04 CEST 2010
Updating branch refs/heads/master
to 985c0f460c988cd4a054c37472637b8f5f83ebe8 (commit)
from 15d30a403870a6d6f9caa07b9b951a5f0e725ed5 (commit)
commit 985c0f460c988cd4a054c37472637b8f5f83ebe8
Author: Christian Dywan <christian at twotoasts.de>
Date: Fri Jun 18 21:44:22 2010 +0200
Parse multiple comma separated addresses per account
postler/postler-accounts.vala | 2 +-
postler/postler-composer.vala | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/postler/postler-accounts.vala b/postler/postler-accounts.vala
index 677f793..6e9d19a 100644
--- a/postler/postler-accounts.vala
+++ b/postler/postler-accounts.vala
@@ -192,7 +192,7 @@ public class Postler.Accounts : GLib.Object {
throw new GLib.FileError.FAILED (_("No SSL certificates available"));
if (info.address != null) {
- string[] address_parts = info.address.split ("@", 2);
+ string[] address_parts = info.address.split_set ("@,", 3);
if (address_parts[0] == null || address_parts[1] == null)
throw new GLib.FileError.FAILED (_("Invalid address"));
if (info.receive == null)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index 80ff2af..584f45b 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -177,8 +177,15 @@ public class Postler.Composer : Gtk.Window {
info_iter != null; info_iter = info_iter.next) {
AccountInfo account_info = info_iter.data;
- if (account_info.address != null)
- combo_from.append_text (account_info.address);
+ if (account_info.address != null) {
+ string[] addresses = account_info.address.split (",");
+ if (addresses[0] != null) {
+ foreach (string address in addresses)
+ combo_from.append_text (address);
+ }
+ else
+ combo_from.append_text (account_info.address);
+ }
}
combo_from.set_active (0);
combo_from.grab_focus ();
More information about the Xfce4-commits
mailing list