[gtk+] Also revert enable-mnemonics code in gtkwindow, which was forgotten in commit 34cf40e95cb1f0bc4bb98b
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Also revert enable-mnemonics code in gtkwindow, which was forgotten in commit 34cf40e95cb1f0bc4bb98b
- Date: Tue, 25 Mar 2014 00:18:16 +0000 (UTC)
commit 46cfebfe9707102952d343591bfe4c48d03189e4
Author: Johannes Wellhöfer <j dot wellhoefer at gmx dot de>
Date: Sun Oct 13 16:15:18 2013 +0200
Also revert enable-mnemonics code in gtkwindow, which was forgotten in commit
34cf40e95cb1f0bc4bb98bb14edb03dd86f1dab3.
https://bugzilla.gnome.org/show_bug.cgi?id=708346
gtk/gtkwindow.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 80bab40..83964b3 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11800,6 +11800,7 @@ gtk_window_activate_key (GtkWindow *window,
GtkKeyHash *key_hash;
GtkWindowKeyEntry *found_entry = NULL;
gboolean enable_accels;
+ gboolean enable_mnemonics;
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -11816,6 +11817,7 @@ gtk_window_activate_key (GtkWindow *window,
event->group);
g_object_get (gtk_widget_get_settings (GTK_WIDGET (window)),
+ "gtk-enable-mnemonics", &enable_mnemonics,
"gtk-enable-accels", &enable_accels,
NULL);
@@ -11824,8 +11826,11 @@ gtk_window_activate_key (GtkWindow *window,
GtkWindowKeyEntry *entry = tmp_list->data;
if (entry->is_mnemonic)
{
- found_entry = entry;
- break;
+ if( enable_mnemonics)
+ {
+ found_entry = entry;
+ break;
+ }
}
else
{
@@ -11843,7 +11848,8 @@ gtk_window_activate_key (GtkWindow *window,
{
if (found_entry->is_mnemonic)
{
- return gtk_window_mnemonic_activate (window, found_entry->keyval,
+ if( enable_mnemonics)
+ return gtk_window_mnemonic_activate (window, found_entry->keyval,
found_entry->modifiers);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]