From 443ac50e67c08b8f3bb94303cbf682dd50e7ff8c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Wed, 10 Jul 2002 19:37:49 +0000 Subject: [PATCH] make is_renaming a bit-field to save ~4+ bytes per canvas item. 2002-07-10 Michael Meeks * libnautilus-private/nautilus-icon-canvas-item.c (nautilus_icon_canvas_item_set_renaming): make is_renaming a bit-field to save ~4+ bytes per canvas item. (nautilus_icon_canvas_item_update): don't request another re-draw on the item immediately after returning, save some uta thrash. --- ChangeLog | 9 +++++++++ libnautilus-private/nautilus-icon-canvas-item.c | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4272997b1..ba660b0fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,15 @@ when it tries to run it, and it will show an error dialog. Fixes bug #87286. +2002-07-10 Michael Meeks + + * libnautilus-private/nautilus-icon-canvas-item.c + (nautilus_icon_canvas_item_set_renaming): make is_renaming + a bit-field to save ~4+ bytes per canvas item. + (nautilus_icon_canvas_item_update): don't request another + re-draw on the item immediately after returning, save some uta + thrash. + 2002-07-10 Michael Meeks * src/nautilus-sidebar.c (nautilus_sidebar_update_appearance): diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c index a90ef00e0..9048bfcc4 100644 --- a/libnautilus-private/nautilus-icon-canvas-item.c +++ b/libnautilus-private/nautilus-icon-canvas-item.c @@ -93,7 +93,7 @@ struct NautilusIconCanvasItemDetails { guint rendered_is_highlighted_for_drop : 1; guint rendered_is_prelit : 1; - gboolean is_renaming; + guint is_renaming : 1; PangoLayout *editable_text_layout; PangoLayout *additional_text_layout; @@ -571,7 +571,7 @@ nautilus_icon_canvas_item_update (GnomeCanvasItem *item, int flags) { nautilus_icon_canvas_item_update_bounds (NAUTILUS_ICON_CANVAS_ITEM (item)); - eel_gnome_canvas_item_request_redraw (item); + EEL_CALL_PARENT (GNOME_CANVAS_ITEM_CLASS, update, (item, affine, clip_path, flags)); } @@ -1695,7 +1695,7 @@ nautilus_icon_canvas_item_set_renaming (NautilusIconCanvasItem *item, gboolean s g_return_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item)); g_return_if_fail (state == FALSE || state == TRUE); - if (item->details->is_renaming == state) { + if (!item->details->is_renaming == !state) { return; }