changeset 579:2ef88100cee2

Minor tidyup.
author zas_
date Sun, 04 May 2008 23:20:43 +0000
parents d31008c98f10
children e27c374460d3
files src/view_file_icon.c
diffstat 1 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_file_icon.c	Sun May 04 23:06:46 2008 +0000
+++ b/src/view_file_icon.c	Sun May 04 23:20:43 2008 +0000
@@ -2110,10 +2110,10 @@
 		work = vf->list;
 		while (work)
 			{
-
 			IconData *id = work->data;
 			FileData *fd = id->fd;
 			work = work->next;
+
 			b += fd->size;
 			}
 
@@ -2168,19 +2168,15 @@
 	work = old_list;
 	while (work)
 		{
-		IconData *id;
-		FileData *fd;
-
-		GList *needle;
-
-		id = work->data;
-		fd = id->fd;
-
-		needle = vf->list;
+		IconData *id = work->data;
+		FileData *fd = id->fd;
+		GList *needle = vf->list;
+
 		while (needle)
 			{
 			IconData *idn = needle->data;
 			FileData *fdn = idn->fd;
+
 			if (fdn == fd)
 				{
 				/* swap, to retain old thumb, selection */
@@ -2452,8 +2448,9 @@
 	while (work)
 		{
 		FileData *fd = work->data;
-		gint f = vficon_index_by_fd(vf, work->data);
+		gint f = vficon_index_by_fd(vf, fd);
 		g_assert(fd->magick == 0x12345678);
+
 		if (f >= 0) list = g_list_prepend(list, GINT_TO_POINTER(f));
 		work = work->next;
 		}
@@ -2461,10 +2458,12 @@
 	while (list)
 		{
 		gint c = TRUE;
+
 		work = list;
 		while (work && c)
 			{
 			gpointer p = work->data;
+
 			work = work->next;
 			if (row == GPOINTER_TO_INT(p))
 				{
@@ -2478,12 +2477,14 @@
 				}
 			if (!c) list = g_list_remove(list, p);
 			}
+
 		if (c && list)
 			{
 			g_list_free(list);
 			list = NULL;
 			}
 		}
+
 	if (row > count - 1)
 		{
 		if (rev < 0)
@@ -2601,12 +2602,14 @@
 						match = TRUE;
 						}
 					}
+
 				if (!match)
 					{
 					new_row = g_list_index(vf->list, ignore_id);
 					work = NULL;
 					}
 				}
+
 			if (new_row == -1)
 				{
 				/* selection all ignored, use closest */
@@ -2617,6 +2620,7 @@
 			{
 			new_row = g_list_index(vf->list, VFICON_INFO(vf, selection)->data);
 			}
+
 		if (new_row >= 0)
 			{
 			IconData *idn = g_list_nth_data(vf->list, new_row);