diff --git a/gtk/gtkfontchooser.c b/gtk/gtkfontchooser.c
index ad30511d87..15dc03d112 100644
--- a/gtk/gtkfontchooser.c
+++ b/gtk/gtkfontchooser.c
@@ -131,7 +131,7 @@ struct _GtkFontSelectionDialogPrivate
#define FONT_STYLE_LIST_WIDTH 170
#define FONT_SIZE_LIST_WIDTH 60
-#define ROW_FORMAT_STRING "%s %s\n%s"
+#define ROW_FORMAT_STRING "%s %s\n%s"
/* These are what we use as the standard font sizes, for the size list.
*/
@@ -393,7 +393,7 @@ gtk_font_selection_populate_list (GtkTreeView *treeview)
GtkListStore *model;
PangoFontFamily *match_family;
PangoFontFamily **families;
- gint n_families, n_faces, i, j;
+ gint n_families, i;
GtkTreeIter match_row;
GString *tmp = g_string_new (NULL);
const gchar* row_format = ROW_FORMAT_STRING;
@@ -407,32 +407,53 @@ gtk_font_selection_populate_list (GtkTreeView *treeview)
qsort (families, n_families, sizeof (PangoFontFamily *), cmp_families);
gtk_list_store_clear (model);
+
+ /* FIXME: Get theme color here */
for (i=0; istr,
- -1);
-
- if (i == 0 || !g_ascii_strcasecmp (name, "sans"))
+ for (j=0; jstr,
+ -1);
+
+ if ((i == 0 && j == 0) ||
+ (!g_ascii_strcasecmp (face_name, "sans") && j == 0))
+ {
+ match_family = families[i];
+ match_row = iter;
+ }
+
+ pango_font_description_free(pango_desc);
+ g_free (font_desc);
}
+
+ g_free (faces);
}
set_cursor_to_iter (treeview, &match_row);
@@ -460,7 +481,6 @@ gtk_font_selection_bootstrap_fontlist (GtkTreeView* treeview)
col = gtk_tree_view_column_new_with_attributes ("Family",
gtk_cell_renderer_text_new (),
"markup", TEXT_COLUMN,
- "font", FAMILY_NAME_COLUMN,
NULL);
gtk_tree_view_append_column (treeview, col);