don't use "normal" in the gtk font string
authorDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 18:38:11 +0000 (18:38 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 25 May 2007 18:38:11 +0000 (18:38 +0000)
src/handlers.c

index cb0ae51fec90666fc3d4364d6fd58e5ce8964ead..a6f856fa3f10c6bb0da6ae87e974b3ab97dd3740 100644 (file)
@@ -511,6 +511,14 @@ void setup_font_active(GtkWidget *w)
     name = g_strdup(names[0]);
     g_strfreev(names);
 
+    /* don't use "normal" in the gtk string */
+    if (!g_ascii_strcasecmp(weight, "normal")) {
+        g_free(weight); weight = g_strdup("");
+    }
+    if (!g_ascii_strcasecmp(slant, "normal")) {
+        g_free(slant); slant = g_strdup("");
+    }
+
     fontstring = g_strdup_printf("%s %s %s %s", name, weight, slant, size);
     gtk_font_button_set_font_name(GTK_FONT_BUTTON(w), fontstring);
     g_free(fontstring);