From e0a5f4e0816719755752cdea47445279a6542d6e Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 23 Jan 2017 19:59:27 +0100 Subject: [PATCH] cellrendererspinner: Don't track old icon size It was only used to avoid gtk_icon_size_lookup() calls and those aren't expensive. --- gtk/gtkcellrendererspinner.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gtk/gtkcellrendererspinner.c b/gtk/gtkcellrendererspinner.c index 527a7455b8..54b1cbd11c 100644 --- a/gtk/gtkcellrendererspinner.c +++ b/gtk/gtkcellrendererspinner.c @@ -66,7 +66,7 @@ struct _GtkCellRendererSpinnerPrivate { gboolean active; guint pulse; - GtkIconSize icon_size, old_icon_size; + GtkIconSize icon_size; gint size; }; @@ -162,7 +162,6 @@ gtk_cell_renderer_spinner_init (GtkCellRendererSpinner *cell) { cell->priv = gtk_cell_renderer_spinner_get_instance_private (cell); cell->priv->pulse = 0; - cell->priv->old_icon_size = GTK_ICON_SIZE_INVALID; cell->priv->icon_size = GTK_ICON_SIZE_MENU; } @@ -188,9 +187,6 @@ gtk_cell_renderer_spinner_update_size (GtkCellRendererSpinner *cell, { GtkCellRendererSpinnerPrivate *priv = cell->priv; - if (priv->old_icon_size == priv->icon_size) - return; - if (!gtk_icon_size_lookup (priv->icon_size, &priv->size, NULL)) { g_warning ("Invalid icon size %u", priv->icon_size); @@ -251,7 +247,6 @@ gtk_cell_renderer_spinner_set_property (GObject *object, case PROP_SIZE: if (priv->icon_size != g_value_get_enum (value)) { - priv->old_icon_size = priv->icon_size; priv->icon_size = g_value_get_enum (value); g_object_notify (object, "size"); }