Mercurial > geeqie
diff src/image.c @ 1481:96897bd5f6cd
active image follows keyboard focus
author | nadvornik |
---|---|
date | Sat, 28 Mar 2009 15:31:04 +0000 |
parents | cf4029d10d38 |
children | dac747d99394 |
line wrap: on
line diff
--- a/src/image.c Sat Mar 28 15:09:09 2009 +0000 +++ b/src/image.c Sat Mar 28 15:31:04 2009 +0000 @@ -867,6 +867,11 @@ GTK_WIDGET_SET_FLAGS(imd->widget, GTK_HAS_FOCUS); image_focus_paint(imd, TRUE, NULL); + if (imd->func_focus_in) + { + imd->func_focus_in(imd, imd->data_focus_in); + } + return TRUE; } @@ -974,6 +979,14 @@ imd->data_scroll_notify = data; } +void image_set_focus_in_func(ImageWindow *imd, + void (*func)(ImageWindow *, gpointer), + gpointer data) +{ + imd->func_focus_in = func; + imd->data_focus_in = data; +} + /* path, name */ const gchar *image_get_path(ImageWindow *imd)