Updating branch refs/heads/master to 4eed87e476523c28e3cc257e3fba992db4cb262d (commit) from 82497faf94705b3e67923e51aac2002a77761110 (commit)
commit 4eed87e476523c28e3cc257e3fba992db4cb262d Author: Christian Dywan <christ...@twotoasts.de> Date: Sun Nov 28 19:45:10 2010 +0100 Show an error when trying to send with no accounts postler/postler-composer.vala | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala index 1041160..d5c26c6 100644 --- a/postler/postler-composer.vala +++ b/postler/postler-composer.vala @@ -82,7 +82,17 @@ public class Postler.Composer : Gtk.Window { return; } - string sender = combo_from.get_active_text (); + string? sender = combo_from.get_active_text (); + if (sender == null) { + var dialog = new Gtk.MessageDialog (this, 0, + Gtk.MessageType.ERROR, Gtk.ButtonsType.NONE, + _("You have not configured any accounts for sending.")); + dialog.add_buttons (Gtk.STOCK_OK, Gtk.ResponseType.OK); + dialog.run (); + dialog.destroy (); + return; + } + string[] from = Postler.Messages.parse_address (sender); foreach (var info in accounts.get_infos ()) { if (info.address != null && from[1] in info.address) { _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits