diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-01-24 01:10:12 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-01-24 01:10:12 +0000 |
commit | 2dff8d760594661114615366c7cb51133fec0c10 (patch) | |
tree | d71608abb24be34d21cac0900d64a6ed01142af1 /ui/gtk/font_utils.c | |
parent | 70755ffa17fc454b4e32c5c586ebbddda0e482e4 (diff) |
Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.
Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.
svn path=/trunk/; revision=47240
Diffstat (limited to 'ui/gtk/font_utils.c')
-rw-r--r-- | ui/gtk/font_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/gtk/font_utils.c b/ui/gtk/font_utils.c index c4964d37c5..02eb079230 100644 --- a/ui/gtk/font_utils.c +++ b/ui/gtk/font_utils.c @@ -215,7 +215,7 @@ user_font_apply(void) { PangoFontDescription *old_r_font = NULL; /* convert font name to reflect the zoom level */ - gui_font_name = font_zoom(prefs.gui_font_name); + gui_font_name = font_zoom(prefs.gui_gtk2_font_name); if (gui_font_name == NULL) { /* * This means the font name isn't an XLFD font name. @@ -359,18 +359,18 @@ void font_init(void) #endif /* Try to load the regular fixed-width font */ - m_r_font = pango_font_description_from_string(prefs.gui_font_name); + m_r_font = pango_font_description_from_string(prefs.gui_gtk2_font_name); if (m_r_font == NULL) { /* XXX - pop this up as a dialog box? no */ fprintf(stderr, "wireshark: Warning: font %s not found - defaulting to Monospace 9\n", - prefs.gui_font_name); + prefs.gui_gtk2_font_name); if ((m_r_font = pango_font_description_from_string("Monospace 9")) == NULL) { fprintf(stderr, "wireshark: Error: font Monospace 9 not found\n"); exit(1); } - g_free(prefs.gui_font_name); - prefs.gui_font_name = g_strdup("Monospace 9"); + g_free(prefs.gui_gtk2_font_name); + prefs.gui_gtk2_font_name = g_strdup("Monospace 9"); } /* Call this for the side-effects that set_fonts() produces */ |