[sound-juicer] Set default response for alert dialogs
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Set default response for alert dialogs
- Date: Fri, 15 Aug 2014 13:25:31 +0000 (UTC)
commit b3feeeebec847db45adf7478ea3d8621c6d36a98
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Tue Aug 12 11:55:47 2014 +0100
Set default response for alert dialogs
Gtk focuses the left most button if there is no default which is not
normally the response the user is expecting if they just press enter.
src/sj-main.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/sj-main.c b/src/sj-main.c
index e8729d6..842adf5 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -198,6 +198,7 @@ G_MODULE_EXPORT gboolean on_delete_event (GtkWidget *widget, GdkEvent *event, gp
_("You are currently extracting a CD. Do you want to quit now or
continue?"));
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Quit"), GTK_RESPONSE_ACCEPT);
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Continue"), GTK_RESPONSE_REJECT);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_REJECT);
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1468,6 +1469,7 @@ static void profile_changed_cb (GSettings *settings, gchar *key, gpointer user_d
_("The currently selected audio profile is not available on your
installation."));
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Quit"), GTK_RESPONSE_REJECT);
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Change Profile"), GTK_RESPONSE_ACCEPT);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == GTK_RESPONSE_ACCEPT) {
gtk_widget_destroy (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]