Commit c9f01ffb authored by Benjamin Otte's avatar Benjamin Otte

cssimage: No need to pass base file anymore

The file is now part of the GtkCssParser
parent e1317268
......@@ -357,15 +357,13 @@ _gtk_css_image_can_parse (GtkCssParser *parser)
}
GtkCssImage *
_gtk_css_image_new_parse (GtkCssParser *parser,
GFile *base)
_gtk_css_image_new_parse (GtkCssParser *parser)
{
GtkCssImageClass *klass;
GtkCssImage *image;
GType image_type;
g_return_val_if_fail (parser != NULL, NULL);
g_return_val_if_fail (G_IS_FILE (base), NULL);
image_type = gtk_css_image_get_parser_type (parser);
if (image_type == G_TYPE_INVALID)
......@@ -377,7 +375,7 @@ _gtk_css_image_new_parse (GtkCssParser *parser,
image = g_object_new (image_type, NULL);
klass = GTK_CSS_IMAGE_GET_CLASS (image);
if (!klass->parse (image, parser, base))
if (!klass->parse (image, parser))
{
g_object_unref (image);
return NULL;
......
......@@ -141,8 +141,7 @@ gtk_css_image_cross_fade_draw (GtkCssImage *image,
static gboolean
gtk_css_image_cross_fade_parse (GtkCssImage *image,
GtkCssParser *parser,
GFile *base)
GtkCssParser *parser)
{
GtkCssImageCrossFade *cross_fade = GTK_CSS_IMAGE_CROSS_FADE (image);
GtkCssValue *number;
......@@ -153,7 +152,7 @@ gtk_css_image_cross_fade_parse (GtkCssImage *image,
return FALSE;
}
cross_fade->start = _gtk_css_image_new_parse (parser, base);
cross_fade->start = _gtk_css_image_new_parse (parser);
if (cross_fade->start == NULL)
return FALSE;
......@@ -163,7 +162,7 @@ gtk_css_image_cross_fade_parse (GtkCssImage *image,
return FALSE;
}
cross_fade->end = _gtk_css_image_new_parse (parser, base);
cross_fade->end = _gtk_css_image_new_parse (parser);
if (cross_fade->end == NULL)
return FALSE;
......
......@@ -66,8 +66,7 @@ gtk_css_image_gradient_draw (GtkCssImage *image,
static gboolean
gtk_css_image_gradient_parse (GtkCssImage *image,
GtkCssParser *parser,
GFile *base)
GtkCssParser *parser)
{
GtkCssImageGradient *gradient = GTK_CSS_IMAGE_GRADIENT (image);
......
......@@ -222,8 +222,7 @@ gtk_css_image_linear_draw (GtkCssImage *image,
static gboolean
gtk_css_image_linear_parse (GtkCssImage *image,
GtkCssParser *parser,
GFile *base)
GtkCssParser *parser)
{
GtkCssImageLinear *linear = GTK_CSS_IMAGE_LINEAR (image);
guint i;
......
......@@ -65,8 +65,7 @@ struct _GtkCssImageClass
double height);
/* parse CSS, return TRUE on success */
gboolean (* parse) (GtkCssImage *image,
GtkCssParser *parser,
GFile *base);
GtkCssParser *parser);
/* print to CSS */
void (* print) (GtkCssImage *image,
GString *string);
......@@ -75,8 +74,7 @@ struct _GtkCssImageClass
GType _gtk_css_image_get_type (void) G_GNUC_CONST;
gboolean _gtk_css_image_can_parse (GtkCssParser *parser);
GtkCssImage * _gtk_css_image_new_parse (GtkCssParser *parser,
GFile *base);
GtkCssImage * _gtk_css_image_new_parse (GtkCssParser *parser);
int _gtk_css_image_get_width (GtkCssImage *image);
int _gtk_css_image_get_height (GtkCssImage *image);
......
......@@ -62,8 +62,7 @@ gtk_css_image_url_draw (GtkCssImage *image,
static gboolean
gtk_css_image_url_parse (GtkCssImage *image,
GtkCssParser *parser,
GFile *base)
GtkCssParser *parser)
{
GtkCssImageUrl *url = GTK_CSS_IMAGE_URL (image);
GdkPixbuf *pixbuf;
......
......@@ -67,8 +67,7 @@ gtk_css_image_win32_draw (GtkCssImage *image,
static gboolean
gtk_css_image_win32_parse (GtkCssImage *image,
GtkCssParser *parser,
GFile *base)
GtkCssParser *parser)
{
GtkCssImageWin32 *wimage = GTK_CSS_IMAGE_WIN32 (image);
char *class;
......
......@@ -281,7 +281,7 @@ parse_border_image (GtkCssShorthandProperty *shorthand,
image = NULL;
else
{
image = _gtk_css_image_new_parse (parser, base);
image = _gtk_css_image_new_parse (parser);
if (image == NULL)
return FALSE;
}
......@@ -483,7 +483,7 @@ parse_background (GtkCssShorthandProperty *shorthand,
image = NULL;
else
{
image = _gtk_css_image_new_parse (parser, base);
image = _gtk_css_image_new_parse (parser);
if (image == NULL)
return FALSE;
}
......
......@@ -553,7 +553,7 @@ css_image_value_parse (GtkCssStyleProperty *property,
image = NULL;
else
{
image = _gtk_css_image_new_parse (parser, base);
image = _gtk_css_image_new_parse (parser);
if (image == NULL)
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment