Updating branch refs/heads/master to ba06b69b85e6574f038940aa75f85df9613bbb32 (commit) from 4968be5f4d9b7b87d12c42ccbf22f246d364f19f (commit)
commit ba06b69b85e6574f038940aa75f85df9613bbb32 Author: Christian Dywan <christ...@twotoasts.de> Date: Wed Jul 21 22:39:57 2010 +0200 Provide advanced account properties in an expander postler/postler-accountsetup.vala | 41 +++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/postler/postler-accountsetup.vala b/postler/postler-accountsetup.vala index 03f5385..7caeef8 100644 --- a/postler/postler-accountsetup.vala +++ b/postler/postler-accountsetup.vala @@ -12,10 +12,17 @@ public class Postler.AccountSetup : Gtk.Dialog { Gtk.SizeGroup sizegroup; Gtk.Box content_area; + Gtk.Box advanced_area; Gtk.Entry realname; Gtk.Entry address; Gtk.Entry password; + Gtk.Entry organization; + + Gtk.Entry receiver; + Gtk.Entry username; + Gtk.Entry prefix; + Gtk.Entry sender; AccountInfo info; @@ -37,15 +44,39 @@ public class Postler.AccountSetup : Gtk.Dialog { password.visibility = false; password.text = info.password ?? ""; add_label_entry (_("Password"), password); + organization = new Gtk.Entry (); + organization.text = info.organization ?? ""; + add_label_entry (_("Organization"), organization); + + var expander = new Gtk.Expander (_("Advanced")); + content_area.pack_start (expander, false, false, 4); + advanced_area = new Gtk.VBox (false, 4); + expander.add (advanced_area); + + receiver = new Gtk.Entry (); + receiver.text = info.receive ?? ""; + add_label_entry (_("Receiving Server"), receiver, true); + username = new Gtk.Entry (); + username.text = info.username ?? ""; + add_label_entry (_("Username"), username, true); + prefix = new Gtk.Entry (); + prefix.text = info.prefix ?? ""; + add_label_entry (_("Prefix"), prefix, true); + sender = new Gtk.Entry (); + sender.text = info.send ?? ""; + add_label_entry (_("Sending Server"), sender, true); content_area.show_all (); add_button (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL); response.connect (responded); } - void add_label_entry (string text, Gtk.Entry entry) { + void add_label_entry (string text, Gtk.Entry entry, bool advanced=false) { var hbox = new Gtk.HBox (false, 0); - content_area.pack_start (hbox, false, false, 4); + if (advanced) + advanced_area.pack_start (hbox, false, false, 0); + else + content_area.pack_start (hbox, false, false, 4); var label = new Gtk.Label.with_mnemonic (text); label.xalign = 0; sizegroup.add_widget (label); @@ -61,6 +92,12 @@ public class Postler.AccountSetup : Gtk.Dialog { info.realname = realname.text; info.address = address.text; info.password = password.text; + + info.organization = organization.text != "" ? organization.text : null; + info.receive = receiver.text != "" ? receiver.text : null; + info.username = username.text != "" ? username.text : null; + info.prefix = prefix.text != "" ? prefix.text : null; + info.send = sender.text != "" ? sender.text : null; done (info); } destroy (); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits