EmojiChooser: Check the 1st button before 1st show
authorDaniel Boles <dboles@src.gnome.org>
Sat, 2 Sep 2017 17:47:47 +0000 (18:47 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 4 Sep 2017 21:33:24 +0000 (22:33 +0100)
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

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

gtk/gtkemojichooser.c

index 00d4fdcdb71c71d295c55c3f00c4adfb564c5412..7d8c589a04ca48af43105953df99c696712e3dcc 100644 (file)
@@ -589,6 +589,9 @@ gtk_emoji_chooser_init (GtkEmojiChooser *chooser)
 
   populate_emoji_chooser (chooser);
   populate_recent_section (chooser);
+
+  /* We scroll to the top on show, so check the right button for the 1st time */
+  gtk_widget_set_state_flags (chooser->recent.button, GTK_STATE_FLAG_CHECKED, FALSE);
 }
 
 static void