summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstylefuncs.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-04 11:44:57 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:18 +0200
commitf785f7177c455369f1482ff6582cebf69ddddb7a (patch)
tree67d4d3131bd8e69d7ba7c9e7c225beb0ce970ba6 /gtk/gtkcssstylefuncs.c
parent5377169ef33d7b17d953ccd464e64dbd32335c47 (diff)
downloadgtk+-f785f7177c455369f1482ff6582cebf69ddddb7a.tar.gz
cssvalue: Add a custom value for repeats
In particular, that's background-repeat and border-image-repeat. Also, fix up the border-image shorthand to allow any order.
Diffstat (limited to 'gtk/gtkcssstylefuncs.c')
-rw-r--r--gtk/gtkcssstylefuncs.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c
index 518a32731e..2105d5aa9e 100644
--- a/gtk/gtkcssstylefuncs.c
+++ b/gtk/gtkcssstylefuncs.c
@@ -887,52 +887,6 @@ pattern_value_compute (GtkStyleContext *context,
return _gtk_css_value_ref (specified);
}
-static gboolean
-border_image_repeat_value_parse (GtkCssParser *parser,
- GFile *file,
- GValue *value)
-{
- GtkCssBorderImageRepeat image_repeat;
- GtkCssBorderRepeatStyle styles[2];
- gint i, v;
-
- for (i = 0; i < 2; i++)
- {
- if (_gtk_css_parser_try_enum (parser, GTK_TYPE_CSS_BORDER_REPEAT_STYLE, &v))
- styles[i] = v;
- else if (i == 0)
- {
- styles[1] = styles[0] = GTK_CSS_REPEAT_STYLE_STRETCH;
- break;
- }
- else
- styles[i] = styles[0];
- }
-
- image_repeat.hrepeat = styles[0];
- image_repeat.vrepeat = styles[1];
-
- g_value_set_boxed (value, &image_repeat);
-
- return TRUE;
-}
-
-static void
-border_image_repeat_value_print (const GValue *value,
- GString *string)
-{
- GtkCssBorderImageRepeat *image_repeat;
-
- image_repeat = g_value_get_boxed (value);
-
- enum_print (image_repeat->hrepeat, GTK_TYPE_CSS_BORDER_REPEAT_STYLE, string);
- if (image_repeat->hrepeat != image_repeat->vrepeat)
- {
- g_string_append (string, " ");
- enum_print (image_repeat->vrepeat, GTK_TYPE_CSS_BORDER_REPEAT_STYLE, string);
- }
-}
-
static gboolean
enum_value_parse (GtkCssParser *parser,
GFile *base,
@@ -1100,10 +1054,6 @@ gtk_css_style_funcs_init (void)
pattern_value_parse,
pattern_value_print,
pattern_value_compute);
- register_conversion_function (GTK_TYPE_CSS_BORDER_IMAGE_REPEAT,
- border_image_repeat_value_parse,
- border_image_repeat_value_print,
- NULL);
register_conversion_function (G_TYPE_ENUM,
enum_value_parse,
enum_value_print,