make is_renaming a bit-field to save ~4+ bytes per canvas item.

2002-07-10  Michael Meeks  <michael@ximian.com>

	* 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.
This commit is contained in:
Michael Meeks 2002-07-10 19:37:49 +00:00 committed by Michael Meeks
parent e709bcbed7
commit 443ac50e67
2 changed files with 12 additions and 3 deletions

View file

@ -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 <michael@ximian.com>
* 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 <michael@ximian.com>
* src/nautilus-sidebar.c (nautilus_sidebar_update_appearance):

View file

@ -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;
}