[Xfce4-commits] <postler:master> Servers and username update when editing address
Christian Dywan
noreply at xfce.org
Tue Mar 1 23:32:01 CET 2011
Updating branch refs/heads/master
to 999b8c28aa85209597c38c2c8cd5f954fc841fc8 (commit)
from 66004d3eba582b8c12978281d01fdafbf260ccf2 (commit)
commit 999b8c28aa85209597c38c2c8cd5f954fc841fc8
Author: Sergio Spinatelli <spinatelli.sergio at gmail.com>
Date: Tue Mar 1 10:19:06 2011 +0100
Servers and username update when editing address
Fixes: https://bugs.launchpad.net/postler/+bug/726974
postler/postler-accountsetup.vala | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/postler/postler-accountsetup.vala b/postler/postler-accountsetup.vala
index 74d25ca..9b69433 100644
--- a/postler/postler-accountsetup.vala
+++ b/postler/postler-accountsetup.vala
@@ -29,6 +29,7 @@ public class Postler.AccountWidget : Gtk.VBox {
Elementary.Entry sender;
Elementary.Entry sender_port;
+ bool address_changed = false;
AccountInfo info;
public AccountWidget (AccountInfo? account_info=null) {
@@ -146,6 +147,7 @@ public class Postler.AccountWidget : Gtk.VBox {
}
bool on_focus_out () {
+ address_changed = (info.address != address.get_text () || address_changed);
set_servers_from_address ();
return false;
}
@@ -157,11 +159,11 @@ public class Postler.AccountWidget : Gtk.VBox {
string user = domain.split ("@") [0];
domain = domain.split ("@") [1];
- if (receiver.get_text () == "")
+ if (receiver.get_text () == "" || address_changed)
receiver.set_text ("imap." + domain);
- if (sender.get_text () == "")
+ if (sender.get_text () == "" || address_changed)
sender.set_text ("smtp." + domain);
- if (username.get_text () == "")
+ if (username.get_text () == "" || address_changed)
username.set_text (user);
}
More information about the Xfce4-commits
mailing list