diff options
author | Chris Lahey <clahey@src.gnome.org> | 2001-08-03 22:43:58 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-08-03 22:43:58 +0800 |
commit | 68518c1d989ded3031c490fb0b542424aef369cf (patch) | |
tree | 0a1fa847cd75856006540805fe91d592c4f6ba14 | |
parent | 4b9d93c6b873f5551865ad875de7e08662b624fb (diff) | |
download | gsoc2013-evolution-68518c1d989ded3031c490fb0b542424aef369cf.tar.gz gsoc2013-evolution-68518c1d989ded3031c490fb0b542424aef369cf.tar.zst gsoc2013-evolution-68518c1d989ded3031c490fb0b542424aef369cf.zip |
p2001-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.
svn path=/trunk/; revision=11614
-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); } |