[gtk/kill-builtin-image: 2/2] Remove builtin icons altogether



commit 112aed590fcd6a2c411e7b5c818e362410163f83
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 10 13:11:59 2020 -0500

    Remove builtin icons altogether
    
    This removes support for GtkCssImageBuiltin and
    GtkCssImageBuiltinType from everywhere.

 docs/reference/gtk/meson.build  |   1 -
 gtk/gtkcalendar.c               |  11 +-
 gtk/gtkcellrenderertoggle.c     |  23 +-
 gtk/gtkcheckbutton.c            |  12 -
 gtk/gtkcssimagebuiltin.c        | 670 ----------------------------------------
 gtk/gtkcssimagebuiltinprivate.h |  68 ----
 gtk/gtkcsstypesprivate.h        |  23 --
 gtk/gtkicon.c                   |  16 +-
 gtk/gtkiconprivate.h            |   3 -
 gtk/gtkmenusectionbox.c         |   1 -
 gtk/gtkmodelbutton.c            |  15 -
 gtk/gtkpaned.c                  |   5 +-
 gtk/gtkrender.c                 | 101 +-----
 gtk/gtkrendericon.c             |   8 +-
 gtk/gtkrendericonprivate.h      |   3 +-
 gtk/gtkspinner.c                |   3 +-
 gtk/gtktexthandle.c             |   3 +-
 gtk/gtktreepopover.c            |   3 -
 gtk/gtktreeview.c               |  17 +-
 gtk/meson.build                 |   1 -
 20 files changed, 20 insertions(+), 967 deletions(-)
---
diff --git a/docs/reference/gtk/meson.build b/docs/reference/gtk/meson.build
index 0ee718a1c5..1cb3f26991 100644
--- a/docs/reference/gtk/meson.build
+++ b/docs/reference/gtk/meson.build
@@ -48,7 +48,6 @@ private_headers = [
   'gtkcssfontfeaturesvalueprivate.h',
   'gtkcssfontvariationsvalueprivate.h',
   'gtkcssiconthemevalueprivate.h',
-  'gtkcssimagebuiltinprivate.h',
   'gtkcssimagecrossfadeprivate.h',
   'gtkcssimagefallbackprivate.h',
   'gtkcssimageiconthemeprivate.h',
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index b8acd5bd2f..c1e96c0028 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2395,7 +2395,6 @@ calendar_snapshot_arrow (GtkCalendar *calendar,
 {
   GtkWidget *widget = GTK_WIDGET (calendar);
   GtkCalendarPrivate *priv = gtk_calendar_get_instance_private (calendar);
-  GtkCssImageBuiltinType image_type;
   GtkStyleContext *context;
   GtkStateFlags state;
   GdkRectangle rect;
@@ -2418,19 +2417,11 @@ calendar_snapshot_arrow (GtkCalendar *calendar,
                                   rect.x, rect.y,
                                   rect.width, rect.height);
 
-  if (arrow == ARROW_MONTH_LEFT || arrow == ARROW_YEAR_LEFT)
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT;
-  else
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT;
-
   gtk_snapshot_save (snapshot);
   gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT(
                           rect.x + (rect.width - 8) / 2,
                           rect.y + (rect.height - 8) / 2));
-  gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context),
-                               snapshot,
-                               8, 8,
-                               image_type);
+  gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot, 8, 8);
   gtk_snapshot_restore (snapshot);
 
   gtk_style_context_restore (context);
diff --git a/gtk/gtkcellrenderertoggle.c b/gtk/gtkcellrenderertoggle.c
index 15572ec6cc..f1658cee3f 100644
--- a/gtk/gtkcellrenderertoggle.c
+++ b/gtk/gtkcellrenderertoggle.c
@@ -406,7 +406,6 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer      *cell,
   gint xpad, ypad;
   GtkStateFlags state;
   GtkBorder padding, border;
