[gthumb] request dialog: show the buttons



commit 7db46af42045149192212ffaf24ecb0f8fe20987
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Nov 13 23:11:28 2013 +0100

    request dialog: show the buttons

 gthumb/gth-request-dialog.c |    7 +++++--
 gthumb/gtk-utils.c          |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-request-dialog.c b/gthumb/gth-request-dialog.c
index 04b293a..3f17327 100644
--- a/gthumb/gth-request-dialog.c
+++ b/gthumb/gth-request-dialog.c
@@ -161,12 +161,15 @@ _gth_request_dialog_construct (GthRequestDialog *self,
 
        /* Add buttons */
 
-       button = gtk_button_new_with_label (cancel_button_text);
+       button = gtk_button_new_with_mnemonic (cancel_button_text);
+       gtk_widget_show (button);
        gtk_dialog_add_action_widget (GTK_DIALOG (self),
                                      button,
                                      GTK_RESPONSE_CANCEL);
 
-       button = gtk_button_new_with_label (ok_button_text);
+       button = gtk_button_new_with_mnemonic (ok_button_text);
+       gtk_widget_set_can_default (button, TRUE);
+       gtk_widget_show (button);
        gtk_dialog_add_action_widget (GTK_DIALOG (self),
                                      button,
                                      GTK_RESPONSE_OK);
diff --git a/gthumb/gtk-utils.c b/gthumb/gtk-utils.c
index 3c72055..ba5d9b0 100644
--- a/gthumb/gtk-utils.c
+++ b/gthumb/gtk-utils.c
@@ -173,6 +173,7 @@ _gtk_yesno_dialog_new (GtkWindow        *parent,
        /**/
 
        button = gtk_button_new_with_mnemonic (yes_button_text);
+       gtk_widget_set_can_default (button, TRUE);
        gtk_widget_show (button);
        gtk_dialog_add_action_widget (GTK_DIALOG (d),
                                      button,


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