diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-08-10 20:15:26 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-08-10 22:43:18 -0400 |
commit | 61ffb517bc9211c7007d9274a74c6a7c23a3a112 (patch) | |
tree | f2d33377f8fd854379c1c6c94d66da14cc5db4c4 /gtk/gtkfontchooserwidget.c | |
parent | e548c7139496067dca2757124963e62ce115b4d1 (diff) | |
download | gtk+-61ffb517bc9211c7007d9274a74c6a7c23a3a112.tar.gz |
font chooser: Make Escape stop search
Diffstat (limited to 'gtk/gtkfontchooserwidget.c')
-rw-r--r-- | gtk/gtkfontchooserwidget.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index a0db55c753..6f1701f80c 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -301,13 +301,19 @@ gtk_font_chooser_widget_refilter_font_list (GtkFontChooserWidget *fontchooser) static void text_changed_cb (GtkEntry *entry, - GParamSpec *pspec, GtkFontChooserWidget *fc) { gtk_font_chooser_widget_refilter_font_list (fc); } static void +stop_search_cb (GtkEntry *entry, + GtkFontChooserWidget *fc) +{ + gtk_entry_set_text (entry, ""); +} + +static void size_change_cb (GtkAdjustment *adjustment, gpointer user_data) { @@ -580,6 +586,7 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass) gtk_widget_class_bind_template_child_private (widget_class, GtkFontChooserWidget, size_slider); gtk_widget_class_bind_template_callback (widget_class, text_changed_cb); + gtk_widget_class_bind_template_callback (widget_class, stop_search_cb); gtk_widget_class_bind_template_callback (widget_class, cursor_changed_cb); gtk_widget_class_bind_template_callback (widget_class, row_activated_cb); gtk_widget_class_bind_template_callback (widget_class, gtk_font_chooser_widget_set_cell_size); |