diff options
-rw-r--r-- | e-util/ChangeLog | 9 | ||||
-rw-r--r-- | e-util/e-list-iterator.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 6306ed2e1a..325e29cb72 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,12 @@ +2001-08-03 Christopher James Lahey <clahey@ximian.com> + + * e-list-iterator.c (e_list_iterator_next): Made it so that + e_list_iterator_next goes to the first element if it's set to + NULL. This makes deleting the first element and then doing + e_list_iterator_next go to the new first element. Did the analogy + for e_list_iterator_prev for completeness and consistency's sakes. + Fixes Ximian bug #6057. + 2001-08-01 Christopher James Lahey <clahey@ximian.com> * e-categories-master-list-wombat.c (ecmlw_load): Fixed the load diff --git a/e-util/e-list-iterator.c b/e-util/e-list-iterator.c index 1a3554b070..64f7c299f3 100644 --- a/e-util/e-list-iterator.c +++ b/e-util/e-list-iterator.c @@ -156,6 +156,8 @@ e_list_iterator_next (EIterator *_iterator) EListIterator *iterator = E_LIST_ITERATOR(_iterator); if (iterator->iterator) iterator->iterator = g_list_next(iterator->iterator); + else + iterator->iterator = iterator->list->list; return (iterator->iterator != NULL); } @@ -165,6 +167,8 @@ e_list_iterator_prev (EIterator *_iterator) EListIterator *iterator = E_LIST_ITERATOR(_iterator); if (iterator->iterator) iterator->iterator = g_list_previous(iterator->iterator); + else + iterator->iterator = g_list_last(iterator->list->list); return (iterator->iterator != NULL); } |