--- qiv-2.3.2.old/event.c +++ qiv-2.3.2/event.c @@ -760,50 +760,35 @@ update_image(q, REDRAW); break; - /* Next picture - or loop to the first */ + case GDK_Home: /* First image */ + snprintf (infotext, sizeof infotext, "(First picture)"); + next_image (-1000); + qiv_load_image (q); + break; + case GDK_Page_Down: + case GDK_KP_Page_Down: case ' ': next_image: snprintf(infotext, sizeof infotext, "(Next picture)"); next_image(1); qiv_load_image(q); - if(magnify && !fullscreen) { - gdk_window_hide(magnify_img.win); // [lc] -// gdk_flush(); -// gdk_window_get_root_origin(q->win, -// &magnify_img.frame_x, &magnify_img.frame_y); -// printf(">>> frame %d %d\n", magnify_img.frame_x, magnify_img.frame_y); -// setup_magnify(q, &magnify_img); - } break; - /* 5 pictures forward - or loop to the beginning */ - - case GDK_KEY_Page_Down: - case GDK_KEY_KP_Page_Down: - snprintf(infotext, sizeof infotext, "(5 pictures forward)"); - next_image(5); - if(magnify && !fullscreen) gdk_window_hide(magnify_img.win); // [lc] + case GDK_End: /* Last image */ + snprintf (infotext, sizeof infotext, "(Last picture)"); + next_image (1000); qiv_load_image(q); break; - /* Previous picture - or loop back to the last */ - - case GDK_KEY_BackSpace: + case GDK_Page_Up: + case GDK_KP_Page_Up: + case GDK_BackSpace: previous_image: snprintf(infotext, sizeof infotext, "(Previous picture)"); next_image(-1); - if(magnify && !fullscreen) gdk_window_hide(magnify_img.win); // [lc] - qiv_load_image(q); - break; - - /* 5 pictures backward - or loop back to the last */ - - case GDK_KEY_Page_Up: - case GDK_KEY_KP_Page_Up: - snprintf(infotext, sizeof infotext, "(5 pictures backward)"); - next_image(-5); - if(magnify && !fullscreen) gdk_window_hide(magnify_img.win); // [lc] + if (magnify && !fullscreen) + gdk_window_hide(magnify_img.win); // [lc] qiv_load_image(q); break; --- qiv-2.3.2.old/main.h +++ qiv-2.3.2/main.h @@ -91,10 +91,10 @@ { VERSION_FULL, "", - "space/left mouse/wheel down next picture", - "backspace/right mouse/wheel up previous picture", - "PgDn 5 pictures forward", - "PgUp 5 pictures backward", + "space/left mouse/wheel down or PgDn next picture" , + "backspace/right mouse/wheel up or PgUp previous picture" , + "Home = First picture End = Last picture" , + "" , "q/ESC/middle mouse exit", "", "0-9 Run 'qiv-command '", --- qiv-2.3.2.old/qiv.1 +++ qiv-2.3.2/qiv.1 @@ -210,10 +210,9 @@ qiv \-\-bg_color blue \-\-root image.png .SH KEYS .EX -space/left mouse/wheel down next picture -backspace/right mouse/wheel up previous picture -PgDn 5 pictures forward -PgUp 5 pictures backward +space/left mouse/wheel down or PgDn next picture +backspace/right mouse/wheel up or PgUp previous picture +Home = First picture End = Last picture q/ESC/middle mouse exit 0-9 run 'qiv-command ' --- qiv-2.3.2.old/qiv.h +++ qiv-2.3.2/qiv.h @@ -26,8 +26,9 @@ #include // for XF86VidModeGetModeLine */ -#define VERSION "2.3.2" -#define VERSION_FULL "QIV - Quick Image Viewer v2.3.2 - http://qiv.spiegl.de/" +#define VERSION "2.3.2-mod-191001" +#define VERSION_FULL "QIV - Quick Image Viewer v2.3.2-mod-191001" + #define TRASH_DIR ".qiv-trash" #define SELECT_DIR ".qiv-select" #define SLIDE_DELAY 3000 /* milliseconds */ --- qiv-2.3.2.old/utils.c +++ qiv-2.3.2/utils.c @@ -458,6 +458,17 @@ { static int last_modif = 1; /* Delta of last change of index of image */ + if (direction <= -1000) /* First image? */ + { /* Yes */ + image_idx = 0; + return; + } + else if (direction >= 1000) /* Last image? */ + { /* Yes */ + image_idx = images - 1; + return; + } + if (!direction) direction = last_modif; else