[gtk+] fontchooser: Reselect font when it's unfiltered
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] fontchooser: Reselect font when it's unfiltered
- Date: Thu, 22 Sep 2011 21:47:21 +0000 (UTC)
commit 38af387ee31419a328f35ab855c3d9212ecef5d4
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 21 05:49:43 2011 +0200
fontchooser: Reselect font when it's unfiltered
gtk/gtkfontchooserwidget.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index 346c9a4..cf118d4 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -240,6 +240,13 @@ gtk_font_chooser_widget_get_property (GObject *object,
}
static void
+gtk_font_chooser_widget_refilter_font_list (GtkFontChooserWidget *fontchooser)
+{
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (fontchooser->priv->filter_model));
+ gtk_font_chooser_widget_ensure_selection (fontchooser);
+}
+
+static void
text_changed_cb (GtkEntry *entry,
GParamSpec *pspec,
GtkFontChooserWidget *fc)
@@ -277,7 +284,7 @@ text_changed_cb (GtkEntry *entry,
}
}
- gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->filter_model));
+ gtk_font_chooser_widget_refilter_font_list (fc);
}
static void
@@ -1185,7 +1192,7 @@ gtk_font_chooser_widget_set_filter_func (GtkFontChooser *chooser,
priv->filter_data = data;
priv->filter_data_destroy = destroy;
- gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->filter_model));
+ gtk_font_chooser_widget_refilter_font_list (fontchooser);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]