summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/terminal-profile.c44
1 files changed, 28 insertions, 16 deletions
diff --git a/src/terminal-profile.c b/src/terminal-profile.c
index b991105..d40ff85 100644
--- a/src/terminal-profile.c
+++ b/src/terminal-profile.c
@@ -520,26 +520,38 @@ terminal_profile_reset_property_internal (TerminalProfile *profile,
/* A few properties don't have defaults via the param spec; set them explicitly */
switch (pspec->param_id)
{
- case PROP_FOREGROUND_COLOR:
- case PROP_BOLD_COLOR:
- g_value_set_boxed (value, &DEFAULT_FOREGROUND_COLOR);
- break;
+ case PROP_FOREGROUND_COLOR:
+ case PROP_BOLD_COLOR:
+ {
+ GdkRGBA color;
- case PROP_BACKGROUND_COLOR:
- g_value_set_boxed (value, &DEFAULT_BACKGROUND_COLOR);
- break;
+ if (!gdk_rgba_parse (&color, DEFAULT_FOREGROUND_COLOR))
+ return;
+ color.alpha = 1.0;
+ g_value_set_boxed (value, &color);
+ break;
+ }
+ case PROP_BACKGROUND_COLOR:
+ {
+ GdkRGBA color;
- case PROP_FONT:
- g_value_take_boxed (value, pango_font_description_from_string (DEFAULT_FONT));
- break;
+ if (!gdk_rgba_parse (&color, DEFAULT_BACKGROUND_COLOR))
+ return;
+ color.alpha = 1.0;
+ g_value_set_boxed (value, &color);
+ break;
+ }
+ case PROP_FONT:
+ g_value_take_boxed (value, pango_font_description_from_string (DEFAULT_FONT));
+ break;
- case PROP_PALETTE:
- set_value_from_palette (value, DEFAULT_PALETTE, TERMINAL_PALETTE_SIZE);
- break;
+ case PROP_PALETTE:
+ set_value_from_palette (value, DEFAULT_PALETTE, TERMINAL_PALETTE_SIZE);
+ break;
- default:
- g_param_value_set_default (pspec, value);
- break;
+ default:
+ g_param_value_set_default (pspec, value);
+ break;
}
if (notify)