Mercurial > geeqie
changeset 577:5ded871a0968
Minor cleanup.
author | zas_ |
---|---|
date | Sun, 04 May 2008 23:03:36 +0000 |
parents | 9dc0513837b5 |
children | d31008c98f10 |
files | src/view_file_icon.c |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/view_file_icon.c Sun May 04 21:54:20 2008 +0000 +++ b/src/view_file_icon.c Sun May 04 23:03:36 2008 +0000 @@ -783,10 +783,10 @@ { IconData *id = work->data; work = work->next; - if (vficon_index_by_id(vf, id) < 0) - { - VFICON_INFO(vf, selection) = g_list_remove(VFICON_INFO(vf, selection), id); - } + + if (vficon_index_by_id(vf, id) >= 0) continue; + + VFICON_INFO(vf, selection) = g_list_remove(VFICON_INFO(vf, selection), id); } } @@ -801,9 +801,10 @@ while (work) { IconData *id = work->data; + work = work->next; + VFICON_INFO(vf, selection) = g_list_append(VFICON_INFO(vf, selection), id); - vficon_selection_add(vf, work->data, SELECTION_SELECTED, NULL); - work = work->next; + vficon_selection_add(vf, id, SELECTION_SELECTED, NULL); } vficon_send_update(vf); @@ -816,8 +817,10 @@ work = VFICON_INFO(vf, selection); while (work) { - vficon_selection_remove(vf, work->data, SELECTION_SELECTED, NULL); + IconData *id = work->data; work = work->next; + + vficon_selection_remove(vf, id, SELECTION_SELECTED, NULL); } g_list_free(VFICON_INFO(vf, selection));