------------------------------------------------------------------------------- XV modification notes The following is my notes on posible modifications of the XV program to allow improved usage of the program. I do suggest you keep a copy of the original unmodified XV, particularly if you decied to modify thumbnail size! The Source for XV I used was the last XV 3.10a release http://www.trilon.com/xv/downloads.html#src-distrib Then patched with the latest Greg's XV Jumbo Patch http://www.sonic.net/~roelofs/greg_xv.html I then patched as per below, and modify the 'VSRSTR' in "xv.h" ------------------------------------------------------------------------------- Max Number and size of Schnauzer. I found that a maximum of 4 browser windows were not enough... In "xv.h" change the the following defines... #define MAXNAMES 4096 /* max # of files in ctrlW list */ #define MAXBRWIN 4 /* max # of vis browser windows */ to #define MAXNAMES 10240 /* max # of files in ctrlW list */ #define MAXBRWIN 16 /* max # of vis browser windows */ ------------------------------------------------------------------------------- Increase XV thumbnail size (caution) The calculations was incorperated into jumbo patch 20070520 making icons size and inital array size adjustments easy. On a larger display, I found the 80x60 thumbnail size is a little small. Warning a unmodified xv will think larger thumbnails as bogus and ignore them. It does NOT however over-write them unless you "update" or re-"generate" specific icons. I suggest you do not copy larger .xvpic thumbs to machines where a different XV might be running. Alturnativally prehaps you can rename the "thumbnail" directory from ".xvpics" to ".xvpics-120" (set in "xv.h") so that both sets can co-exist. I did not bother to do this. Also I suggest you keep the 4x3 aspect ratio of the thumbnails In "xvbrowse.c" modify.. #define ISIZE_WIDE 80 /* maximum size of an icon */ #define ISIZE_HIGH 60 to #define ISIZE_WIDE 100 /* maximum size of an icon */ #define ISIZE_HIGH 75 or even larger at #define ISIZE_WIDE 120 /* maximum size of an icon -- my selection */ #define ISIZE_HIGH 90 You may also like to remove some of the extra width space around icons... #define ISPACE_WIDE (ISIZE_WIDE+16) /* icon spacing */ to #define ISPACE_WIDE (ISIZE_WIDE+4) /* icon spacing */ To do all this properly with window size adjustments needed, this context diff patch will do the job for you... =======8<--------CUT HERE----------axes/crowbars permitted--------------- *** xvbrowse.c.orig Sun Jun 2 14:02:48 2002 --- xvbrowse.c Sun Jun 2 14:18:12 2002 *************** *** 115,123 **** #define ISLOADABLE(ftyp) (ftyp!=BF_DIR && ftyp!=BF_CHR && ftyp!=BF_BLK && \ ftyp!=BF_SOCK && ftyp!=BF_FIFO) - #define DEF_BROWWIDE 615 /* default size of window */ - #define DEF_BROWHIGH 356 - #define SCROLLVERT 8 /* height of scroll region at top/bottom of iconw */ #define PAGEVERT 40 /* during rect drag, if further than this, page */ --- 115,120 ---- *************** *** 129,138 **** #define BOTMARGIN 58 /* room for a row of buttons and a line of text */ #define LRMARGINS 5 /* left and right margins */ ! #define ISIZE_WIDE 80 /* maximum size of an icon */ ! #define ISIZE_HIGH 60 ! #define ISPACE_WIDE (ISIZE_WIDE+16) /* icon spacing */ #define ISPACE_TOP 4 /* dist btwn top of ISPACE and ISIZE */ #define ISPACE_TTOP 4 /* dist btwn bot of icon and title */ #define ISPACE_HIGH (ISIZE_HIGH+ISPACE_TOP+ISPACE_TTOP+16+4) --- 126,138 ---- #define BOTMARGIN 58 /* room for a row of buttons and a line of text */ #define LRMARGINS 5 /* left and right margins */ ! #define ISIZE_WIDE 120 /* maximum size of an icon */ ! #define ISIZE_HIGH 90 ! ! #define ISIZE_WPAD 4 ! #define INUM_WIDE 5 /* size initial window to hold this many icons */ ! #define INUM_HIGH 3 ! #define ISPACE_WIDE (ISIZE_WIDE+ISIZE_WPAD) /* icon spacing */ #define ISPACE_TOP 4 /* dist btwn top of ISPACE and ISIZE */ #define ISPACE_TTOP 4 /* dist btwn bot of icon and title */ #define ISPACE_HIGH (ISIZE_HIGH+ISPACE_TOP+ISPACE_TTOP+16+4) *************** *** 167,172 **** --- 167,179 ---- #define BUTTW 80 #define BUTTH 24 + + /* Original size of window was 615 x 356 for 80x60 thumbs in 6x3 array */ + #define DEF_BROWWIDE (ISPACE_WIDE * INUM_WIDE + LRMARGINS * 2 + 22) + #define DEF_BROWHIGH (ISPACE_HIGH * INUM_HIGH + BUTTH * 2 + 16 + 24) + /* the last number is a fudge, EG extra spaces, borders etc */ static char *showHstr = "Show hidden files"; static char *hideHstr = "Hide 'hidden' files"; =======8<--------CUT HERE----------axes/crowbars permitted--------------- ------------------------------------------------------------------------------- Wait/Resume Slideshow Key This patch adds a 'w' key that will enable and disable (pause) automatic slideshow (-wait option). I always hated that you could not 'pause' the wait timeout. If -wait is not given default it to 5 secs but 'paused' =======8<--------CUT HERE----------axes/crowbars permitted--------------- *** xvevent.c.orig 2008-12-14 11:18:36.000000000 +1000 --- xvevent.c 2008-12-14 11:41:22.000000000 +1000 *************** *** 1916,1921 **** --- 1916,1924 ---- case 'H': FakeButtonPress(&gbut[G_BHISTEQ]); break; case 'N': FakeButtonPress(&gbut[G_BMAXCONT]); break; + /* wait pause/resume */ + case 'w': waitsec = -waitsec; break; + default: break; } } =======8<--------CUT HERE----------axes/crowbars permitted--------------- ------------------------------------------------------------------------------- WARNING: xv jumbo patch 20070520 The "USE_TICKS" seems to get the meaning of 'time' wrong (too large) That is the returned 'elapsed_ticks' is too small in relation to CLK_TCK by a factor of 100 #if 0 out the use of this in xv.h Also recomend replacing the sleep() in xvevent.c with usleep() usleep(250000); /* 1/4 sec sleep */ ------------------------------------------------------------------------------- Drifting XV window (slideshows) See http://www.trilon.com/xv/faq.html#drifting-window Use -drift dx dy to counteract the drift that the window is seeing. For example xv directory_of_images/* -drift -1 -1 -wait 0 -wloop Can also be set in a X resource variable xv*driftKludge: -1 -1 -------------------------------------------------------------------------------