summaryrefslogtreecommitdiff
path: root/src/terminal-screen.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-06-17 01:06:23 +0200
committerZenWalker <[email protected]>2018-06-27 11:51:36 +0200
commit078d0b1fdac2e50dfa4411b612e78a4be134e47d (patch)
tree7493f3e26a005c2d1b32d46c2a9cc7ad7e208767 /src/terminal-screen.c
parent7708278f7ecdaeeffc857d2fd19ec8ab170fa3d3 (diff)
downloadmate-terminal-078d0b1fdac2e50dfa4411b612e78a4be134e47d.tar.bz2
mate-terminal-078d0b1fdac2e50dfa4411b612e78a4be134e47d.tar.xz
term-screen: avoid deprecated 'gtk_style_context_get_background_color'
Diffstat (limited to 'src/terminal-screen.c')
-rw-r--r--src/terminal-screen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 037d247..64c3f44 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1071,6 +1071,7 @@ update_color_scheme (TerminalScreen *screen)
const gchar *bg_image_file;
double bg_alpha = 1.0;
GdkRGBA fg, bg;
+ GdkRGBA *c;
guint n_colors;
GtkStyleContext *context;
GError *error = NULL;
@@ -1079,7 +1080,13 @@ update_color_scheme (TerminalScreen *screen)
gtk_style_context_save (context);
gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fg);
- gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, &bg);
+
+ gtk_style_context_get (context, GTK_STATE_FLAG_NORMAL,
+ GTK_STYLE_PROPERTY_BACKGROUND_COLOR,
+ &c, NULL);
+ bg = *c;
+ gdk_rgba_free (c);
+
gtk_style_context_restore (context);
bold_rgba = NULL;