diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-03-31 15:03:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-03-31 15:35:20 -0400 |
commit | 6f5675ef3c60275af8ac62f4ce26fcfedf3c32e4 (patch) | |
tree | 8fe240ed4687ed7b4c058e5b3b783f19351aaf34 /gtk | |
parent | 396513183b5ef531a97fea0c72e2c280e07b83cc (diff) | |
download | gtk+-6f5675ef3c60275af8ac62f4ce26fcfedf3c32e4.tar.gz |
Stop using deprecated style context api
Use the non-deprecated one it wraps, instead.
Yes, this is cheating...
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkflowbox.c | 4 | ||||
-rw-r--r-- | gtk/gtkpopover.c | 4 | ||||
-rw-r--r-- | gtk/gtkstylecontext.c | 4 | ||||
-rw-r--r-- | gtk/gtktextdisplay.c | 10 | ||||
-rw-r--r-- | gtk/gtktextutil.c | 4 | ||||
-rw-r--r-- | gtk/gtktextview.c | 4 |
6 files changed, 8 insertions, 22 deletions
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c index 65c491fe4b..015a48e8ab 100644 --- a/gtk/gtkflowbox.c +++ b/gtk/gtkflowbox.c @@ -2382,9 +2382,7 @@ gtk_flow_box_snapshot (GtkWidget *widget, cairo_append_path (cr, path); cairo_path_destroy (path); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_border_color (context, &border_color); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "border-color", &border_color, NULL); gtk_style_context_get_border (context, &border); cairo_set_line_width (cr, border.left); diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c index a39270c5a7..dba89e511c 100644 --- a/gtk/gtkpopover.c +++ b/gtk/gtkpopover.c @@ -1310,10 +1310,8 @@ gtk_popover_snapshot (GtkWidget *widget, if (border.bottom > 0) { GdkRGBA border_color; -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_border_color (context, &border_color); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "border-color", &border_color, NULL); gtk_popover_apply_tail_path (popover, cr); gdk_cairo_set_source_rgba (cr, &border_color); diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index e765c852dc..81384cc0c9 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -1992,9 +1992,7 @@ _gtk_style_context_get_attributes (AtkAttributeSet *attributes, GdkRGBA color; gchar *value; -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, &color); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "background-color", &color, NULL); value = g_strdup_printf ("%u,%u,%u", (guint) ceil (color.red * 65536 - color.red), (guint) ceil (color.green * 65536 - color.green), diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index 4e6c49fd16..3f38112c88 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -580,11 +580,9 @@ render_para (GtkTextRenderer *text_renderer, selection_node = gtk_text_view_get_selection_node ((GtkTextView*)text_renderer->widget); gtk_style_context_save_to_node (context, selection_node); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, &selection); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "background-color", &selection, NULL); - gtk_style_context_restore (context); + gtk_style_context_restore (context); do { @@ -775,9 +773,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS { GdkRGBA color; -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, &color); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "background-color", &color, NULL); gdk_cairo_set_source_rgba (cr, &color); diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c index 9858bec5ad..651b92abd9 100644 --- a/gtk/gtktextutil.c +++ b/gtk/gtktextutil.c @@ -250,9 +250,7 @@ set_attributes_from_style (GtkStyleContext *context, if (!values->appearance.fg_rgba) values->appearance.fg_rgba = gdk_rgba_copy (&black); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, values->appearance.bg_rgba); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "background-color", values->appearance.bg_rgba, NULL); gtk_style_context_get_color (context, values->appearance.fg_rgba); if (values->font) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 0f378211e8..00fa5ce0dd 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -7310,9 +7310,7 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view, context = gtk_widget_get_style_context (GTK_WIDGET (text_view)); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - gtk_style_context_get_background_color (context, values->appearance.bg_rgba); -G_GNUC_END_IGNORE_DEPRECATIONS + gtk_style_context_get (context, "background-color", values->appearance.bg_rgba, NULL); gtk_style_context_get_color (context, values->appearance.fg_rgba); if (values->font) |