From 25c4acbd157e183dd8135b9d40fdd3140198cd95 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Fri, 8 Nov 2013 23:17:22 +0100 Subject: [PATCH] app: always use D for the shortcut in the quit dialog (do not take it from the button's mnemonic) --- app/dialogs/quit-dialog.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/dialogs/quit-dialog.c b/app/dialogs/quit-dialog.c index 4659310c34..771c032d95 100644 --- a/app/dialogs/quit-dialog.c +++ b/app/dialogs/quit-dialog.c @@ -124,7 +124,6 @@ quit_close_all_dialog_new (Gimp *gimp, GimpContainerTreeView *tree_view; GtkCellRenderer *renderer; GtkWidget *dnd_widget; - GtkWidget *tmp_label; GtkAccelGroup *accel_group; GClosure *closure; gint rows; @@ -174,13 +173,10 @@ quit_close_all_dialog_new (Gimp *gimp, gtk_window_add_accel_group (GTK_WINDOW (dialog->dialog), accel_group); g_object_unref (accel_group); - tmp_label = gtk_label_new_with_mnemonic (_("_Discard Changes")); - dialog->accel_key = gtk_label_get_mnemonic_keyval (GTK_LABEL (tmp_label)); - dialog->accel_mods = gimp_get_primary_accelerator_mask (); - gtk_widget_destroy (tmp_label); - closure = g_closure_new_object (sizeof (GClosure), G_OBJECT (dialog->dialog)); g_closure_set_marshal (closure, quit_close_all_dialog_accel_marshal); + gtk_accelerator_parse ("D", + &dialog->accel_key, &dialog->accel_mods); gtk_accel_group_connect (accel_group, dialog->accel_key, dialog->accel_mods, 0, closure);