[gtk+] Drop support for one-stop gradients



commit d3727817ffa07272ae0442b76d82ff15d1327d71
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 17 16:40:45 2017 -0400

    Drop support for one-stop gradients
    
    These have been deprecated for a while. Time to make this an
    error for GTK+ 4.

 gtk/gtkcssimagelinear.c |    7 +++----
 gtk/gtkcssimageradial.c |    7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkcssimagelinear.c b/gtk/gtkcssimagelinear.c
index e25c1b6..0ba5f0b 100644
--- a/gtk/gtkcssimagelinear.c
+++ b/gtk/gtkcssimagelinear.c
@@ -384,10 +384,9 @@ gtk_css_image_linear_parse (GtkCssImage  *image,
 
   if (linear->stops->len < 2)
     {
-      _gtk_css_parser_error_full (parser,
-                                  GTK_CSS_PROVIDER_ERROR_DEPRECATED,
-                                  "Using one color stop with %s() is deprecated.",
-                                  linear->repeating ? "repeating-linear-gradient" : "linear-gradient");
+      _gtk_css_parser_error (parser, "%s() needs at least 2 color stops.",
+                             linear->repeating ? "repeating-linear-gradient" : "linear-gradient");
+      return FALSE;
     }
 
   if (!_gtk_css_parser_try (parser, ")", TRUE))
diff --git a/gtk/gtkcssimageradial.c b/gtk/gtkcssimageradial.c
index 585d136..305e690 100644
--- a/gtk/gtkcssimageradial.c
+++ b/gtk/gtkcssimageradial.c
@@ -379,10 +379,9 @@ gtk_css_image_radial_parse (GtkCssImage  *image,
 
   if (radial->stops->len < 2)
     {
-      _gtk_css_parser_error_full (parser,
-                                  GTK_CSS_PROVIDER_ERROR_DEPRECATED,
-                                  "Using one color stop with %s() is deprecated.",
-                                  radial->repeating ? "repeating-radial-gradient" : "radial-gradient");
+      _gtk_css_parser_error (parser, "%s() needs at least 2 color stops.",
+                             radial->repeating ? "repeating-radial-gradient" : "radial-gradient");
+      return FALSE;
     }
 
   if (!_gtk_css_parser_try (parser, ")", TRUE))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]