[Xfce4-commits] <ristretto:master> Move to the next image when closing the first image from the image_list
Stephan Arts
noreply at xfce.org
Fri Sep 2 23:52:02 CEST 2011
Updating branch refs/heads/master
to c0de3470d959d11c7427bac9e93958b9255fc116 (commit)
from 216b407e4eb348adaae6f0d16668773bb62b53ad (commit)
commit c0de3470d959d11c7427bac9e93958b9255fc116
Author: Stephan Arts <stephan at xfce.org>
Date: Wed Aug 31 21:56:43 2011 +0200
Move to the next image when closing the first image from the image_list
src/image_list.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/image_list.c b/src/image_list.c
index 8f85d7a..b6d3e10 100644
--- a/src/image_list.c
+++ b/src/image_list.c
@@ -260,7 +260,14 @@ rstto_image_list_remove_file (RsttoImageList *image_list, GFile *file)
{
if (g_file_equal(rstto_image_list_iter_get_file (iter->data), file))
{
- rstto_image_list_iter_previous (iter->data);
+ if (0 == rstto_image_list_iter_get_position (iter->data))
+ {
+ rstto_image_list_iter_next (iter->data);
+ }
+ else
+ {
+ rstto_image_list_iter_previous (iter->data);
+ }
/* If the image is still the same,
* it's a single item list,
* and we should force the image in this iter to NULL
More information about the Xfce4-commits
mailing list