Entry: Only open emoji picker on 2ndary icon click
authorDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 19:26:48 +0000 (20:26 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 28 Aug 2017 19:31:02 +0000 (20:31 +0100)
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938

gtk/gtkentry.c

index 0939f2e2eefa02e2291496f5ee46cf7f04530734..d7975df12110b88aafefebd1d4c7c349a4033ae7 100644 (file)
@@ -11061,7 +11061,8 @@ pick_emoji (GtkEntry *entry,
             GdkEvent *event,
             gpointer  data)
 {
-  gtk_entry_choose_emoji (entry);
+  if (icon == GTK_ENTRY_ICON_SECONDARY)
+    gtk_entry_choose_emoji (entry);
 }
 
 static void