-  GtkCssImageBuiltinType image_type;
 
   gtk_cell_renderer_toggle_get_size (cell, widget, cell_area,
                                     &x_offset, &y_offset,
@@ -452,32 +451,12 @@ gtk_cell_renderer_toggle_snapshot (GtkCellRenderer      *cell,
   gtk_style_context_get_padding (context, &padding);
   gtk_style_context_get_border (context, &border);
 
-  if (priv->radio)
-    {
-      if (state & GTK_STATE_FLAG_INCONSISTENT)
-        image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT;
-      else if (state & GTK_STATE_FLAG_CHECKED)
-        image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
-      else
-        image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
-    }
-  else
-    {
-      if (state & GTK_STATE_FLAG_INCONSISTENT)
-        image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT;
-      else if (state & GTK_STATE_FLAG_CHECKED)
-        image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
-      else
-        image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
-    }
-
   gtk_snapshot_translate (snapshot,
                           &GRAPHENE_POINT_INIT (cell_area->x + x_offset + xpad + padding.left + border.left,
                                                 cell_area->y + y_offset + ypad + padding.top + border.top));
   gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot,
                                width - padding.left - padding.right - border.left - border.right,
-                               height - padding.top - padding.bottom - border.top - border.bottom,
-                               image_type);
+                               height - padding.top - padding.bottom - border.top - border.bottom);
 
   gtk_style_context_restore (context);
   gtk_snapshot_pop (snapshot);
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index bda29bf7e8..e57fa71b89 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -98,7 +98,6 @@ static void
 gtk_check_button_update_node_state (GtkWidget *widget)
 {
   GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (GTK_CHECK_BUTTON (widget));
-  GtkCssImageBuiltinType image_type;
   GtkStateFlags state;
 
   if (!priv->indicator_widget)
@@ -106,17 +105,6 @@ gtk_check_button_update_node_state (GtkWidget *widget)
 
   state = gtk_widget_get_state_flags (widget);
 
-  /* XXX: This is somewhat awkward here, but there's no better
-   * way to update the icon
-   */
-  if (state & GTK_STATE_FLAG_CHECKED)
-    image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION : GTK_CSS_IMAGE_BUILTIN_CHECK;
-  else if (state & GTK_STATE_FLAG_INCONSISTENT)
-    image_type = GTK_IS_RADIO_BUTTON (widget) ? GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT : 
GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT;
-  else
-    image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
-
-  gtk_icon_set_image (GTK_ICON (priv->indicator_widget), image_type);
   gtk_widget_set_state_flags (priv->indicator_widget, state, TRUE);
 }
 
diff --git a/gtk/gtkcsstypesprivate.h b/gtk/gtkcsstypesprivate.h
index 8f53d740c6..573a17173f 100644
--- a/gtk/gtkcsstypesprivate.h
+++ b/gtk/gtkcsstypesprivate.h
@@ -247,29 +247,6 @@ enum { /*< skip >*/
   GTK_CSS_PROPERTY_N_PROPERTIES
 };
 
-typedef enum /*< skip >*/ {
-  GTK_CSS_IMAGE_BUILTIN_NONE,
-  GTK_CSS_IMAGE_BUILTIN_CHECK,
-  GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT,
-  GTK_CSS_IMAGE_BUILTIN_OPTION,
-  GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT,
-  GTK_CSS_IMAGE_BUILTIN_ARROW_UP,
-  GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN,
-  GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
-  GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT_EXPANDED,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT_EXPANDED,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT_EXPANDED,
-  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT_EXPANDED,
-  GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR,
-  GTK_CSS_IMAGE_BUILTIN_HANDLE,
-  GTK_CSS_IMAGE_BUILTIN_SPINNER
-} GtkCssImageBuiltinType;
-
 typedef enum /*< skip >*/ {
   GTK_CSS_AREA_BORDER_BOX,
   GTK_CSS_AREA_PADDING_BOX,
diff --git a/gtk/gtkicon.c b/gtk/gtkicon.c
index f11421f68d..8661a69943 100644
--- a/gtk/gtkicon.c
+++ b/gtk/gtkicon.c
@@ -36,8 +36,6 @@
 struct _GtkIcon
 {
   GtkWidget parent;
-
-  GtkCssImageBuiltinType image;
 };
 
 G_DEFINE_TYPE (GtkIcon, gtk_icon, GTK_TYPE_WIDGET)
@@ -46,7 +44,6 @@ static void
 gtk_icon_snapshot (GtkWidget   *widget,
                    GtkSnapshot *snapshot)
 {
-  GtkIcon *self = GTK_ICON (widget);
   GtkCssStyle *style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
   int width, height;
 
@@ -54,10 +51,7 @@ gtk_icon_snapshot (GtkWidget   *widget,
   height = gtk_widget_get_height (widget);
 
   if (width > 0 && height > 0)
-    gtk_css_style_snapshot_icon (style,
-                                 snapshot,
-                                 width, height,
-                                 self->image);
+    gtk_css_style_snapshot_icon (style, snapshot, width, height);
 }
 
 static void
@@ -87,7 +81,6 @@ gtk_icon_class_init (GtkIconClass *klass)
 static void
 gtk_icon_init (GtkIcon *self)
 {
-  self->image = GTK_CSS_IMAGE_BUILTIN_NONE;
 }
 
 GtkWidget *
@@ -98,13 +91,6 @@ gtk_icon_new (const char *css_name)
                        NULL);
 }
 
