summaryrefslogtreecommitdiff
path: root/gtk/gtk_gui.c
diff options
context:
space:
mode:
authorRob Kendrick <rjek@netsurf-browser.org>2006-08-24 17:39:41 +0000
committerRob Kendrick <rjek@netsurf-browser.org>2006-08-24 17:39:41 +0000
commit3d37607cda69cc23910b850aeb6c0f8fdae9b1b6 (patch)
treea4e54a4601395437749babe0a992da703ea9f22b /gtk/gtk_gui.c
parent939e7711aa42ba9479ce69b88ccb2fe212df99ef (diff)
downloadnetsurf-3d37607cda69cc23910b850aeb6c0f8fdae9b1b6.tar.gz
netsurf-3d37607cda69cc23910b850aeb6c0f8fdae9b1b6.tar.bz2
nsgtk font defaults in case of no Choices file, misc file cleanups
svn path=/trunk/netsurf/; revision=2890
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r--gtk/gtk_gui.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c
index 05799e160..a08d7d048 100644
--- a/gtk/gtk_gui.c
+++ b/gtk/gtk_gui.c
@@ -165,6 +165,16 @@ void gui_init(int argc, char** argv)
options_file_location = strdup(buf);
options_read(buf);
+ /* check what the font settings are, setting them to a default font
+ * if they're not set - stops Pango whinging
+ */
+#define SETFONTDEFAULT(x,y) (x) = ((x) != NULL) ? (x) : strdup((y))
+ SETFONTDEFAULT(option_font_sans, "Sans");
+ SETFONTDEFAULT(option_font_serif, "Serif");
+ SETFONTDEFAULT(option_font_mono, "Monospace");
+ SETFONTDEFAULT(option_font_cursive, "Serif");
+ SETFONTDEFAULT(option_font_fantasy, "Serif");
+
nsgtk_options_init();
if (!option_cookie_file) {