[gtk+/gtk-3-22] EmojiChooser: Check the 1st button before 1st show



commit 02e310a1d51e66381d5dad127b59e388b184b09c
Author: Daniel Boles <dboles src gnome org>
Date:   Sat Sep 2 18:47:47 2017 +0100

    EmojiChooser: Check the 1st button before 1st show
    
    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 |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 00d4fdc..7d8c589 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]