-void
-gtk_icon_set_image (GtkIcon                *self,
-                    GtkCssImageBuiltinType  image)
-{
-  self->image = image;
-}
-
 void
 gtk_icon_set_css_name (GtkIcon    *self,
                        const char *css_name)
diff --git a/gtk/gtkiconprivate.h b/gtk/gtkiconprivate.h
index 32ec86448a..2bc0255c74 100644
--- a/gtk/gtkiconprivate.h
+++ b/gtk/gtkiconprivate.h
@@ -31,9 +31,6 @@ G_DECLARE_FINAL_TYPE (GtkIcon, gtk_icon, GTK, ICON, GtkWidget)
 
 GtkWidget *  gtk_icon_new                    (const char *css_name);
 
-void         gtk_icon_set_image              (GtkIcon                *self,
-                                              GtkCssImageBuiltinType  image);
-
 void         gtk_icon_set_css_name           (GtkIcon    *self,
                                               const char *css_name);
 
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c
index ed47c780ee..eee0659e0e 100644
--- a/gtk/gtkmenusectionbox.c
+++ b/gtk/gtkmenusectionbox.c
@@ -583,7 +583,6 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item,
       gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (box->item_box)), 
"inline-buttons");
 
       spacer = gtk_icon_new ("none");
-      gtk_icon_set_image (GTK_ICON (spacer), GTK_CSS_IMAGE_BUILTIN_NONE);
       gtk_container_add (GTK_CONTAINER (box->item_box), spacer);
       gtk_size_group_add_widget (box->indicators, spacer);
 
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 36d4105fea..6cd10e13bf 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -352,12 +352,6 @@ update_end_indicator (GtkModelButton *self)
   if (!self->end_indicator)
     return;
 
-  if (self->role == GTK_BUTTON_ROLE_NORMAL &&
-      (self->menu_name != NULL || self->popover != NULL))
-    {
-      gtk_icon_set_image (GTK_ICON (self->end_indicator), GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT);
-    }
-
   context = gtk_widget_get_style_context (self->end_indicator);
 
   if (is_ltr)
@@ -398,15 +392,6 @@ update_start_indicator (GtkModelButton *self)
   if (!self->start_indicator)
     return;
 
-  if (self->role == GTK_BUTTON_ROLE_CHECK)
-    gtk_icon_set_image (GTK_ICON (self->start_indicator), GTK_CSS_IMAGE_BUILTIN_CHECK);
-  else if (self->role == GTK_BUTTON_ROLE_RADIO)
-    gtk_icon_set_image (GTK_ICON (self->start_indicator), GTK_CSS_IMAGE_BUILTIN_OPTION);
-  else if (self->role == GTK_BUTTON_ROLE_TITLE)
-    gtk_icon_set_image (GTK_ICON (self->start_indicator), GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT);
-  else
-    gtk_icon_set_image (GTK_ICON (self->start_indicator), GTK_CSS_IMAGE_BUILTIN_NONE);
-
   gtk_widget_set_state_flags (self->start_indicator, get_start_indicator_state (self), TRUE);
 
   context = gtk_widget_get_style_context (self->start_indicator);
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 1bf644fa8f..ef5a8830a9 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1326,10 +1326,7 @@ gtk_paned_render_handle (GtkGizmo    *gizmo,
   height = gtk_widget_get_height (widget);
 
   if (width > 0 && height > 0)
-    gtk_css_style_snapshot_icon (style,
-                                 snapshot,
-                                 width, height,
-                                 GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR);
+    gtk_css_style_snapshot_icon (style, snapshot, width, height);
 }
 
 static void
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index 78372e8d0c..40e1a47467 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -22,7 +22,6 @@
 #include <math.h>
 
 #include "gtkcsscornervalueprivate.h"
