[gtk+/gtk-3-4] GtkFontSelection: Populate list models atomically
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] GtkFontSelection: Populate list models atomically
- Date: Fri, 1 Jun 2012 21:13:59 +0000 (UTC)
commit 344d5cd1b4cc57be26e8132e0169c4a0eb4a6697
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 1 16:57:45 2012 -0400
GtkFontSelection: Populate list models atomically
This is just a cosmetic fix.
gtk/deprecated/gtkfontsel.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/gtk/deprecated/gtkfontsel.c b/gtk/deprecated/gtkfontsel.c
index c0835c2..ca5c6e0 100644
--- a/gtk/deprecated/gtkfontsel.c
+++ b/gtk/deprecated/gtkfontsel.c
@@ -821,12 +821,11 @@ gtk_font_selection_show_available_fonts (GtkFontSelection *fontsel)
const gchar *name = pango_font_family_get_name (families[i]);
GtkTreeIter iter;
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter,
- FAMILY_COLUMN, families[i],
- FAMILY_NAME_COLUMN, name,
- -1);
-
+ gtk_list_store_insert_with_values (model, &iter, -1,
+ FAMILY_COLUMN, families[i],
+ FAMILY_NAME_COLUMN, name,
+ -1);
+
if (i == 0 || !g_ascii_strcasecmp (name, "sans"))
{
match_family = families[i];
@@ -923,11 +922,10 @@ gtk_font_selection_show_available_styles (GtkFontSelection *fontsel)
GtkTreeIter iter;
const gchar *str = pango_font_face_get_face_name (faces[i]);
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter,
- FACE_COLUMN, faces[i],
- FACE_NAME_COLUMN, str,
- -1);
+ gtk_list_store_insert_with_values (model, &iter, -1,
+ FACE_COLUMN, faces[i],
+ FACE_NAME_COLUMN, str,
+ -1);
if (i == 0)
{
@@ -1034,8 +1032,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel,
{
GtkTreeIter iter;
- gtk_list_store_append (model, &iter);
- gtk_list_store_set (model, &iter, SIZE_COLUMN, font_sizes[i], -1);
+ gtk_list_store_insert_with_values (model, &iter, -1,
+ SIZE_COLUMN, font_sizes[i], -1);
if (font_sizes[i] * PANGO_SCALE == priv->size)
set_cursor_to_iter (GTK_TREE_VIEW (priv->size_list), &iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]