diff options
Diffstat (limited to 'gtk/gtkfontchooserwidget.c')
-rw-r--r-- | gtk/gtkfontchooserwidget.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index d021da48aa..ee5f50f0a2 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -2115,11 +2115,7 @@ update_font_features (GtkFontChooserWidget *fontchooser) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (item->feat)) && strcmp (item->name, "xxxx") != 0) { - if (s->len > 0) - g_string_append (s, ", "); - g_string_append (s, "\""); - g_string_append (s, item->name); - g_string_append (s, "\" 1"); + g_string_append_printf (s, "%s\"%s\" %d", s->len > 0 ? ", " : "", item->name, 1); } } else if (GTK_IS_CHECK_BUTTON (item->feat)) @@ -2127,14 +2123,9 @@ update_font_features (GtkFontChooserWidget *fontchooser) if (gtk_check_button_get_inconsistent (GTK_CHECK_BUTTON (item->feat))) continue; - if (s->len > 0) - g_string_append (s, ", "); - g_string_append (s, ", \""); - g_string_append (s, item->name); - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (item->feat))) - g_string_append (s, "\" 1"); - else - g_string_append (s, " 0"); + g_string_append_printf (s, "%s\"%s\" %d", + s->len > 0 ? ", " : "", item->name, + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (item->feat))); } } |