-#include "gtkcssimagebuiltinprivate.h"
 #include "gtkcssimagevalueprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtkcssrgbavalueprivate.h"
@@ -40,7 +39,6 @@
 static void
 gtk_do_render_icon (GtkStyleContext        *context,
                     cairo_t                *cr,
-                    GtkCssImageBuiltinType  image_type,
                     gdouble                 x,
                     gdouble                 y,
                     gdouble                 width,
@@ -50,7 +48,7 @@ gtk_do_render_icon (GtkStyleContext        *context,
   GskRenderNode *node;
 
   snapshot = gtk_snapshot_new ();
-  gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot, width, height, 
image_type);
+  gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot, width, height);
   node = gtk_snapshot_free_to_node (snapshot);
   if (node == NULL)
     return;
@@ -90,24 +88,13 @@ gtk_render_check (GtkStyleContext *context,
                   gdouble          width,
                   gdouble          height)
 {
-  GtkStateFlags state;
-  GtkCssImageBuiltinType image_type;
-
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (cr != NULL);
 
   if (width <= 0 || height <= 0)
     return;
 
-  state = gtk_style_context_get_state (context);
-  if (state & GTK_STATE_FLAG_INCONSISTENT)
-    image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT;
-  else if (state & GTK_STATE_FLAG_CHECKED)
-    image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
-  else
-    image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
-
-  gtk_do_render_icon (context, cr, image_type, x, y, width, height);
+  gtk_do_render_icon (context, cr, x, y, width, height);
 }
 
 /**
@@ -135,24 +122,13 @@ gtk_render_option (GtkStyleContext *context,
                    gdouble          width,
                    gdouble          height)
 {
-  GtkStateFlags state;
-  GtkCssImageBuiltinType image_type;
-
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (cr != NULL);
 
   if (width <= 0 || height <= 0)
     return;
 
-  state = gtk_style_context_get_state (context);
-  if (state & GTK_STATE_FLAG_INCONSISTENT)
-    image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT;
-  else if (state & GTK_STATE_FLAG_CHECKED)
-    image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
-  else
-    image_type = GTK_CSS_IMAGE_BUILTIN_NONE;
-
-  gtk_do_render_icon (context, cr, image_type, x, y, width, height);
+  gtk_do_render_icon (context, cr, x, y, width, height);
 }
 
 /**
@@ -178,38 +154,13 @@ gtk_render_arrow (GtkStyleContext *context,
                   gdouble          y,
                   gdouble          size)
 {
-  GtkCssImageBuiltinType image_type;
-
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (cr != NULL);
 
   if (size <= 0)
     return;
 
-  /* map [0, 2 * pi) to [0, 4) */
-  angle = round (2 * angle / G_PI);
-
-  switch (((int) angle) & 3)
-  {
-  case 0:
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_UP;
-    break;
-  case 1:
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT;
-    break;
-  case 2:
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN;
-    break;
-  case 3:
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT;
-    break;
-  default:
-    g_assert_not_reached ();
-    image_type = GTK_CSS_IMAGE_BUILTIN_ARROW_UP;
-    break;
-  }
-
-  gtk_do_render_icon (context, cr, image_type, x, y, size, size);
+  gtk_do_render_icon (context, cr, x, y, size, size);
 }
 
 /**
@@ -360,40 +311,13 @@ gtk_render_expander (GtkStyleContext *context,
                      gdouble          width,
                      gdouble          height)
 {
-  GtkCssImageBuiltinType image_type;
-  GtkStateFlags state;
-
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (cr != NULL);
 
   if (width <= 0 || height <= 0)
     return;
 
-  state = gtk_style_context_get_state (context);
-  if (gtk_style_context_has_class (context, "horizontal"))
-    {
-      if (state & GTK_STATE_FLAG_DIR_RTL)
-        image_type = (state & GTK_STATE_FLAG_CHECKED)
-                     ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT_EXPANDED
-                     : GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT;
-      else
-        image_type = (state & GTK_STATE_FLAG_CHECKED)
-                     ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT_EXPANDED
-                     : GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT;
-    }
-  else
-    {
-      if (state & GTK_STATE_FLAG_DIR_RTL)
-        image_type = (state & GTK_STATE_FLAG_CHECKED)
-                     ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT_EXPANDED
-                     : GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT;
-      else
-        image_type = (state & GTK_STATE_FLAG_CHECKED)
-                     ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT_EXPANDED
-                     : GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT;
-    }
-
-  gtk_do_render_icon (context, cr, image_type, x, y, width, height);
+  gtk_do_render_icon (context, cr, x, y, width, height);
 }
 
 /**
@@ -554,8 +478,6 @@ gtk_render_handle (GtkStyleContext *context,
                    gdouble          width,
                    gdouble          height)
 {
-  GtkCssImageBuiltinType type;
-
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (cr != NULL);
 
@@ -565,16 +487,7 @@ gtk_render_handle (GtkStyleContext *context,
   gtk_render_background (context, cr, x, y, width, height);
   gtk_render_frame (context, cr, x, y, width, height);
 
-  if (gtk_style_context_has_class (context, GTK_STYLE_CLASS_PANE_SEPARATOR))
-    {
-      type = GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR;
-    }
-  else
-    {
-      type = GTK_CSS_IMAGE_BUILTIN_HANDLE;
-    }
-
-  gtk_do_render_icon (context, cr, x, y, width, height, type);
+  gtk_do_render_icon (context, cr, x, y, width, height);
 }
 
 /**
@@ -604,7 +517,7 @@ gtk_render_activity (GtkStyleContext *context,
   if (width <= 0 || height <= 0)
     return;
 
-  gtk_do_render_icon (context, cr, x, y, width, height, GTK_CSS_IMAGE_BUILTIN_SPINNER);
+  gtk_do_render_icon (context, cr, x, y, width, height);
 }
 
 /**
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c
index 6d37033bdc..d9b55d742e 100644
--- a/gtk/gtkrendericon.c
+++ b/gtk/gtkrendericon.c
@@ -22,7 +22,6 @@
 #include "gtkrendericonprivate.h"
 
 #include "gtkcssfiltervalueprivate.h"
-#include "gtkcssimagebuiltinprivate.h"
 #include "gtkcssimagevalueprivate.h"
 #include "gtkcssshadowsvalueprivate.h"
 #include "gtkcssstyleprivate.h"
@@ -37,8 +36,7 @@ void
 gtk_css_style_snapshot_icon (GtkCssStyle            *style,
                              GtkSnapshot            *snapshot,
                              double                  width,
-                             double                  height,
-                             GtkCssImageBuiltinType  builtin_type)
+                             double                  height)
 {
   const GtkCssValue *shadows_value, *transform_value, *filter_value;
   GskTransform *transform;
@@ -69,7 +67,7 @@ gtk_css_style_snapshot_icon (GtkCssStyle            *style,
 
   if (transform == NULL)
     {
-      gtk_css_image_builtin_snapshot (image, snapshot, width, height, builtin_type);
+      gtk_css_image_snapshot (image, snapshot, width, height);
     }
   else
     {
@@ -80,7 +78,7 @@ gtk_css_style_snapshot_icon (GtkCssStyle            *style,
       gtk_snapshot_transform (snapshot, transform);
       gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- width / 2.0, - height / 2.0));
 
-      gtk_css_image_builtin_snapshot (image, snapshot, width, height, builtin_type);
+      gtk_css_image_snapshot (image, snapshot, width, height);
 
       gtk_snapshot_restore (snapshot);
     }
diff --git a/gtk/gtkrendericonprivate.h b/gtk/gtkrendericonprivate.h
index 1514d295bd..c37be85618 100644
--- a/gtk/gtkrendericonprivate.h
+++ b/gtk/gtkrendericonprivate.h
@@ -32,8 +32,7 @@ G_BEGIN_DECLS
 void    gtk_css_style_snapshot_icon             (GtkCssStyle            *style,
                                                  GtkSnapshot            *snapshot,
                                                  double                  width,
-                                                 double                  height,
-                                                 GtkCssImageBuiltinType  builtin_type);
+                                                 double                  height);
 
 void    gtk_css_style_snapshot_icon_paintable   (GtkCssStyle            *style,
                                                  GtkSnapshot            *snapshot,
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c
index 929fbaa7c7..8d57a82ca0 100644
--- a/gtk/gtkspinner.c
+++ b/gtk/gtkspinner.c
@@ -120,8 +120,7 @@ gtk_spinner_snapshot (GtkWidget   *widget,
   gtk_css_style_snapshot_icon (style,
                                snapshot,
                                gtk_widget_get_width (widget),
-                               gtk_widget_get_height (widget),
-                               GTK_CSS_IMAGE_BUILTIN_SPINNER);
+                               gtk_widget_get_height (widget));
 }
 
 static gboolean
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index 25ecd116ea..2d3d148ac7 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -185,8 +185,7 @@ snapshot_func (GtkGizmo    *gizmo,
   gtk_css_style_snapshot_icon (style,
                                snapshot,
                                gtk_widget_get_width (GTK_WIDGET (gizmo)),
-                               gtk_widget_get_height (GTK_WIDGET (gizmo)),
-                               GTK_CSS_IMAGE_BUILTIN_HANDLE);
+                               gtk_widget_get_height (GTK_WIDGET (gizmo)));
 }
 
 static GtkWidget *
diff --git a/gtk/gtktreepopover.c b/gtk/gtktreepopover.c
index a9803a7d87..cf25dbe658 100644
--- a/gtk/gtktreepopover.c
+++ b/gtk/gtktreepopover.c
@@ -687,7 +687,6 @@ gtk_tree_popover_create_item (GtkTreePopover *popover,
       if (header_item)
         {
           indicator = gtk_icon_new ("arrow");
-          gtk_icon_set_image (GTK_ICON (indicator), GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT);
           gtk_style_context_add_class (gtk_widget_get_style_context (indicator), "left");
           gtk_widget_set_parent (indicator, item);
         }
@@ -695,8 +694,6 @@ gtk_tree_popover_create_item (GtkTreePopover *popover,
       gtk_widget_set_parent (view, item);
 
       indicator = gtk_icon_new (has_submenu ? "arrow" : "none");
-      gtk_icon_set_image (GTK_ICON (indicator), has_submenu ? GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT
-                                                            : GTK_CSS_IMAGE_BUILTIN_NONE); 
       gtk_style_context_add_class (gtk_widget_get_style_context (indicator), "right");
       gtk_widget_set_parent (indicator, item);
 
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 6d4709cc5d..7e349c9b26 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9338,12 +9338,9 @@ gtk_tree_view_snapshot_arrow (GtkTreeView   *tree_view,
   gint x_offset = 0;
   gint x2;
   GtkCellRendererState flags = 0;
-  GtkCssImageBuiltinType image_type;
-  gboolean rtl;
 
   widget = GTK_WIDGET (tree_view);
   context = gtk_widget_get_style_context (widget);
-  rtl = (_gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
 
   if (! GTK_TREE_RBNODE_FLAG_SET (node, GTK_TREE_RBNODE_IS_PARENT))
     return;
@@ -9365,17 +9362,9 @@ gtk_tree_view_snapshot_arrow (GtkTreeView   *tree_view,
   state = gtk_cell_renderer_get_state (NULL, widget, flags);
 
   if (node->children != NULL)
-    {
-      state |= GTK_STATE_FLAG_CHECKED;
-      image_type = rtl ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT_EXPANDED 
-                       : GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT_EXPANDED;
-    }
+    state |= GTK_STATE_FLAG_CHECKED;
   else
-    {
-      state &= ~(GTK_STATE_FLAG_CHECKED);
-      image_type = rtl ? GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT
-                       : GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT;
-    }
+    state &= ~(GTK_STATE_FLAG_CHECKED);
 
   gtk_style_context_save (context);
 
@@ -9385,7 +9374,7 @@ gtk_tree_view_snapshot_arrow (GtkTreeView   *tree_view,
   gtk_snapshot_save (snapshot);
   gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (area.x, area.y));
   gtk_css_style_snapshot_icon (gtk_style_context_lookup_style (context), snapshot,
-                               area.width, area.height, image_type);
+                               area.width, area.height);
   gtk_snapshot_restore (snapshot);
 
   gtk_style_context_restore (context);
diff --git a/gtk/meson.build b/gtk/meson.build
index 8e9686069c..859bbd3a5e 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -57,7 +57,6 @@ gtk_private_sources = files([
   'gtkcssfontvariationsvalue.c',
   'gtkcssiconthemevalue.c',
   'gtkcssimage.c',
-  'gtkcssimagebuiltin.c',
   'gtkcssimagecrossfade.c',
   'gtkcssimagefallback.c',
   'gtkcssimageicontheme.c',


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