emojichooser: never show emoji chooser when input hint no-emoji is present
It's currently used only to not include the insert emoji option in the context menu, but it's still possible to show the emoji chooser in both GtkEntry and GtkTextView using the key bindings. See also https://bugs.webkit.org/show_bug.cgi?id=205609.
This commit is contained in:
committed by
Carlos Garcia Campos
parent
1bc188b1f4
commit
c6e5030c61
@@ -11093,6 +11093,9 @@ gtk_entry_insert_emoji (GtkEntry *entry)
|
||||
GtkWidget *chooser;
|
||||
GdkRectangle rect;
|
||||
|
||||
if (gtk_entry_get_input_hints (entry) & GTK_INPUT_HINT_NO_EMOJI)
|
||||
return;
|
||||
|
||||
if (gtk_widget_get_ancestor (GTK_WIDGET (entry), GTK_TYPE_EMOJI_CHOOSER) != NULL)
|
||||
return;
|
||||
|
||||
|
||||
@@ -11462,6 +11462,9 @@ gtk_text_view_insert_emoji (GtkTextView *text_view)
|
||||
GdkRectangle rect;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
if (gtk_text_view_get_input_hints (text_view) & GTK_INPUT_HINT_NO_EMOJI)
|
||||
return;
|
||||
|
||||
if (gtk_widget_get_ancestor (GTK_WIDGET (text_view), GTK_TYPE_EMOJI_CHOOSER) != NULL)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user