summaryrefslogtreecommitdiff
path: root/gtk/gtkemojichooser.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-08-13 09:27:37 -0400
committerMatthias Clasen <mclasen@redhat.com>2017-08-13 09:27:37 -0400
commit82a24e7cf67462ffaa029c0d133c978df9e165f7 (patch)
treefa569c246de7a08ce296d7c52bf355b6ee8a5eb2 /gtk/gtkemojichooser.c
parentb52c1cb8dcdfc2d7ac374c53ab527cca0fba7be4 (diff)
downloadgtk+-82a24e7cf67462ffaa029c0d133c978df9e165f7.tar.gz
Don't update headings in an idle
It is not necessary since flow box invalidation is all synchronous currently. If that ever changes, this code will need adjustment.
Diffstat (limited to 'gtk/gtkemojichooser.c')
-rw-r--r--gtk/gtkemojichooser.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index a76c5e183d..8e92097b56 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -404,11 +404,9 @@ invalidate_section (EmojiSection *section)
gtk_flow_box_invalidate_filter (GTK_FLOW_BOX (section->box));
}
-static gboolean
-update_headings (gpointer data)
+static void
+update_headings (GtkEmojiChooser *chooser)
{
- GtkEmojiChooser *chooser = data;
-
gtk_widget_set_visible (chooser->people.heading, !chooser->people.empty);
gtk_widget_set_visible (chooser->body.heading, !chooser->body.empty);
gtk_widget_set_visible (chooser->nature.heading, !chooser->nature.empty);
@@ -427,8 +425,6 @@ update_headings (gpointer data)
gtk_stack_set_visible_child_name (GTK_STACK (chooser->stack), "empty");
else
gtk_stack_set_visible_child_name (GTK_STACK (chooser->stack), "list");
-
- return G_SOURCE_REMOVE;
}
static void
@@ -448,7 +444,7 @@ search_changed (GtkEntry *entry,
invalidate_section (&chooser->symbols);
invalidate_section (&chooser->flags);
- g_idle_add (update_headings, data);
+ update_headings (chooser);
}
static void