[sushi] font-widget: always clear font name when updating face information
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] font-widget: always clear font name when updating face information
- Date: Tue, 1 May 2012 22:20:26 +0000 (UTC)
commit b9416ec4f7f3f022e594495aa28a8797ddc97d1b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue May 1 18:12:35 2012 -0400
font-widget: always clear font name when updating face information
src/libsushi/sushi-font-widget.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libsushi/sushi-font-widget.c b/src/libsushi/sushi-font-widget.c
index 7cfd3b9..2b4cc39 100644
--- a/src/libsushi/sushi-font-widget.c
+++ b/src/libsushi/sushi-font-widget.c
@@ -246,9 +246,10 @@ build_strings_for_face (SushiFontWidget *self)
if (!set_pango_sample_string (self))
self->priv->sample_string = random_string_from_available_chars (self->priv->face, 36);
- if (self->priv->face->family_name == NULL) {
- self->priv->font_name = NULL;
- } else {
+ g_free (self->priv->font_name);
+ self->priv->font_name = NULL;
+
+ if (self->priv->face->family_name != NULL) {
gchar *font_name =
g_strconcat (self->priv->face->family_name, " ",
self->priv->face->style_name, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]