[file-roller] password dialog: set the Ok button as suggested action



commit 6990cc91f24ded744181848e2937a19b935cd9be
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Feb 15 17:39:43 2015 +0100

    password dialog: set the Ok button as suggested action

 src/dlg-ask-password.c |    3 +++
 src/dlg-password.c     |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/dlg-ask-password.c b/src/dlg-ask-password.c
index 492331e..41a3f5b 100644
--- a/src/dlg-ask-password.c
+++ b/src/dlg-ask-password.c
@@ -126,6 +126,9 @@ dlg_ask_password__common (FrWindow       *window,
                                NULL);
        gtk_dialog_set_default_response (GTK_DIALOG (data->dialog),
                                         GTK_RESPONSE_OK);
+       gtk_style_context_add_class (gtk_widget_get_style_context (gtk_dialog_get_widget_for_response 
(GTK_DIALOG (data->dialog), GTK_RESPONSE_OK)),
+                                    GTK_STYLE_CLASS_SUGGESTED_ACTION);
+
        data->password_entry = GET_WIDGET ("password_entry");
 
        /* Set widgets data. */
diff --git a/src/dlg-password.c b/src/dlg-password.c
index 25273f9..81d10f5 100644
--- a/src/dlg-password.c
+++ b/src/dlg-password.c
@@ -102,6 +102,8 @@ dlg_password (GtkWidget *widget,
                                _GTK_LABEL_SAVE, GTK_RESPONSE_OK,
                                NULL);
        gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK);
+       gtk_style_context_add_class (gtk_widget_get_style_context (gtk_dialog_get_widget_for_response 
(GTK_DIALOG (data->dialog), GTK_RESPONSE_OK)),
+                                    GTK_STYLE_CLASS_SUGGESTED_ACTION);
 
        basename = _g_file_get_display_basename (fr_archive_get_file (window->archive));
        title = g_strdup_printf (_("Enter a password for \"%s\""), basename);


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