From 8e3e3d582f7df902caa3c3e0ec9f503d1c6d9fd0 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 26 Mar 2012 07:26:45 +0200 Subject: [PATCH] cssvalue: Get rid of unused functions --- gtk/gtkcssvalue.c | 40 ---------------------------------------- gtk/gtkcssvalueprivate.h | 4 ---- gtk/gtkstyleproperties.c | 4 ++-- 3 files changed, 2 insertions(+), 46 deletions(-) diff --git a/gtk/gtkcssvalue.c b/gtk/gtkcssvalue.c index 8030cd475f..b79c4ee180 100644 --- a/gtk/gtkcssvalue.c +++ b/gtk/gtkcssvalue.c @@ -259,17 +259,6 @@ g_boxed_copy0 (GType boxed_type, return g_boxed_copy (boxed_type, src_boxed); } -GtkCssValue * -_gtk_css_value_new_from_border (const GtkBorder *border) -{ - GtkCssValue *value; - - value = gtk_css_value_new (GTK_TYPE_BORDER); - value->u.ptr = g_boxed_copy0 (GTK_TYPE_BORDER, border); - - return value; -} - GtkCssValue * _gtk_css_value_new_take_pattern (cairo_pattern_t *v) { @@ -281,17 +270,6 @@ _gtk_css_value_new_take_pattern (cairo_pattern_t *v) return value; } -GtkCssValue * -_gtk_css_value_new_from_pattern (const cairo_pattern_t *v) -{ - GtkCssValue *value; - - value = gtk_css_value_new (CAIRO_GOBJECT_TYPE_PATTERN); - value->u.ptr = g_boxed_copy0 (CAIRO_GOBJECT_TYPE_PATTERN, v); - - return value; -} - GtkCssValue * _gtk_css_value_new_take_shadow (GtkShadow *v) { @@ -303,17 +281,6 @@ _gtk_css_value_new_take_shadow (GtkShadow *v) return value; } -GtkCssValue * -_gtk_css_value_new_take_font_description (PangoFontDescription *v) -{ - GtkCssValue *value; - - value = gtk_css_value_new (PANGO_TYPE_FONT_DESCRIPTION); - value->u.ptr = v; - - return value; -} - GtkCssValue * _gtk_css_value_new_take_image (GtkCssImage *v) { @@ -651,13 +618,6 @@ _gtk_css_value_get_border_corner_radius (const GtkCssValue *value) return value->u.ptr; } -PangoFontDescription * -_gtk_css_value_get_font_description (const GtkCssValue *value) -{ - g_return_val_if_fail (_gtk_css_value_holds (value, PANGO_TYPE_FONT_DESCRIPTION), 0); - return value->u.ptr; -} - PangoStyle _gtk_css_value_get_pango_style (const GtkCssValue *value) { diff --git a/gtk/gtkcssvalueprivate.h b/gtk/gtkcssvalueprivate.h index b87dc576ad..047f9ea8c0 100644 --- a/gtk/gtkcssvalueprivate.h +++ b/gtk/gtkcssvalueprivate.h @@ -71,13 +71,10 @@ GtkCssValue *_gtk_css_value_new_from_gvalue (const GValue GtkCssValue *_gtk_css_value_new_take_gvalue (GValue *g_value); GtkCssValue *_gtk_css_value_new_from_int (gint val); GtkCssValue *_gtk_css_value_new_take_string (char *string); -GtkCssValue *_gtk_css_value_new_take_font_description (PangoFontDescription *v); GtkCssValue *_gtk_css_value_new_from_rgba (const GdkRGBA *v); GtkCssValue *_gtk_css_value_new_from_color (const GdkColor *v); GtkCssValue *_gtk_css_value_new_take_symbolic_color (GtkSymbolicColor *v); -GtkCssValue *_gtk_css_value_new_from_border (const GtkBorder *border); GtkCssValue *_gtk_css_value_new_take_pattern (cairo_pattern_t *v); -GtkCssValue *_gtk_css_value_new_from_pattern (const cairo_pattern_t *v); GtkCssValue *_gtk_css_value_new_take_shadow (GtkShadow *v); GtkCssValue *_gtk_css_value_new_take_image (GtkCssImage *v); GtkCssValue *_gtk_css_value_new_from_number (const GtkCssNumber *v); @@ -104,7 +101,6 @@ const GtkCssBackgroundSize *_gtk_css_value_get_background_size (const const GtkCssBackgroundPosition *_gtk_css_value_get_background_position (const GtkCssValue *value); const GtkCssBorderCornerRadius *_gtk_css_value_get_border_corner_radius (const GtkCssValue *value); const GtkCssBorderImageRepeat *_gtk_css_value_get_border_image_repeat (const GtkCssValue *value); -PangoFontDescription * _gtk_css_value_get_font_description (const GtkCssValue *value); PangoStyle _gtk_css_value_get_pango_style (const GtkCssValue *value); PangoVariant _gtk_css_value_get_pango_variant (const GtkCssValue *value); PangoWeight _gtk_css_value_get_pango_weight (const GtkCssValue *value); diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c index 5446d9975c..52187efda2 100644 --- a/gtk/gtkstyleproperties.c +++ b/gtk/gtkstyleproperties.c @@ -911,8 +911,8 @@ gtk_style_properties_merge (GtkStyleProperties *props, PangoFontDescription *font_desc_to_merge; /* Handle merging of font descriptions */ - font_desc = _gtk_css_value_get_font_description (value->value); - font_desc_to_merge = _gtk_css_value_get_font_description (data->value); + font_desc = _gtk_css_value_get_boxed (value->value); + font_desc_to_merge = _gtk_css_value_get_boxed (data->value); pango_font_description_merge (font_desc, font_desc_to_merge, replace); }