[gtk+/gtk-3-10] Also revert enable-mnemonics code in gtkwindow, which was forgotten in commit 34cf40e95cb1f0bc4bb98b



commit 75a6a8fbe20560022f9c9f0b830f29edf05750ec
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 dd34f75..e9d13ed 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11181,6 +11181,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);
@@ -11197,6 +11198,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);
 
@@ -11205,8 +11207,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 
             {
@@ -11224,7 +11229,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]