[gtk+/font-selection-new: 49/73] GtkFontSelection: Populate face names in the deprecated face list
- From: Alberto Ruiz <aruiz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/font-selection-new: 49/73] GtkFontSelection: Populate face names in the deprecated face list
- Date: Sat, 7 May 2011 18:16:20 +0000 (UTC)
commit effff9bc226b5da888346c4c7bdc0c1967793fb5
Author: Alberto Ruiz <aruiz gnome org>
Date: Thu Apr 28 02:11:07 2011 +0100
GtkFontSelection: Populate face names in the deprecated face list
gtk/gtkfontsel.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index a42a627..5d566a1 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -995,12 +995,26 @@ static void
update_face_model (GtkFontSelection *fontsel)
{
GtkFontSelectionPrivate *priv = fontsel->priv;
-}
+ PangoFontFace **faces;
+ int i, n_faces;
-static void
-update_size_model (GtkFontSelection *fontsel)
-{
- GtkFontSelectionPrivate *priv = fontsel->priv;
+ pango_font_family_list_faces (priv->family, &faces, &n_faces);
+ pango_font_family_get_name (priv->family);
+
+ gtk_list_store_clear (priv->_face_model);
+
+ for (i=0; i<n_faces; i++)
+ {
+ GtkTreeIter iter;
+
+ gtk_list_store_append (priv->_face_model, &iter);
+ gtk_list_store_set (priv->_face_model, &iter,
+ 0, faces[i],
+ 1, pango_font_face_get_face_name (faces[i]),
+ -1);
+ }
+
+ g_free (faces);
}
static void
@@ -1041,6 +1055,7 @@ initialize_deprecated_widgets (GtkFontSelection *fontsel)
gtk_tree_view_append_column (GTK_TREE_VIEW (priv->face_list), col);
populate_font_model (fontsel);
+ cursor_changed_cb (priv->family_face_list, priv);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]