From e2b9649f99852889e22dc3c0e39ae90c2d3a1ebd Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 22 Sep 2016 15:09:48 -0300 Subject: build: ignore unsolvable deprecations throughout the canvas code It's not feasible to complerely rewrite the way canvas view works, so lets just ignore the deprecations for the time being. Notice that these functions will probable be removed on Gtk+ 4.0 and eventually we'll need to create a new canvas based on GtkFlowBox. --- src/nautilus-canvas-container.c | 2 ++ src/nautilus-canvas-item.c | 2 ++ src/nautilus-properties-window.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c index 26b21e7e1..c40f53f93 100644 --- a/src/nautilus-canvas-container.c +++ b/src/nautilus-canvas-container.c @@ -2717,8 +2717,10 @@ get_rubber_color (NautilusCanvasContainer *container, gtk_style_context_save (context); gtk_style_context_add_class (context, GTK_STYLE_CLASS_RUBBERBAND); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_style_context_get_background_color (context, GTK_STATE_FLAG_NORMAL, bgcolor); gtk_style_context_get_border_color (context, GTK_STATE_FLAG_NORMAL, bordercolor); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_style_context_restore (context); } diff --git a/src/nautilus-canvas-item.c b/src/nautilus-canvas-item.c index a103d34a4..bc982769d 100644 --- a/src/nautilus-canvas-item.c +++ b/src/nautilus-canvas-item.c @@ -1299,6 +1299,7 @@ real_map_surface (NautilusCanvasItem *canvas_item) { style = gtk_widget_get_style_context (GTK_WIDGET (canvas)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (gtk_widget_has_focus (GTK_WIDGET (canvas))) { gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED, &color); @@ -1307,6 +1308,7 @@ real_map_surface (NautilusCanvasItem *canvas_item) { gtk_style_context_get_background_color (style, GTK_STATE_FLAG_ACTIVE, &color); } +G_GNUC_END_IGNORE_DEPRECATIONS old_pixbuf = temp_pixbuf; temp_pixbuf = eel_create_colorized_pixbuf (temp_pixbuf, &color); diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c index 769c4f5ba..574f023fb 100644 --- a/src/nautilus-properties-window.c +++ b/src/nautilus-properties-window.c @@ -2882,11 +2882,13 @@ paint_slice (GtkWidget *widget, state = gtk_style_context_get_state (context); gtk_style_context_get_border (context, state, &border); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_style_context_save (context); gtk_style_context_add_class (context, style_class); gtk_style_context_get_background_color (context, state, &fill); gtk_style_context_get_border_color (context, state, &stroke); gtk_style_context_restore (context); +G_GNUC_END_IGNORE_DEPRECATIONS width = gtk_widget_get_allocated_width (widget); height = gtk_widget_get_allocated_height (widget); -- cgit v1.2.1