[gnome-flashback/gnome-3-24] polkit: do not disable password entry



commit 6d78851ba34cb618b7882fd693fe58197e868fd3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Jun 21 14:51:22 2017 +0300

    polkit: do not disable password entry
    
    If we have already selected user we should not disable password
    entry and authentication button.
    
    https://launchpad.net/bugs/1698994

 .../libpolkit/flashback-polkit-dialog.c            |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gnome-flashback/libpolkit/flashback-polkit-dialog.c 
b/gnome-flashback/libpolkit/flashback-polkit-dialog.c
index 34fde6a..1e31597 100644
--- a/gnome-flashback/libpolkit/flashback-polkit-dialog.c
+++ b/gnome-flashback/libpolkit/flashback-polkit-dialog.c
@@ -494,11 +494,15 @@ setup_users_combobox (FlashbackPolkitDialog *dialog)
 
   if (g_strv_length (dialog->users) > 1)
     {
+      gboolean sensitive;
+
       setup_users_store (dialog);
 
-      gtk_widget_set_sensitive (dialog->prompt_label, FALSE);
-      gtk_widget_set_sensitive (dialog->password_entry, FALSE);
-      gtk_widget_set_sensitive (dialog->auth_button, FALSE);
+      sensitive = dialog->selected_user != NULL ? TRUE : FALSE;
+
+      gtk_widget_set_sensitive (dialog->prompt_label, sensitive);
+      gtk_widget_set_sensitive (dialog->password_entry, sensitive);
+      gtk_widget_set_sensitive (dialog->auth_button, sensitive);
     }
   else
     {


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