diff options
author | raveit65 <[email protected]> | 2016-06-10 20:22:24 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-06-11 13:03:24 +0200 |
commit | 22ddefc332ecd935558976e25ca65ce9e98c4578 (patch) | |
tree | e81e82af01b36b7ca2876ff64358ca2dac244312 | |
parent | d85c96ad64439b97ece44f7da927338c85cf6d19 (diff) | |
download | mate-terminal-22ddefc332ecd935558976e25ca65ce9e98c4578.tar.bz2 mate-terminal-22ddefc332ecd935558976e25ca65ce9e98c4578.tar.xz |
terminal-profile: replace deprecated GDK_TYPE_COLOR
-rw-r--r-- | src/terminal-profile.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/terminal-profile.c b/src/terminal-profile.c index b8a7fba..f1cbfbd 100644 --- a/src/terminal-profile.c +++ b/src/terminal-profile.c @@ -367,7 +367,7 @@ set_value_from_palette (GValue *ret_value, { GValue *value = g_value_array_get_nth (array, i); - g_value_init (value, GDK_TYPE_COLOR); + g_value_init (value, GDK_TYPE_RGBA); g_value_set_boxed (value, &colors[i]); } @@ -376,7 +376,7 @@ set_value_from_palette (GValue *ret_value, { GValue *value = g_value_array_get_nth (array, i); - g_value_init (value, GDK_TYPE_COLOR); + g_value_init (value, GDK_TYPE_RGBA); g_value_set_boxed (value, &DEFAULT_PALETTE[i]); } @@ -399,14 +399,14 @@ values_equal (GParamSpec *pspec, if (g_param_values_cmp (pspec, va, vb) == 0) return TRUE; - if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_COLOR) + if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA) return rgba_equal (g_value_get_boxed (va), g_value_get_boxed (vb)); if (G_PARAM_SPEC_VALUE_TYPE (pspec) == PANGO_TYPE_FONT_DESCRIPTION) return pango_font_description_equal (g_value_get_boxed (va), g_value_get_boxed (vb)); if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) && - G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_COLOR) + G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA) { GValueArray *ara, *arb; guint i; @@ -585,7 +585,7 @@ terminal_profile_gsettings_notify_cb (GSettings *settings, g_value_set_enum (&value, g_settings_get_enum (settings, key)); } - else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_COLOR) + else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA) { GdkRGBA color; @@ -621,7 +621,7 @@ terminal_profile_gsettings_notify_cb (GSettings *settings, g_value_set_int (&value, g_settings_get_int(settings, key)); } else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) && - G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_COLOR) + G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA) { char **color_strings; GdkRGBA *colors; @@ -744,7 +744,7 @@ terminal_profile_gsettings_changeset_add (TerminalProfile *profile, g_settings_set_enum (changeset, key, eval->value); } - else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_COLOR) + else if (G_PARAM_SPEC_VALUE_TYPE (pspec) == GDK_TYPE_RGBA) { GdkRGBA *color; char str[16]; @@ -779,7 +779,7 @@ terminal_profile_gsettings_changeset_add (TerminalProfile *profile, else if (G_IS_PARAM_SPEC_INT (pspec)) g_settings_set_int (changeset, key, g_value_get_int (value)); else if (G_IS_PARAM_SPEC_VALUE_ARRAY (pspec) && - G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_COLOR) + G_PARAM_SPEC_VALUE_TYPE (G_PARAM_SPEC_VALUE_ARRAY (pspec)->element_spec) == GDK_TYPE_RGBA) { GValueArray *array; GString *string; @@ -1274,10 +1274,10 @@ terminal_profile_class_init (TerminalProfileClass *klass) TERMINAL_PROFILE_PROPERTY_BOOLEAN (USE_SYSTEM_FONT, DEFAULT_USE_SYSTEM_FONT, KEY_USE_SYSTEM_FONT); TERMINAL_PROFILE_PROPERTY_BOOLEAN (USE_THEME_COLORS, DEFAULT_USE_THEME_COLORS, KEY_USE_THEME_COLORS); - TERMINAL_PROFILE_PROPERTY_BOXED (BACKGROUND_COLOR, GDK_TYPE_COLOR, KEY_BACKGROUND_COLOR); - TERMINAL_PROFILE_PROPERTY_BOXED (BOLD_COLOR, GDK_TYPE_COLOR, KEY_BOLD_COLOR); + TERMINAL_PROFILE_PROPERTY_BOXED (BACKGROUND_COLOR, GDK_TYPE_RGBA, KEY_BACKGROUND_COLOR); + TERMINAL_PROFILE_PROPERTY_BOXED (BOLD_COLOR, GDK_TYPE_RGBA, KEY_BOLD_COLOR); TERMINAL_PROFILE_PROPERTY_BOXED (FONT, PANGO_TYPE_FONT_DESCRIPTION, KEY_FONT); - TERMINAL_PROFILE_PROPERTY_BOXED (FOREGROUND_COLOR, GDK_TYPE_COLOR, KEY_FOREGROUND_COLOR); + TERMINAL_PROFILE_PROPERTY_BOXED (FOREGROUND_COLOR, GDK_TYPE_RGBA, KEY_FOREGROUND_COLOR); /* 0.0 = normal bg, 1.0 = all black bg, 0.5 = half darkened */ TERMINAL_PROFILE_PROPERTY_DOUBLE (BACKGROUND_DARKNESS, 0.0, 1.0, DEFAULT_BACKGROUND_DARKNESS, KEY_BACKGROUND_DARKNESS); @@ -1304,7 +1304,7 @@ terminal_profile_class_init (TerminalProfileClass *klass) TERMINAL_PROFILE_PROPERTY_STRING (VISIBLE_NAME, _(DEFAULT_VISIBLE_NAME), KEY_VISIBLE_NAME); TERMINAL_PROFILE_PROPERTY_STRING (WORD_CHARS, DEFAULT_WORD_CHARS, KEY_WORD_CHARS); - TERMINAL_PROFILE_PROPERTY_VALUE_ARRAY_BOXED (PALETTE, "palette-color", GDK_TYPE_COLOR, KEY_PALETTE); + TERMINAL_PROFILE_PROPERTY_VALUE_ARRAY_BOXED (PALETTE, "palette-color", GDK_TYPE_RGBA, KEY_PALETTE); } /* Semi-Public API */ |