From eaceb9ec9bd713d33f1b71fc6a7a30809fbbb488 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 13 Jan 2022 10:19:08 +0000 Subject: [PATCH] No entry emoji context menu (#2025439) Resolves: #2025439 --- ...-3.24.30-entry-no-emoji-context-menu.patch | 41 +++++++++++++++++++ gtk3.spec | 8 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gtk3-3.24.30-entry-no-emoji-context-menu.patch diff --git a/gtk3-3.24.30-entry-no-emoji-context-menu.patch b/gtk3-3.24.30-entry-no-emoji-context-menu.patch new file mode 100644 index 0000000..162e2a5 --- /dev/null +++ b/gtk3-3.24.30-entry-no-emoji-context-menu.patch @@ -0,0 +1,41 @@ +From 12a00f024c16a4540d5f457389fada2a4886d884 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Tue, 25 May 2021 16:07:58 -0400 +Subject: [PATCH] entry: Only offer Emoji if requested + +Only offer the "Insert Emoji" context menu when input +hints explicitly suggest supporting Emoji. +--- + gtk/gtkentry.c | 2 +- + gtk/gtktextview.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c +index a01684101f..1f5a790ccc 100644 +--- a/gtk/gtkentry.c ++++ b/gtk/gtkentry.c +@@ -9591,7 +9591,7 @@ popup_targets_received (GtkClipboard *clipboard, + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); + + if (info_entry_priv->show_emoji_icon || +- (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_NO_EMOJI) == 0) ++ (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_EMOJI) != 0) + { + menuitem = gtk_menu_item_new_with_mnemonic (_("Insert _Emoji")); + gtk_widget_set_sensitive (menuitem, +diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c +index e0b1e20e87..eb53843fa6 100644 +--- a/gtk/gtktextview.c ++++ b/gtk/gtktextview.c +@@ -9521,7 +9521,7 @@ popup_targets_received (GtkClipboard *clipboard, + gtk_widget_show (menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem); + +- if ((gtk_text_view_get_input_hints (text_view) & GTK_INPUT_HINT_NO_EMOJI) == 0) ++ if ((gtk_text_view_get_input_hints (text_view) & GTK_INPUT_HINT_EMOJI) != 0) + { + menuitem = gtk_menu_item_new_with_mnemonic (_("Insert _Emoji")); + gtk_widget_set_sensitive (menuitem, can_insert); +-- +2.31.1 + diff --git a/gtk3.spec b/gtk3.spec index 865c7db..4732114 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -19,7 +19,7 @@ Name: gtk3 Version: 3.24.30 -Release: 3%{?dist} +Release: 4%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -29,6 +29,9 @@ Source0: http://download.gnome.org/sources/gtk+/3.24/gtk+-%{version}.tar.xz # Upstream patch to make reftests work in a vm Patch1: 0001-reftests-Enforce-default-settings.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2025439 +Patch2: gtk3-3.24.30-entry-no-emoji-context-menu.patch + BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -308,6 +311,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests/ %changelog +* Thu Jan 13 2022 David King - 3.24.30-4 +- No entry emoji context menu (#2025439) + * Mon Aug 09 2021 Mohan Boddu - 3.24.30-3 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688