[gnome-control-center] user-accounts: UmAccountDialog shouldn't be valid when shown



commit 5fbce5f8daddb72cf08341e6f729c0d51413d702
Author: Stef Walter <stefw gnome org>
Date:   Tue Jun 12 10:35:45 2012 +0200

    user-accounts: UmAccountDialog shouldn't be valid when shown
    
    The user needs to enter some data before the dialog's 'Create'
    button can be clicked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677928

 panels/user-accounts/um-account-dialog.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
index 40a64e9..4301d1b 100644
--- a/panels/user-accounts/um-account-dialog.c
+++ b/panels/user-accounts/um-account-dialog.c
@@ -279,7 +279,9 @@ um_account_dialog_show (UmAccountDialog     *self,
         gtk_window_present (GTK_WINDOW (self));
         gtk_widget_grab_focus (self->name_entry);
 
-        self->valid_name = self->valid_username = TRUE;
+        self->valid_name = self->valid_username = FALSE;
+        gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK,
+                                           self->valid_name && self->valid_username);
 
         self->user_created_callback = user_created_callback;
         self->user_created_data = user_created_data;



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