Accepting request 203324 from home:dimstar:branches:GNOME:Factory

- Add gtk3-enable-mnemonics.patch: Revert missing parts to allow
  apps to override disabling mnemonics (like gnome-terminal does)
  (bgo#709764, bgo#708346, bnc#844929).

Also wanted for 13.1

OBS-URL: https://build.opensuse.org/request/show/203324
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk3?expand=0&rev=137
This commit is contained in:
Richard Brown 2013-10-15 10:51:26 +00:00 committed by Git OBS Bridge
parent 189819e3bc
commit 1ef1f67f15
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,58 @@
From ebe152f1557fa413eec39892728306afbba74a75 Mon Sep 17 00:00:00 2001
From: Johannes Wellhöfer <j dot wellhoefer at gmx dot de>
Date: Sun, 13 Oct 2013 16:15:18 +0200
Subject: [PATCH] Also revert enable-mnemonics code in gtkwindow, which was
forgotten in commit 34cf40e95cb1f0bc4bb98bb14edb03dd86f1dab3.
---
gtk/gtkwindow.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5374d3f..a1a2896 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -11110,6 +11110,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);
@@ -11126,6 +11127,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);
@@ -11134,8 +11136,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
{
@@ -11153,7 +11158,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
--
1.8.4

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 14 21:01:04 UTC 2013 - dimstar@opensuse.org
- Add gtk3-enable-mnemonics.patch: Revert missing parts to allow
apps to override disabling mnemonics (like gnome-terminal does)
(bgo#709764, bgo#708346, bnc#844929).
-------------------------------------------------------------------
Fri Oct 11 15:39:06 UTC 2013 - dimstar@opensuse.org

View File

@ -44,6 +44,8 @@ Patch1: gtk3-path-local.patch
Patch3: gtk3-bnc130159-bgo319483-async-font-selection.patch
# PATCH-FIX-UPSTREAM gtk3-find-wayland-includedir.patch bgo#696507 zaitor@opensuse.org -- Make configure find wayland include files.
Patch4: gtk3-find-wayland-includedir.patch
# PATCH-FIX-UPSTREAM gtk3-enable-mnemonics.patch bgo#709764 bgo#708346 bnc#844929 dimstar@opensuse.org -- Revert missing parts to allow apps to override disabling mnemonics (like gnome-terminal does)
Patch5: gtk3-enable-mnemonics.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
@ -315,6 +317,7 @@ cp -a %{S:1} .
%if %{build_wayland_backend}
%patch4 -p1
%endif
%patch5 -p1
%build
# Needed for patch1 and patch4