[accounts-dialog] Add a 'done' state



commit c50f213e88079383952791ee58e71164078fb916
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Feb 4 15:28:04 2010 -0500

    Add a 'done' state
    
    To track the state that we are in when passwd has not thrown an error
    but not exited yet either.

 src/run-passwd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/run-passwd.c b/src/run-passwd.c
index 5afabd9..c5a9b8f 100644
--- a/src/run-passwd.c
+++ b/src/run-passwd.c
@@ -50,6 +50,7 @@ typedef enum {
         PASSWD_STATE_AUTH,              /* Passwd is asking for our current password */
         PASSWD_STATE_NEW,               /* Passwd is asking for our new password */
         PASSWD_STATE_RETYPE,            /* Passwd is asking for our retyped new password */
+        PASSWD_STATE_DONE,              /* Passwd succeeded but has not yet exited */
         PASSWD_STATE_ERR                /* Passwd reported an error but has not yet exited */
 } PasswdState;
 
@@ -472,6 +473,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
                                 if (strstr (str->str, "successfully") != NULL) {
                                         /* Hooray! */
 
+                                        passswd_handler->backend_state = PASSWD_STATE_DONE;
                                         /* Trigger callback to update status */
                                         if (passwd_handler->chpasswd_cb)
                                                 passwd_handler->chpasswd_cb (passwd_handler,



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