diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-03 21:21:58 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-04 08:39:18 -0500 |
commit | 8a5b6d422f900033d80f7eafa3945d502a52658f (patch) | |
tree | 1bef9acfb4c0445701bd7d47355b1f3c2637c7eb /gtk/gtkfontchooserwidget.c | |
parent | 33162eee1a7ae22d4a7d5e572c8713958475ba9a (diff) | |
download | gtk+-8a5b6d422f900033d80f7eafa3945d502a52658f.tar.gz |
fontchooser: fix feature formatting
There was a " missing, causing some features to be missed.
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))); } } |