diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-06-04 12:43:57 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-06-04 12:43:57 +0200 |
commit | 5a7a427e189eb15ca761eb7d3c8d22bad67e233f (patch) | |
tree | 0ec0b06803c5bd60424db81dd61c6a9e56ea606e /lib/gtk-experiment-widgets | |
parent | a4245a50902ee9b399c9aa726fb5281e2719fe57 (diff) | |
download | gtk-vlc-player-5a7a427e189eb15ca761eb7d3c8d22bad67e233f.tar.gz |
fixed and simplified handling of default config values
they must be set after loading a keyfile since when setting them before they are overwritten when a keyfile can be loaded even if they
don't exist in the keyfile
Diffstat (limited to 'lib/gtk-experiment-widgets')
-rw-r--r-- | lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c b/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c index 3317f73..3898e30 100644 --- a/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c +++ b/lib/gtk-experiment-widgets/gtk-experiment-transcript-formats.c @@ -216,6 +216,7 @@ gtk_experiment_transcript_set_interactive_format(GtkExperimentTranscript *trans, default_attribs = pango_attr_list_new(); +#ifdef DEFAULT_INTERACTIVE_FORMAT_FONT font = pango_font_description_from_string(DEFAULT_INTERACTIVE_FORMAT_FONT); if (font != NULL) { attrib = pango_attr_font_desc_new(font); @@ -223,24 +224,25 @@ gtk_experiment_transcript_set_interactive_format(GtkExperimentTranscript *trans, pango_attr_list_insert(default_attribs, attrib); pango_font_description_free(font); } - - if (DEFAULT_INTERACTIVE_FORMAT_FGCOLOR != NULL && - pango_color_parse(&color, DEFAULT_INTERACTIVE_FORMAT_FGCOLOR)) { +#endif +#ifdef DEFAULT_INTERACTIVE_FORMAT_FGCOLOR + if (pango_color_parse(&color, DEFAULT_INTERACTIVE_FORMAT_FGCOLOR)) { attrib = pango_attr_foreground_new(color.red, color.green, color.blue); attrib->end_index = 1; pango_attr_list_insert(default_attribs, attrib); } - - if (DEFAULT_INTERACTIVE_FORMAT_BGCOLOR != NULL && - pango_color_parse(&color, DEFAULT_INTERACTIVE_FORMAT_BGCOLOR)) { +#endif +#ifdef DEFAULT_INTERACTIVE_FORMAT_BGCOLOR + if (pango_color_parse(&color, DEFAULT_INTERACTIVE_FORMAT_BGCOLOR)) { attrib = pango_attr_background_new(color.red, color.green, color.blue); attrib->end_index = 1; pango_attr_list_insert(default_attribs, attrib); } +#endif } gtk_experiment_transcript_free_format(fmt); |