[gdm/wip/initial-setup2: 12/32] initial-setup: perform copy from main loop



commit 23db2f10fa0bd5adc9ac159df70c77129459468a
Author: Ray Strode <rstrode redhat com>
Date:   Wed May 18 15:00:22 2011 -0400

    initial-setup: perform copy from main loop
    
    This way we continue to slave processes replies, etc,
    while the copy is going on.

 gui/initial-setup/gdm-initial-setup.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gui/initial-setup/gdm-initial-setup.c b/gui/initial-setup/gdm-initial-setup.c
index 926e447..f72e884 100644
--- a/gui/initial-setup/gdm-initial-setup.c
+++ b/gui/initial-setup/gdm-initial-setup.c
@@ -61,6 +61,8 @@ typedef struct {
 #define OBJ(type,name) ((type)gtk_builder_get_object(setup->builder,(name)))
 #define WID(name) OBJ(GtkWidget*,name)
 
+static void copy_account_data (SetupData *setup);
+static void begin_autologin (SetupData *setup);
 static void connect_to_slave (SetupData *setup);
 
 /* --- Welcome page --- */
@@ -1363,7 +1365,13 @@ prepare_location_page (SetupData *setup)
 static void
 close_cb (GtkAssistant *assi, gpointer data)
 {
-        gtk_main_quit ();
+        SetupData *setup = data;
+
+        g_settings_sync ();
+
+        copy_account_data (setup);
+
+        begin_autologin (setup);
 }
 
 static void
@@ -1385,7 +1393,7 @@ prepare_assistant (SetupData *setup)
         g_signal_connect (G_OBJECT (setup->assistant), "prepare",
                           G_CALLBACK (prepare_cb), setup);
         g_signal_connect (G_OBJECT (setup->assistant), "close",
-                          G_CALLBACK (close_cb), NULL);
+                          G_CALLBACK (close_cb), setup);
 
         connect_to_slave (setup);
         prepare_welcome_page (setup);
@@ -1497,11 +1505,5 @@ main (int argc, char *argv[])
 
         gtk_main ();
 
-        g_settings_sync ();
-
-        copy_account_data (setup);
-
-        begin_autologin (setup);
-
         return 0;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]