[Xfce4-commits] <postler:master> Show only one new account dialogue at a time

Christian Dywan noreply at xfce.org
Tue Jan 4 05:52:09 CET 2011


Updating branch refs/heads/master
         to 8ad387cd633510b4e0967119b0397166d8bc3352 (commit)
       from a14c2997c0b2b4451cfcf836a42302580fe56395 (commit)

commit 8ad387cd633510b4e0967119b0397166d8bc3352
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Jan 4 04:53:07 2011 +0100

    Show only one new account dialogue at a time

 postler/postler-bureau.vala |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 346099c..aaf368a 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -340,8 +340,18 @@ public class Postler.Bureau : Gtk.Window {
         Postler.App.spawn_module ("source", content.last_location);
     }
 
+    static AccountSetup? setup = null;
     void action_account_new () {
-        AccountSetup.new_account ().done.connect ((setup, info) => {
+        if (setup != null) {
+            setup.present ();
+            return;
+        }
+
+        setup = AccountSetup.new_account ();
+        setup.destroy.connect (() => {
+            setup = null;
+        });
+        setup.done.connect ((setup, info) => {
             accounts.add_info (info);
             client.fetch (info.name);
             folders.populate ();



More information about the Xfce4-commits mailing list