|
|
e6f176 |
From 12a00f024c16a4540d5f457389fada2a4886d884 Mon Sep 17 00:00:00 2001
|
|
|
e6f176 |
From: Matthias Clasen <mclasen@redhat.com>
|
|
|
e6f176 |
Date: Tue, 25 May 2021 16:07:58 -0400
|
|
|
e6f176 |
Subject: [PATCH] entry: Only offer Emoji if requested
|
|
|
e6f176 |
|
|
|
e6f176 |
Only offer the "Insert Emoji" context menu when input
|
|
|
e6f176 |
hints explicitly suggest supporting Emoji.
|
|
|
e6f176 |
---
|
|
|
e6f176 |
gtk/gtkentry.c | 2 +-
|
|
|
e6f176 |
gtk/gtktextview.c | 2 +-
|
|
|
e6f176 |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
e6f176 |
|
|
|
e6f176 |
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
|
|
|
e6f176 |
index a01684101f..1f5a790ccc 100644
|
|
|
e6f176 |
--- a/gtk/gtkentry.c
|
|
|
e6f176 |
+++ b/gtk/gtkentry.c
|
|
|
e6f176 |
@@ -9591,7 +9591,7 @@ popup_targets_received (GtkClipboard *clipboard,
|
|
|
e6f176 |
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
|
|
e6f176 |
|
|
|
e6f176 |
if (info_entry_priv->show_emoji_icon ||
|
|
|
e6f176 |
- (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_NO_EMOJI) == 0)
|
|
|
e6f176 |
+ (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_EMOJI) != 0)
|
|
|
e6f176 |
{
|
|
|
e6f176 |
menuitem = gtk_menu_item_new_with_mnemonic (_("Insert _Emoji"));
|
|
|
e6f176 |
gtk_widget_set_sensitive (menuitem,
|
|
|
e6f176 |
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
|
|
|
e6f176 |
index e0b1e20e87..eb53843fa6 100644
|
|
|
e6f176 |
--- a/gtk/gtktextview.c
|
|
|
e6f176 |
+++ b/gtk/gtktextview.c
|
|
|
e6f176 |
@@ -9521,7 +9521,7 @@ popup_targets_received (GtkClipboard *clipboard,
|
|
|
e6f176 |
gtk_widget_show (menuitem);
|
|
|
e6f176 |
gtk_menu_shell_append (GTK_MENU_SHELL (priv->popup_menu), menuitem);
|
|
|
e6f176 |
|
|
|
e6f176 |
- if ((gtk_text_view_get_input_hints (text_view) & GTK_INPUT_HINT_NO_EMOJI) == 0)
|
|
|
e6f176 |
+ if ((gtk_text_view_get_input_hints (text_view) & GTK_INPUT_HINT_EMOJI) != 0)
|
|
|
e6f176 |
{
|
|
|
e6f176 |
menuitem = gtk_menu_item_new_with_mnemonic (_("Insert _Emoji"));
|
|
|
e6f176 |
gtk_widget_set_sensitive (menuitem, can_insert);
|
|
|
e6f176 |
--
|
|
|
e6f176 |
2.31.1
|
|
|
e6f176 |
|