diff options
-rw-r--r-- | gtk/gtkcssimagegradient.c | 2 | ||||
-rw-r--r-- | gtk/gtkcssprovider.c | 4 | ||||
-rw-r--r-- | gtk/gtkcssstylefuncs.c | 6 | ||||
-rw-r--r-- | gtk/gtksymboliccolor.c | 19 | ||||
-rw-r--r-- | gtk/gtksymboliccolorprivate.h | 2 |
5 files changed, 11 insertions, 22 deletions
diff --git a/gtk/gtkcssimagegradient.c b/gtk/gtkcssimagegradient.c index 8497339a3e..e6580eb772 100644 --- a/gtk/gtkcssimagegradient.c +++ b/gtk/gtkcssimagegradient.c @@ -474,7 +474,7 @@ _gtk_gradient_parse (GtkCssParser *parser) return NULL; } - color = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser)); + color = _gtk_css_symbolic_value_new (parser); if (color == NULL) { gtk_gradient_unref (gradient); diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 171becbec6..98eca49486 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1838,7 +1838,7 @@ parse_import (GtkCssScanner *scanner) static gboolean parse_color_definition (GtkCssScanner *scanner) { - GtkCssValue *symbolic; + GtkSymbolicColor *symbolic; char *name; gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_COLOR_DEFINITION); @@ -1874,7 +1874,7 @@ parse_color_definition (GtkCssScanner *scanner) if (!_gtk_css_parser_try (scanner->parser, ";", TRUE)) { g_free (name); - _gtk_css_value_unref (symbolic); + gtk_symbolic_color_unref (symbolic); gtk_css_provider_error_literal (scanner->provider, scanner, GTK_CSS_PROVIDER_ERROR, diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c index 283420a2f7..50ad34a108 100644 --- a/gtk/gtkcssstylefuncs.c +++ b/gtk/gtkcssstylefuncs.c @@ -171,7 +171,7 @@ rgba_value_parse (GtkCssParser *parser, GtkSymbolicColor *symbolic; GdkRGBA rgba; - symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser)); + symbolic = _gtk_css_symbolic_value_new (parser); if (symbolic == NULL) return FALSE; @@ -253,7 +253,7 @@ color_value_parse (GtkCssParser *parser, GtkSymbolicColor *symbolic; GdkRGBA rgba; - symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser)); + symbolic = _gtk_css_symbolic_value_new (parser); if (symbolic == NULL) return FALSE; @@ -338,7 +338,7 @@ symbolic_color_value_parse (GtkCssParser *parser, { GtkSymbolicColor *symbolic; - symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser)); + symbolic = _gtk_css_symbolic_value_new (parser); if (symbolic == NULL) return FALSE; diff --git a/gtk/gtksymboliccolor.c b/gtk/gtksymboliccolor.c index 87985e0e06..9d901e5fa8 100644 --- a/gtk/gtksymboliccolor.c +++ b/gtk/gtksymboliccolor.c @@ -810,8 +810,6 @@ typedef enum { COLOR_WIN32 } ColorParseType; -static GtkSymbolicColor * gtk_css_parser_read_symbolic_color (GtkCssParser *parser); - static GtkSymbolicColor * gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser, ColorParseType color) @@ -886,7 +884,7 @@ gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser, } else { - child1 = gtk_css_parser_read_symbolic_color (parser); + child1 = _gtk_css_symbolic_value_new (parser); if (child1 == NULL) return NULL; @@ -899,7 +897,7 @@ gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser, return NULL; } - child2 = gtk_css_parser_read_symbolic_color (parser); + child2 = _gtk_css_symbolic_value_new (parser); if (child2 == NULL) { gtk_symbolic_color_unref (child1); @@ -967,8 +965,8 @@ gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser, return symbolic; } -static GtkSymbolicColor * -gtk_css_parser_read_symbolic_color (GtkCssParser *parser) +GtkSymbolicColor * +_gtk_css_symbolic_value_new (GtkCssParser *parser) { GtkSymbolicColor *symbolic; GdkRGBA rgba; @@ -1036,12 +1034,3 @@ gtk_css_parser_read_symbolic_color (GtkCssParser *parser) _gtk_css_parser_error (parser, "Not a color definition"); return NULL; } - -GtkCssValue * -_gtk_css_symbolic_value_new (GtkCssParser *parser) -{ - g_return_val_if_fail (parser != NULL, NULL); - - return _gtk_css_symbolic_value_new_take_symbolic_color (gtk_css_parser_read_symbolic_color (parser)); -} - diff --git a/gtk/gtksymboliccolorprivate.h b/gtk/gtksymboliccolorprivate.h index 70cac9a8ef..ef87eaade3 100644 --- a/gtk/gtksymboliccolorprivate.h +++ b/gtk/gtksymboliccolorprivate.h @@ -32,7 +32,7 @@ GtkCssValue * _gtk_symbolic_color_resolve_full (GtkSymbolicColor GtkSymbolicColor * _gtk_symbolic_color_get_current_color (void); -GtkCssValue * _gtk_css_symbolic_value_new (GtkCssParser *parser); +GtkSymbolicColor * _gtk_css_symbolic_value_new (GtkCssParser *parser); /* I made these inline functions instead of macros to gain type safety for the arguments passed in. */ static inline GtkSymbolicColor * |