[gtk+/wip/cssvalue: 49/141] cssparser: Use _gtk_css_parser_error_full()



commit c342c2ad83166f075cfbd6eb1ff6bc0740a10799
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 26 18:54:30 2012 +0200

    cssparser: Use _gtk_css_parser_error_full()

 gtk/gtkcssparser.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c
index 8d3912e..1d2ec8f 100644
--- a/gtk/gtkcssparser.c
+++ b/gtk/gtkcssparser.c
@@ -643,10 +643,9 @@ _gtk_css_parser_read_number (GtkCssParser           *parser,
         }
       else if (flags & GTK_CSS_NUMBER_AS_PIXELS)
         {
-          GError *error = g_error_new_literal (GTK_CSS_PROVIDER_ERROR,
-                                               GTK_CSS_PROVIDER_ERROR_DEPRECATED,
-                                               "Not using units is deprecated. Assuming 'px'.");
-          _gtk_css_parser_take_error (parser, error);
+          _gtk_css_parser_error_full (parser,
+                                      GTK_CSS_PROVIDER_ERROR_DEPRECATED,
+                                      "Not using units is deprecated. Assuming 'px'.");
           number->unit = GTK_CSS_PX;
         }
       else if (flags & GTK_CSS_PARSE_NUMBER)
@@ -1019,13 +1018,9 @@ _gtk_css_parser_read_url (GtkCssParser *parser,
           _gtk_css_parser_skip_whitespace (parser);
           if (_gtk_css_parser_try (parser, "(", TRUE))
             {
-              GError *error;
-              
-              error = g_error_new_literal (GTK_CSS_PROVIDER_ERROR,
-                                           GTK_CSS_PROVIDER_ERROR_DEPRECATED,
-                                           "Whitespace between 'url' and '(' is deprecated");
-                             
-              _gtk_css_parser_take_error (parser, error);
+              _gtk_css_parser_error_full (parser,
+                                          GTK_CSS_PROVIDER_ERROR_DEPRECATED,
+                                          "Whitespace between 'url' and '(' is deprecated");
             }
           else
             {



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