Mercurial > geeqie.yaz
changeset 1653:7ed0b45c80ae
fixed jumping of filelist on focus_in event
author | nadvornik |
---|---|
date | Sun, 21 Jun 2009 13:28:02 +0000 |
parents | 3968a763e2b1 |
children | b45f0ab6367f |
files | src/layout_image.c src/layout_image.h |
diffstat | 2 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/layout_image.c Sun Jun 21 12:39:58 2009 +0000 +++ b/src/layout_image.c Sun Jun 21 13:28:02 2009 +0000 @@ -596,7 +596,7 @@ if (i < MAX_SPLIT_IMAGES) { DEBUG_1("dnd image activate %d", i); - layout_image_activate(lw, i); + layout_image_activate(lw, i, FALSE); } @@ -1338,7 +1338,7 @@ if (i != -1) { DEBUG_1("image activate focus_in %d", i); - layout_image_activate(lw, i); + layout_image_activate(lw, i, FALSE); } } @@ -1380,7 +1380,7 @@ if (i != -1) { DEBUG_1("image activate scroll %d", i); - layout_image_activate(lw, i); + layout_image_activate(lw, i, FALSE); } @@ -1470,7 +1470,7 @@ if (i != -1) { - layout_image_activate(lw, i); + layout_image_activate(lw, i, FALSE); } switch (event->button) @@ -1496,7 +1496,7 @@ if (i != -1) { - layout_image_activate(lw, i); + layout_image_activate(lw, i, FALSE); } /* continue as with active image */ @@ -1633,12 +1633,13 @@ image_select(lw->split_images[i], FALSE); } - -void layout_image_activate(LayoutWindow *lw, gint i) +/* force should be set after change of lw->split_mode */ +void layout_image_activate(LayoutWindow *lw, gint i, gboolean force) { FileData *fd; if (!lw->split_images[i]) return; + if (!force && lw->active_split_image == i) return; /* deactivate currently active */ if (lw->active_split_image != i) @@ -1745,13 +1746,13 @@ if (!lw->image || lw->active_split_image < 0 || lw->active_split_image >= n) { - layout_image_activate(lw, 0); + layout_image_activate(lw, 0, TRUE); } else { /* this will draw the frame around selected image (image_select) on switch from single to split images */ - layout_image_activate(lw, lw->active_split_image); + layout_image_activate(lw, lw->active_split_image, TRUE); } }
--- a/src/layout_image.h Sun Jun 21 12:39:58 2009 +0000 +++ b/src/layout_image.h Sun Jun 21 13:28:02 2009 +0000 @@ -15,7 +15,7 @@ GtkWidget *layout_image_new(LayoutWindow *lw, gint i); -void layout_image_activate(LayoutWindow *lw, gint i); +void layout_image_activate(LayoutWindow *lw, gint i, gboolean force); GtkWidget *layout_image_setup_split_none(LayoutWindow *lw); GtkWidget *layout_image_setup_split_hv(LayoutWindow *lw, gboolean horizontal); GtkWidget *layout_image_setup_split(LayoutWindow *lw, ImageSplitMode mode);