1
0
mirror of https://gitlab.gnome.org/GNOME/gtk.git synced 2025-01-15 14:50:06 +00:00

iconview: Remove iterm->prelight

item->prelight
is always equal to
  iconview->priv->last_prelight == item
so there is no need to track it separately.
This commit is contained in:
Benjamin Otte 2014-09-16 02:58:21 +02:00
parent 48d56c4077
commit 072c417416
2 changed files with 1 additions and 4 deletions

View File

@ -2042,13 +2042,11 @@ gtk_icon_view_motion (GtkWidget *widget,
{ {
if (item != NULL) if (item != NULL)
{ {
item->prelight = TRUE;
gtk_icon_view_queue_draw_item (icon_view, item); gtk_icon_view_queue_draw_item (icon_view, item);
} }
if (last_prelight_item != NULL) if (last_prelight_item != NULL)
{ {
last_prelight_item->prelight = FALSE;
gtk_icon_view_queue_draw_item (icon_view, gtk_icon_view_queue_draw_item (icon_view,
icon_view->priv->last_prelight); icon_view->priv->last_prelight);
} }
@ -3107,7 +3105,7 @@ gtk_icon_view_paint_item (GtkIconView *icon_view,
flags |= GTK_CELL_RENDERER_SELECTED; flags |= GTK_CELL_RENDERER_SELECTED;
} }
if (item->prelight) if (item == priv->last_prelight)
{ {
state |= GTK_STATE_FLAG_PRELIGHT; state |= GTK_STATE_FLAG_PRELIGHT;
flags |= GTK_CELL_RENDERER_PRELIT; flags |= GTK_CELL_RENDERER_PRELIT;

View File

@ -29,7 +29,6 @@ struct _GtkIconViewItem
gint row, col; gint row, col;
guint prelight : 1;
guint selected : 1; guint selected : 1;
guint selected_before_rubberbanding : 1; guint selected_before_rubberbanding : 1;