fotoxx.cc (fotoxx-22.30) | : | fotoxx.cc (fotoxx-22.35) | ||
---|---|---|---|---|
skipping to change at line 133 | skipping to change at line 133 | |||
int Fclone=0, cloxx=0, cloyy=0, cloww=0, clohh=0; | int Fclone=0, cloxx=0, cloyy=0, cloww=0, clohh=0; | |||
int Fblankwindow = 0; | int Fblankwindow = 0; | |||
int ii, cc, err; | int ii, cc, err; | |||
int Pindexlev; | int Pindexlev; | |||
FTYPE ftype; | FTYPE ftype; | |||
FILE *fid; | FILE *fid; | |||
char filename[200], buff[200]; | char filename[200], buff[200]; | |||
double freememory; | double freememory; | |||
double startsecs = get_seconds(); // start time | double startsecs = get_seconds(); // start time | |||
Fwsl = 0; | ||||
pp = getenv("WSL_DISTRO_NAME"); | ||||
// set flag for alt. code paths WSL | ||||
if (pp && *pp) { | ||||
Fwsl = 1; | ||||
Plog(0,"WSL %s\n",pp); | ||||
} | ||||
zinitapp(Frelease,argc,argv); // initz. GTK application | zinitapp(Frelease,argc,argv); // initz. GTK application | |||
// initialize default values (saved parameters will override these) | // initialize default values (saved parameters will override these) | |||
Fdevmenu = 0; // no show developer menu 22.15 | Fdevmenu = 0; // no show developer menu 22.15 | |||
Ffirsttime = 1; // first startup (params override) | Ffirsttime = 1; // first startup (params override) | |||
Floglevel = 1; // 0/1/2 = errs/infos/dialog inputs | Floglevel = 1; // 0/1/2 = errs/infos/dialog inputs | |||
Findexlev = 2; // direct exec: old index + search new | Findexlev = 2; // direct exec: old index + search new | |||
FMindexlev = 1; // file manager: old index only | FMindexlev = 1; // file manager: old index only | |||
Pindexlev = -1; // no -x index command parameter | Pindexlev = -1; // no -x index command parameter | |||
NWT = NST = 0; // edit and index thread count 22.35 | ||||
xxrec_tab = 0; // no image index yet | xxrec_tab = 0; // no image index yet | |||
Nxxrec = Findexvalid = 0; | Nxxrec = Findexvalid = 0; | |||
Prelease = zstrdup("unknown","params"); // prev. release (params override) | Prelease = zstrdup("unknown","params"); // prev. release (params override) | |||
mwgeom[0] = mwgeom[1] = 20; // default main window geometry | mwgeom[0] = mwgeom[1] = 20; // default main window geometry | |||
mwgeom[2] = 1200; mwgeom[3] = 800; | mwgeom[2] = 1200; mwgeom[3] = 800; | |||
*paneltext = 0; // no status bar text | *paneltext = 0; // no status bar text | |||
cropsizes[0] = zstrdup("1920x1080","params"); // default crop size memory | cropsizes[0] = zstrdup("1920x1080","params"); // default crop size memory | |||
cropsizes[1] = zstrdup("1600x900", "params"); | cropsizes[1] = zstrdup("1600x900", "params"); | |||
cropsizes[2] = zstrdup("1440x900", "params"); | cropsizes[2] = zstrdup("1440x900", "params"); | |||
skipping to change at line 197 | skipping to change at line 205 | |||
Fdragopt = 1; // image drag with mouse | Fdragopt = 1; // image drag with mouse | |||
ImagePosn = zstrdup("center","params"); // F-view image is centered 22.15 | ImagePosn = zstrdup("center","params"); // F-view image is centered 22.15 | |||
zoomcount = 2; // zooms to reach 2x image size | zoomcount = 2; // zooms to reach 2x image size | |||
zoomratio = sqrtf(2); // corresp. zoom ratio | zoomratio = sqrtf(2); // corresp. zoom ratio | |||
Nkbsu = 0; // KB shortcut list is empty | Nkbsu = 0; // KB shortcut list is empty | |||
map_dotsize = 8; // map dot size, mouse capture dist | map_dotsize = 8; // map dot size, mouse capture dist | |||
ovtxcc[0] = 80; // overlay text line low limit 22.18 | ovtxcc[0] = 80; // overlay text line low limit 22.18 | |||
ovtxcc[1] = 100; // overlay text line high limit | ovtxcc[1] = 100; // overlay text line high limit | |||
curr_file = 0; // no curr. file | curr_file = 0; // no curr. file | |||
navi::galleryname = zstrdup(getenv("HOME"),"params"); // curr. gallery | navi::galleryname = zstrdup(getenv("HOME"),"params"); // curr. gallery | |||
navi::gallerytype = GDIR; // gallery type | navi::gallerytype = FOLDER; // gallery type | |||
Flastversion = 0; // gallery shows all versions | Flastversion = 0; // gallery shows all versions | |||
curr_album = 0; // no current album | curr_album = 0; // no current album | |||
copymove_loc = 0; // no current copy/move to location 22.18 | copymove_loc = 0; // no current copy/move to location 22.18 | |||
RGB_chooser_file = 0; // users RGB color chooser file | RGB_chooser_file = 0; // users RGB color chooser file | |||
thumbfolder = 0; // no thumbnail folder | thumbfolder = 0; // no thumbnail folder | |||
navi::thumbsize = 256; // gallery default thumbnail size | navi::thumbsize = 256; // gallery default thumbnail size | |||
commandmenu = 0; // command line menu function | commandmenu = 0; // command line menu function | |||
commandparam = 0; // command menu parameter | commandparam = 0; // command menu parameter | |||
commandalbum = 0; // command line album name | commandalbum = 0; // command line album name | |||
video_command = zstrdup("vlc %s","params"); // default video play command 22.18 | video_command = zstrdup("vlc --play-and-exit %s","params"); // default video play command 22.31 | |||
initial_file = 0; // start with image file or folder | initial_file = 0; // start with image file or folder | |||
jpeg_def_quality = 90; // default .jpeg save quality | jpeg_def_quality = 90; // default .jpeg save quality | |||
tiff_comp_method = 1; // default TIFF compression method | tiff_comp_method = 1; // default TIFF compression method | |||
Frawloader = 1; // default RAW file loader, dcraw | Frawloader = 1; // default RAW file loader, dcraw | |||
Fautobright = 1; // RAW loader auto brighten, ON | Fautobright = 1; // RAW loader auto brighten, ON | |||
Fmatchthumb = 0; // RAW loader match thumb color OFF | Fmatchthumb = 0; // RAW loader match thumb color OFF | |||
rawcommand = zstrdup("(custom RAW loader command)","params"); // custom RAW file loader command 22.35 | ||||
lens_mm = 35; // pano lens parameter | lens_mm = 35; // pano lens parameter | |||
colormapfile = zstrdup("undefined","params"); // printer calibration color map | colormapfile = zstrdup("undefined","params"); // printer calibration color map | |||
ss_KBkeys = zstrdup("BNPX","params"); // default slide show control keys | ss_KBkeys = zstrdup("BNPX","params"); // default slide show control keys | |||
Fcaps = 0; // show captions = off 22.20 | Fcaps = 0; // show captions = off 22.20 | |||
Faskquit = 0; // ask to quit = NO | Faskquit = 0; // ask to quit = NO | |||
Fpaintedits = 0; // not paint edits mode | Fpaintedits = 0; // not paint edits mode | |||
Fmousevents = 0; // no show mouse events popup text 22.15 | Fmousevents = 0; // no show mouse events popup text 22.15 | |||
Nblacklist = 0; // blacklist folders/files count | Nblacklist = 0; // blacklist folders/files count | |||
imagefiletypes = zstrdup(".jpg .jpeg .png .tif .tiff .bmp .ico .ppm .gif .svg .xpm .tga " ,"params",40); | imagefiletypes = zstrdup(".jpg .jpeg .png .tif .tiff .bmp .ico .ppm .gif .svg .xpm .tga " ,"params",40); | |||
skipping to change at line 296 | skipping to change at line 305 | |||
} | } | |||
if (! pidlist) pidlist = zstrdup("none","params"); | if (! pidlist) pidlist = zstrdup("none","params"); | |||
snprintf(temp_folder,200,"%s/temp/temp-*",get_zhomedir()); // get existing /.../temp/temp-xxxxx | snprintf(temp_folder,200,"%s/temp/temp-*",get_zhomedir()); // get existing /.../temp/temp-xxxxx | |||
snprintf(buff,200,"find %s -type d 2>/dev/null",temp_folder); | snprintf(buff,200,"find %s -type d 2>/dev/null",temp_folder); | |||
fid = popen(buff,"r"); | fid = popen(buff,"r"); | |||
while ((pp = fgets_trim(buff,200,fid))) { // loop temp folders | while ((pp = fgets_trim(buff,200,fid))) { // loop temp folders | |||
pid = strrchr(pp,'-'); // -xxxxx (pid) | pid = strrchr(pp,'-'); // -xxxxx (pid) | |||
if (! pid) continue; | if (! pid) continue; | |||
if (strstr(pidlist,pid+1)) continue; // PID still active, do not delete | if (strstr(pidlist,pid+1)) continue; // PID still active, do not delete | |||
zshell(0,"rm -R -f -v %s",pp); // delete folder and contents | zshell("log","rm -R -f -v %s",pp); // delete folder and contents | |||
} | } | |||
pclose(fid); | pclose(fid); | |||
zfree(pidlist); | zfree(pidlist); | |||
// set up temp folder /.../temp/temp-xxxx/ where xxxx is owner PID | // set up temp folder /.../temp/temp-xxxx/ where xxxx is owner PID | |||
snprintf(temp_folder,200,"%s/temp/temp-%d",get_zhomedir(),getpid()); | snprintf(temp_folder,200,"%s/temp/temp-%d",get_zhomedir(),getpid()); | |||
err = zshell("ack","mkdir -p -m 0750 %s",temp_folder); | err = zshell("log ack","mkdir -p -m 0750 %s",temp_folder); | |||
if (err) quitxx(); | if (err) quitxx(); | |||
Plog(1,"temp files: %s \n",temp_folder); | Plog(1,"temp files: %s \n",temp_folder); | |||
snprintf(URS_filename,100,"%s/undo_nn",temp_folder); // file name template for undo/redo files | snprintf(URS_filename,100,"%s/undo_nn",temp_folder); // file name template for undo/redo files | |||
// determine if file maps have been downloaded | // determine if file maps have been downloaded | |||
snprintf(filename,200,"%s/maps_index",file_maps_folder); // check if file maps index exists 22.30 | snprintf(filename,200,"%s/maps_index",file_maps_folder); // check if file maps index exists 22.30 | |||
if (regfile(filename)) | if (regfile(filename)) | |||
Plog(1,"file maps installed at %s \n",file_maps_folder); | Plog(1,"file maps installed at %s \n",file_maps_folder); | |||
skipping to change at line 411 | skipping to change at line 420 | |||
dotcursor = gdk_cursor_new_for_display(display,GDK_DOT); // cursor for show_RGB() | dotcursor = gdk_cursor_new_for_display(display,GDK_DOT); // cursor for show_RGB() | |||
// check free memory, estimate image size limits, set thread counts | // check free memory, estimate image size limits, set thread counts | |||
freememory = realmemory(); // avail. real memory in MB | freememory = realmemory(); // avail. real memory in MB | |||
Plog(1,"free real memory: %.0f MB \n",freememory); | Plog(1,"free real memory: %.0f MB \n",freememory); | |||
Ftinycomputer = 0; // flag, inadequate memory | Ftinycomputer = 0; // flag, inadequate memory | |||
if (freememory < 4000) { // 4 GB threshold | if (freememory < 4000) { // 4 GB threshold | |||
Ftinycomputer = 1; | Ftinycomputer = 1; | |||
Plog(1,"computer has inadequate memory \n"); | Plog(0,"computer has inadequate memory \n"); | |||
} | } | |||
Plog(1,"image size limits for reasonable performance: \n"); | Plog(1,"image size limits for reasonable performance: \n"); | |||
Plog(1," view: %.0f megapixels \n",(freememory-1000)/6); // F + preview, 3 bytes/pixel each | Plog(1," view: %.0f megapixels \n",(freememory-1000)/6); // F + preview, 3 bytes/pixel each | |||
Plog(1," edit: %.0f megapixels \n",(freememory-1000)/64); // + E0/E1/E3/ER, 16 bytes/pixel each | Plog(1," edit: %.0f megapixels \n",(freememory-1000)/64); // + E0/E1/E3/ER, 16 bytes/pixel each | |||
NWT = get_nprocs(); | if (NWT == 0) { | |||
// get SMP CPU count | // no user setting made 22.35 | |||
if (NWT <= 0) NWT = 2; | NWT = get_nprocs(); | |||
if (NWT > max_threads) NWT = max_threads; | // use SMP CPU count | |||
// max. edit threads | if (NWT <= 0) NWT = 2; | |||
Plog(1,"using %d edit threads \n",NWT); | if (NWT > max_threads) NWT = max_threads; | |||
// max. edit threads | ||||
} | ||||
NST = NWT * 2; | NST = NWT; | |||
// max. search threads | // max. metadata server threads | |||
if (Ftinycomputer) NST = NWT; | ||||
if (NST > maxNST) NST = maxNST; // compile time limit | if (NST > maxNST) NST = maxNST; // compile time limit | |||
Plog(1,"using %d search threads \n",NST); | ||||
Plog(1,"using %d working threads \n",NWT); | ||||
// get locale specific name for /home/<user>/Desktop | // get locale specific name for /home/<user>/Desktop | |||
strcpy(desktopname,"Desktop"); | strcpy(desktopname,"Desktop"); | |||
snprintf(filename,200,"%s/.config/user-dirs.dirs",getenv("HOME")); | snprintf(filename,200,"%s/.config/user-dirs.dirs",getenv("HOME")); | |||
fid = fopen(filename,"r"); | fid = fopen(filename,"r"); | |||
if (fid) { | if (fid) { | |||
while (true) { | while (true) { | |||
pp = fgets_trim(buff,200,fid); | pp = fgets_trim(buff,200,fid); | |||
skipping to change at line 566 | skipping to change at line 576 | |||
else if (Fblankwindow) { // blank window, no gallery | else if (Fblankwindow) { // blank window, no gallery | |||
if (curr_file) zfree(curr_file); | if (curr_file) zfree(curr_file); | |||
curr_file = 0; | curr_file = 0; | |||
if (navi::galleryname) zfree(navi::galleryname); | if (navi::galleryname) zfree(navi::galleryname); | |||
navi::galleryname = 0; | navi::galleryname = 0; | |||
navi::gallerytype = TNONE; | navi::gallerytype = TNONE; | |||
set_mwin_title(); | set_mwin_title(); | |||
} | } | |||
// if no command line option, get startup display from user preferences | // if no command line option, get startup display from user settings | |||
else if (strmatch(startdisplay,"album")) { | else if (strmatch(startdisplay,"album")) { | |||
Plog(1,"initial album: %s \n",startalbum); | Plog(1,"initial album: %s \n",startalbum); | |||
album_show(startalbum); | album_show(startalbum); | |||
} | } | |||
else if (strmatch(startdisplay,"recent")) { // start with recent files gallery | else if (strmatch(startdisplay,"recent")) { // start with recent files gallery | |||
m_recentfiles(0,0); | m_recentfiles(0,0); | |||
if (curr_file) zfree(curr_file); | if (curr_file) zfree(curr_file); | |||
curr_file = 0; | curr_file = 0; | |||
} | } | |||
else if (strmatch(startdisplay,"newest")) { // start with newest files gallery | else if (strmatch(startdisplay,"newest")) { // start with newest files gallery | |||
m_newfiles(0,"file"); // by file mode date | m_newfiles(0,"file"); // by file mode date | |||
if (curr_file) zfree(curr_file); | if (curr_file) zfree(curr_file); | |||
curr_file = 0; | curr_file = 0; | |||
} | } | |||
else if (strmatch(startdisplay,"prevG")) { // start with previous gallery | else if (strmatch(startdisplay,"prevG")) { // start with previous gallery | |||
if (navi::gallerytype != TNONE) { | if (navi::gallerytype != TNONE) { | |||
if (navi::gallerytype == GDIR) | if (navi::gallerytype == FOLDER) | |||
gallery(navi::galleryname,"init",0); | gallery(navi::galleryname,"init",0); | |||
else gallery(navi::galleryname,"initF",0); | else gallery(navi::galleryname,"initF",0); | |||
gallery(0,"sort",-2); // recall sort and position | gallery(0,"sort",-2); // recall sort and position | |||
m_viewmode(0,"G"); | m_viewmode(0,"G"); | |||
} | } | |||
if (curr_file) zfree(curr_file); | if (curr_file) zfree(curr_file); | |||
curr_file = 0; | curr_file = 0; | |||
} | } | |||
else if (strmatch(startdisplay,"prevF")) { // start with previous image file | else if (strmatch(startdisplay,"prevF")) { // start with previous image file | |||
err = 1; | err = 1; | |||
if (curr_file && *curr_file == '/') { | if (curr_file && *curr_file == '/') { | |||
err = f_open(curr_file,0,0,0,0); // no diagnostic if missing | err = f_open(curr_file,0,0,0,0); // no diagnostic if missing | |||
m_viewmode(0,"F"); | m_viewmode(0,"F"); | |||
} | } | |||
if (err) { // not available, use prev. gallery | if (err) { // not available, use prev. gallery | |||
if (navi::gallerytype != TNONE) { | if (navi::gallerytype != TNONE) { | |||
if (navi::gallerytype == GDIR) | if (navi::gallerytype == FOLDER) | |||
gallery(navi::galleryname,"init",0); | gallery(navi::galleryname,"init",0); | |||
else gallery(navi::galleryname,"initF",0); | else gallery(navi::galleryname,"initF",0); | |||
gallery(0,"sort",-2); | gallery(0,"sort",-2); | |||
m_viewmode(0,"G"); | m_viewmode(0,"G"); | |||
} | } | |||
} | } | |||
} | } | |||
else if (strmatch(startdisplay,"specG")) { // start with specified gallery (folder) | else if (strmatch(startdisplay,"specG")) { // start with specified gallery (folder) | |||
if (startfolder && *startfolder == '/') { | if (startfolder && *startfolder == '/') { | |||
skipping to change at line 636 | skipping to change at line 646 | |||
m_viewmode(0,"F"); | m_viewmode(0,"F"); | |||
} | } | |||
save_params(); // save parameters now | save_params(); // save parameters now | |||
Plog(1,"start gallery: %s \n",navi::galleryname); | Plog(1,"start gallery: %s \n",navi::galleryname); | |||
Plog(1,"start file: %s \n",curr_file); | Plog(1,"start file: %s \n",curr_file); | |||
g_timeout_add(10,gtimefunc,0); // start periodic function (10 ms) | g_timeout_add(10,gtimefunc,0); // start periodic function (10 ms) | |||
zshell("log","gsettings set org.gnome.mutter check-alive-timeout 30000"); // GTK no-resonse timeout = 30 sec. 22.30 | zshell("log","gsettings set org.gnome.mutter check-alive-timeout 10000"); // GTK no-resonse timeout = 10 sec. 22.31 | |||
startsecs = get_seconds() - startsecs; | startsecs = get_seconds() - startsecs; | |||
Plog(1,"startup time: %.1f secs.\n",startsecs); | Plog(1,"startup time: %.1f secs.\n",startsecs); | |||
if (commandmenu) { // startup menu on command line | if (commandmenu) { // startup menu on command line | |||
Plog(1,"start menu: %s \n",commandmenu); | Plog(1,"start menu: %s \n",commandmenu); | |||
for (ii = 0; ii < Nmenus; ii++) { // convert menu name to menu function | for (ii = 0; ii < Nmenus; ii++) { // convert menu name to menu function | |||
if (! menutab[ii].menu) continue; // separator, null menu | if (! menutab[ii].menu) continue; // separator, null menu | |||
if (strmatchcase(commandmenu,menutab[ii].menu)) break; | if (strmatchcase(commandmenu,menutab[ii].menu)) break; | |||
} | } | |||
skipping to change at line 667 | skipping to change at line 677 | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// Check that necessary outboard programs are installed. | // Check that necessary outboard programs are installed. | |||
// List optional programs for added capabilities. | // List optional programs for added capabilities. | |||
// Return 0/1 if all required programs are/not installed. | // Return 0/1 if all required programs are/not installed. | |||
int check_outboards(int fshow) // 22.1 | int check_outboards(int fshow) // 22.1 | |||
{ | { | |||
zdialog *zd; | zdialog *zd; | |||
int err; | int err; | |||
cchar *YN[12] = { "No", "No", "No", "No", "No", "No", "No", "No", "No", "N o", "No", "No" }; | cchar *YN[13] = { "No", "No", "No", "No", "No", "No", "No", "No", "No", "N o", "No", "No", "No" }; | |||
err = zshell(0,"which exiftool >/dev/null 2>&1"); // check for exiftool | err = zshell(0,"which exiftool >/dev/null 2>&1"); // check for exiftool | |||
if (! err) { Fexiftool = 1; YN[0] = "Yes"; } | if (! err) { Fexiftool = 1; YN[0] = "Yes"; } | |||
err = zshell(0,"which dcraw >/dev/null 2>&1"); // check for Dcraw | err = zshell(0,"which dcraw >/dev/null 2>&1"); // check for Dcraw | |||
if (! err) { Fdcraw = 1; YN[1] = "Yes"; } | if (! err) { Fdcraw = 1; YN[1] = "Yes"; } | |||
err = zshell(0,"which addr2line >/dev/null 2>&1"); // check for addr2line | err = zshell(0,"which addr2line >/dev/null 2>&1"); // check for addr2line | |||
if (! err) { Faddr2line = 1; YN[2] = "Yes"; } | if (! err) { Faddr2line = 1; YN[2] = "Yes"; } | |||
skipping to change at line 705 | skipping to change at line 715 | |||
err = zshell(0,"which darktable >/dev/null 2>&1"); // check for Darktable | err = zshell(0,"which darktable >/dev/null 2>&1"); // check for Darktable | |||
if (! err) { Fdarktable = 1; YN[9] = "Yes"; } | if (! err) { Fdarktable = 1; YN[9] = "Yes"; } | |||
err = zshell(0,"which darktable-cli >/dev/null 2>&1"); // Darktable command line | err = zshell(0,"which darktable-cli >/dev/null 2>&1"); // Darktable command line | |||
if (! err) { Fdarktablecli = 1; YN[10] = "Yes"; } | if (! err) { Fdarktablecli = 1; YN[10] = "Yes"; } | |||
err = zshell(0,"which growisofs >/dev/null 2>&1"); // check for growisofs | err = zshell(0,"which growisofs >/dev/null 2>&1"); // check for growisofs | |||
if (! err) { Fgrowisofs = 1; YN[11] = "Yes"; } | if (! err) { Fgrowisofs = 1; YN[11] = "Yes"; } | |||
if (fshow || ! Fdcraw || ! Fexiftool) | err = zshell(0,"which vlc >/dev/null 2>&1"); | |||
// show table if first install or | // check for vlc 22.31 | |||
if (! err) { Fvlc = 1; YN[12] = "Yes"; } | ||||
if (fshow || ! Fdcraw || ! Fexiftool || ! Faddr2line) | ||||
// show table if first install or 22.31 | ||||
{ // any required programs missing | { // any required programs missing | |||
zd = popup_report_open("Outboard Programs",Mwin,900,400,1,0,"OK",0); | zd = popup_report_open("Outboard Programs",Mwin,900,400,1,0,"OK",0); | |||
// 22.15 | popup_report_write(zd,1, "PROGRAM PURPOSE REQUIRED INSTALLED | |||
popup_report_write(zd,1, "PROGRAM PURPOSE REQUIRED INSTALL | PACKAGE (DEBIAN NAME) \n"); | |||
ED PACKAGE (DEBIAN NAME) \n"); | popup_report_write(zd,0, "exiftool metadata YES %-3s | |||
popup_report_write(zd,0, "exiftool metadata YES %-3s | libimage-exiftool-perl \n",YN[0]); | |||
libimage-exiftool-perl \n",YN[0]); | popup_report_write(zd,0, "dcraw RAW files YES %-3s | |||
popup_report_write(zd,0, "dcraw RAW files YES %-3s | dcraw \n",YN[1]); | |||
dcraw \n",YN[1]); | popup_report_write(zd,0, "addr2line crash report YES %-3s | |||
popup_report_write(zd,0, "addr2line crash report YES %-3s | binutils \n",YN[2]); | |||
binutils \n",YN[2]); | popup_report_write(zd,0, "ffmpeg video files No %-3s | |||
popup_report_write(zd,0, "ffmpeg video files NO %-3s | ffmpeg \n",YN[3]); | |||
ffmpeg \n",YN[3]); | popup_report_write(zd,0, "dwebp .webp files No %-3s | |||
popup_report_write(zd,0, "dwebp .webp files NO %-3s | wepb \n",YN[4]); | |||
wepb \n",YN[4]); | popup_report_write(zd,0, "heif-convert .heic files No %-3s | |||
popup_report_write(zd,0, "heif-convert .heic files NO %-3s | libheif-examples \n",YN[5]); | |||
libheif-examples \n",YN[5]); | popup_report_write(zd,0, "opj_decompress .jp2 files No %-3s | |||
popup_report_write(zd,0, "opj_decompress .jp2 files NO %-3s | libopenjp2-tools \n",YN[6]); | |||
libopenjp2-tools \n",YN[6]); | popup_report_write(zd,0, "rawtherapee RAW editor No %-3s | |||
popup_report_write(zd,0, "rawtherapee RAW editor NO %-3s | rawtherapee \n",YN[7]); | |||
rawtherapee \n",YN[7]); | popup_report_write(zd,0, "rawtherapee-cli RAW convert No %-3s | |||
popup_report_write(zd,0, "rawtherapee-cli RAW convert NO %-3s | rawtherapee \n",YN[8]); | |||
rawtherapee \n",YN[8]); | popup_report_write(zd,0, "darktable RAW editor No %-3s | |||
popup_report_write(zd,0, "darktable RAW editor NO %-3s | darktable \n",YN[9]); | |||
darktable \n",YN[9]); | popup_report_write(zd,0, "darktable-cli RAW convert No %-3s | |||
popup_report_write(zd,0, "darktable-cli RAW convert NO %-3s | darktable \n",YN[10]); | |||
darktable \n",YN[10]); | popup_report_write(zd,0, "growisofs write DVD/BR No %-3s | |||
popup_report_write(zd,0, "growisofs write DVD/BR NO %-3s | growisofs \n",YN[11]); | |||
growisofs \n",YN[11]); | popup_report_write(zd,0, "vlc media play No %-3s | |||
vlc \n",YN[12]); | ||||
if (! Fdcraw || ! Fexiftool) | if (! Fdcraw || ! Fexiftool || ! Faddr2line) // 22.31 | |||
{ | { | |||
cchar *x1 = "", *x2 = ""; | ||||
if (! Fdcraw) x1 = "dcraw"; | ||||
if (! Fexiftool) x2 = "exiftool"; | ||||
popup_report_write(zd,0,"\n"); | popup_report_write(zd,0,"\n"); | |||
popup_report_write(zd,1, "Following programs must be installed: %s %s | popup_report_write(zd,1,"Please install the following programs using yo | |||
\n" | ur package manager: \n"); | |||
"Please install using your package manager",x1 | if (! Fdcraw) popup_report_write(zd,0," dcraw \n"); | |||
,x2); | if (! Fexiftool) popup_report_write(zd,0," exiftool \n"); | |||
if (! Faddr2line) popup_report_write(zd,0," addr2line \n"); | ||||
} | } | |||
zdialog_wait(zd); | zdialog_wait(zd); | |||
} | } | |||
// list optional programs and installation status | // list optional programs and installation status | |||
if (! Fexiftool) Plog(1,"exiftool not installed (REQUIRED) \n"); | if (! Fexiftool) Plog(0,"exiftool not installed (REQUIRED) \n"); | |||
if (! Fdcraw) Plog(1,"dcraw not installed (REQUIRED) \n"); | if (! Fdcraw) Plog(0,"dcraw not installed (REQUIRED) \n"); | |||
if (! Faddr2line) Plog(1,"addr2line not installed (REQUIRED) \n"); // now required 22.30 | if (! Faddr2line) Plog(0,"addr2line not installed (REQUIRED) \n"); // now required 22.30 | |||
if (! Ffmpeg) Plog(1,"ffmpeg not installed (required for video files) \n"); | if (! Ffmpeg) Plog(1,"ffmpeg not installed (required for video files) \n"); | |||
if (! Fwebp) Plog(1,"dwebp not installed (required for .webp files) \n"); // WEBP files | if (! Fwebp) Plog(1,"dwebp not installed (required for .webp files) \n"); // WEBP files | |||
else if (! strstr(imagefiletypes,".webp")) // add .webp file type | else if (! strstr(imagefiletypes,".webp")) // add .webp file type | |||
strcat(imagefiletypes,".webp "); | strcat(imagefiletypes,".webp "); | |||
if (! Fheif) Plog(1,"heif-convert not installed (required for .heic files) \n "); // iPhone photos | if (! Fheif) Plog(1,"heif-convert not installed (required for .heic files) \n "); // iPhone photos | |||
else if (! strstr(imagefiletypes,".heic")) // add .heic file type | else if (! strstr(imagefiletypes,".heic")) // add .heic file type | |||
strcat(imagefiletypes,".heic "); | strcat(imagefiletypes,".heic "); | |||
skipping to change at line 763 | skipping to change at line 776 | |||
if (! Fjp2) Plog(1,"opj_decompress not installed (required for .jp2 files) \n "); // jpeg2000 files | if (! Fjp2) Plog(1,"opj_decompress not installed (required for .jp2 files) \n "); // jpeg2000 files | |||
else if (! strstr(imagefiletypes,".jp2")) // add .jp2 file type | else if (! strstr(imagefiletypes,".jp2")) // add .jp2 file type | |||
strcat(imagefiletypes,".jp2 "); | strcat(imagefiletypes,".jp2 "); | |||
if (! Frawtherapee) Plog(1,"rawtherapee not installed (alternate RAW editor) \n"); | if (! Frawtherapee) Plog(1,"rawtherapee not installed (alternate RAW editor) \n"); | |||
if (! Frawtherapeecli) Plog(1,"rawtherapee-cli not installed (alternate batch RAW processor) \n"); | if (! Frawtherapeecli) Plog(1,"rawtherapee-cli not installed (alternate batch RAW processor) \n"); | |||
if (! Fdarktable) Plog(1,"darktable not installed (alternate RAW editor) \n") ; | if (! Fdarktable) Plog(1,"darktable not installed (alternate RAW editor) \n") ; | |||
if (! Fdarktablecli) Plog(1,"darktable-cli not installed (alternate batch RAW processor) \n"); | if (! Fdarktablecli) Plog(1,"darktable-cli not installed (alternate batch RAW processor) \n"); | |||
if (! Frawtherapeecli && ! Fdarktablecli) Frawloader = 1; | ||||
// force dcraw if no others | ||||
if (! Fgrowisofs) Plog(1,"growisofs not installed (write image files to DVD/B lueRay disc) \n"); | if (! Fgrowisofs) Plog(1,"growisofs not installed (write image files to DVD/B lueRay disc) \n"); | |||
if (! Frawtherapeecli && ! Fdarktablecli) Frawloader = 1; // force dcraw if no others | if (! Fvlc) Plog(1,"vlc not installed (play media files) \n"); // 22.31 | |||
if (Fdcraw + Fexiftool + Faddr2line < 3) return 1; // all required programs not installed | if (Fdcraw + Fexiftool + Faddr2line < 3) return 1; // all required programs not installed | |||
return 0; // required programs are installed | return 0; // required programs are installed | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// Fotoxx first startup - initial user decision about indexing | // Fotoxx first startup - initial user decision about indexing | |||
void first_startup() | void first_startup() | |||
skipping to change at line 797 | skipping to change at line 812 | |||
cchar *index1 = " Index image files now:"; | cchar *index1 = " Index image files now:"; | |||
cchar *index2 = " • Initial indexing may need considerable time \n" | cchar *index2 = " • Initial indexing may need considerable time \n" | |||
" • Subsequent startups will be fast \n" | " • Subsequent startups will be fast \n" | |||
" • Full functionality will be available \n" | " • Full functionality will be available \n" | |||
" • Thumbnail galleries will be fast"; | " • Thumbnail galleries will be fast"; | |||
cchar *info = " Indexing time depends on the number of image files and the \n" | cchar *info = " Indexing time depends on the number of image files and the \n" | |||
" speed of your computer. This can be a few hundred to a few \n" | " speed of your computer. This can be a few hundred to a few \n" | |||
" thousand per minute. After indexing is done, startup time \n" | " thousand per minute. After indexing is done, startup time \n" | |||
" should be quite fast. You can change index options later, \n" | " should be quite fast. You can change index options later, \n" | |||
" using these menus: Tools > Index, Tools > Preferences. \n" | " using these menus: Tools > Index, Tools > Settings. \n" | |||
" \n" | " \n" | |||
" WARNING: Some image collections include corrupted files \n " | " WARNING: Some image collections include corrupted files \n " | |||
" that can cause Fotoxx or a library function to crash. \n" | " that can cause Fotoxx or a library function to crash. \n" | |||
" Delete or move the file elsewhere and start Fotoxx again." ; | " Delete or move the file elsewhere and start Fotoxx again." ; | |||
if (Ftinycomputer) { | if (Ftinycomputer) { | |||
yn = zmessageYN(Mwin,"Main memory is too small to run Fotoxx. \n" | yn = zmessageYN(Mwin,"Main memory is too small to run Fotoxx. \n" | |||
"You can try anyway if you wish. \n" | "You can try anyway if you wish. \n" | |||
" Continue?"); | " Continue?"); | |||
if (! yn) quitxx(); | if (! yn) quitxx(); | |||
skipping to change at line 832 | skipping to change at line 847 | |||
| (o) Index image files now: | | | (o) Index image files now: | | |||
| • Initial indexing may need considerable time | | | • Initial indexing may need considerable time | | |||
| • Subsequent startups will be fast | | | • Subsequent startups will be fast | | |||
| • Full functionality will be available | | | • Full functionality will be available | | |||
| • Thumbnail galleries will be fast | | | • Thumbnail galleries will be fast | | |||
| | | | | | |||
| Indexing time depends on the number of image files and the | | | Indexing time depends on the number of image files and the | | |||
| speed of your computer. This can be a few hundred to a few | | | speed of your computer. This can be a few hundred to a few | | |||
| thousand per minute. After indexing is done, startup time | | | thousand per minute. After indexing is done, startup time | | |||
| should be quite fast. You can change index options later, | | | should be quite fast. You can change index options later, | | |||
| using these menus: Tools > Index, Tools > Preferences. | | | using these menus: Tools > Index, Tools > Settings. | | |||
| | | | | | |||
| WARNING: Some image collections include corrupted files | | | WARNING: Some image collections include corrupted files | | |||
| that can cause Fotoxx or a library function to crash. | | | that can cause Fotoxx or a library function to crash. | | |||
| Delete or move the file elsewhere and start Fotoxx again. | | | Delete or move the file elsewhere and start Fotoxx again. | | |||
| | | | | | |||
| [Help] [Proceed] [Quit] | | | [Help] [Proceed] [Quit] | | |||
|______________________________________________________________| | |______________________________________________________________| | |||
***/ | ***/ | |||
skipping to change at line 872 | skipping to change at line 887 | |||
zstat = zdialog_wait(zd); | zstat = zdialog_wait(zd); | |||
} | } | |||
if (zstat == 2) // [Proceed] button | if (zstat == 2) // [Proceed] button | |||
{ | { | |||
topfolders[0] = zstrdup(getenv("HOME"),"top-folders"); // default top folder = /home/<user> | topfolders[0] = zstrdup(getenv("HOME"),"top-folders"); // default top folder = /home/<user> | |||
Ntopfolders = 1; | Ntopfolders = 1; | |||
snprintf(thumbfolder,200,"%s/thumbnails",get_zhomedir()); // create thumbnails folder if needed | snprintf(thumbfolder,200,"%s/thumbnails",get_zhomedir()); // create thumbnails folder if needed | |||
if (! dirfile(thumbfolder)) { // default: /home/<user>/.fotoxx/thumbnails | if (! dirfile(thumbfolder)) { // default: /home/<user>/.fotoxx/thumbnails | |||
err = zshell("ack","mkdir -p -m 0750 \"%s\" ",thumbfolder); // create | err = zshell("log ack","mkdir -p -m 0750 \"%s\" ",thumbfolder); // create | |||
if (err) quitxx(); | if (err) quitxx(); | |||
} | } | |||
zdialog_fetch(zd,"index1",nn); | zdialog_fetch(zd,"index1",nn); | |||
zdialog_free(zd); | zdialog_free(zd); | |||
if (nn) { // do indexing | if (nn) { // do indexing | |||
Findexlev = 2; // fotoxx command: full index process | Findexlev = 2; // fotoxx command: full index process | |||
FMindexlev = 1; // file manager: use curr. index | FMindexlev = 1; // file manager: use curr. index | |||
} | } | |||
else Findexlev = FMindexlev = 0; // use no index | else Findexlev = FMindexlev = 0; // use no index | |||
skipping to change at line 899 | skipping to change at line 914 | |||
return; | return; | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// functions for main window event signals | // functions for main window event signals | |||
int delete_event() // main window [x] button | int delete_event() // main window [x] button | |||
{ | { | |||
Plog(1,"main window delete event \n"); | Plog(0,"main window delete event \n"); | |||
m_quit(0,0); // returns if user does not quit | m_quit(0,0); // returns if user does not quit | |||
return 1; | return 1; | |||
} | } | |||
int destroy_event() // main window destroyed | int destroy_event() // main window destroyed | |||
{ | { | |||
Plog(1,"main window destroy event \n"); // no user bailout possible | Plog(0,"main window destroy event \n"); // no user bailout possible | |||
quitxx(); | quitxx(); | |||
return 0; | return 0; | |||
} | } | |||
int state_event(GtkWidget *, GdkEvent *event) // main window state changed | int state_event(GtkWidget *, GdkEvent *event) // main window state changed | |||
{ | { | |||
int state = ((GdkEventWindowState *) event)->new_window_state; // track window fullscreen status | int state = ((GdkEventWindowState *) event)->new_window_state; // track window fullscreen status | |||
if (state & GDK_WINDOW_STATE_FULLSCREEN) Ffullscreen = 1; | if (state & GDK_WINDOW_STATE_FULLSCREEN) Ffullscreen = 1; | |||
else if (state & GDK_WINDOW_STATE_MAXIMIZED) Ffullscreen = 1; | else if (state & GDK_WINDOW_STATE_MAXIMIZED) Ffullscreen = 1; | |||
else Ffullscreen = 0; | else Ffullscreen = 0; | |||
skipping to change at line 1092 | skipping to change at line 1107 | |||
if (cpuload <= 9) strcat(text1,digitblank); | if (cpuload <= 9) strcat(text1,digitblank); | |||
if (Fslideshow) { | if (Fslideshow) { | |||
gtk_label_set_label(GTK_LABEL(Fpanlab),text1); // done if slide show | gtk_label_set_label(GTK_LABEL(Fpanlab),text1); // done if slide show | |||
gtk_widget_show_all(Fpanel); | gtk_widget_show_all(Fpanel); | |||
return; | return; | |||
} | } | |||
if (curr_file && Fpxb) | if (curr_file && Fpxb) | |||
{ | { | |||
if (E3pxm) { // edit function enganged | if (E3pxm) { // edit function engaged | |||
ww = E3pxm->ww; | ww = E3pxm->ww; | |||
hh = E3pxm->hh; | hh = E3pxm->hh; | |||
} | } | |||
else { | else { | |||
ww = Fpxb->ww; | ww = Fpxb->ww; | |||
hh = Fpxb->hh; | hh = Fpxb->hh; | |||
} | } | |||
bpc = curr_file_bpc; // file bits per channel | bpc = curr_file_bpc; // file bits per channel | |||
if (f_load_bpc_raw) bpc = f_load_bpc_raw; // use raw value (8/10/12/14/16) if raw file | if (f_load_bpc_raw) bpc = f_load_bpc_raw; // use raw value (8/10/12/14/16) if raw file | |||
skipping to change at line 1133 | skipping to change at line 1148 | |||
} | } | |||
if (sa_stat == 3) strncatv(text1,300," ",areaactive,0); | if (sa_stat == 3) strncatv(text1,300," ",areaactive,0); | |||
if (zfuncs::zdialog_busy) strncatv(text1,300," ",dialogopen,0); | if (zfuncs::zdialog_busy) strncatv(text1,300," ",dialogopen,0); | |||
if (Fblock(0,"blocked quiet")) strncatv(text1,300," ",blocked,0); // blocking function active | if (Fblock(0,"blocked quiet")) strncatv(text1,300," ",blocked,0); // blocking function active | |||
if (CEF && CEF->Fmods) strncatv(text1,300," ",modified,0); // image is modified | if (CEF && CEF->Fmods) strncatv(text1,300," ",modified,0); // image is modified | |||
if (*paneltext) strncatv(text1,300," ",paneltext,0); // application text | if (*paneltext) strncatv(text1,300," ",paneltext,0); // application text | |||
if (curr_file) { | if (curr_file) { | |||
pp = strrchr(curr_file,'/'); // "filename.jpg" | pp = strrchr(curr_file,'/'); // add filename.jpg | |||
if (pp && Ffullscreen && ! Ffuncbusy && ! Fthreadbusy) { | if (pp && Ffullscreen && ! Ffuncbusy && ! Fthreadbusy) { | |||
strncpy0(text2,pp+1,100); | strncpy0(text2,pp+1,100); | |||
strncatv(text1,300," ",text2,0); | strncatv(text1,300," ",text2,0); | |||
} | } | |||
} | } | |||
if (! strmatch(text1,ptext1)) { // if text changed, update panel bar | if (! strmatch(text1,ptext1)) { // if text changed, update panel bar | |||
gtk_label_set_label(GTK_LABEL(Fpanlab),text1); | gtk_label_set_label(GTK_LABEL(Fpanlab),text1); | |||
gtk_widget_show_all(Fpanel); | gtk_widget_show_all(Fpanel); | |||
strcpy(ptext1,text1); | strcpy(ptext1,text1); | |||
skipping to change at line 1219 | skipping to change at line 1234 | |||
int paintlock(int lock) // 22.30 | int paintlock(int lock) // 22.30 | |||
{ | { | |||
static int Fpaintlock = 0; | static int Fpaintlock = 0; | |||
if (lock == 1) | if (lock == 1) | |||
{ | { | |||
for (int ii = 0; ii < 500; ii++) { // try up to 5 seconds | for (int ii = 0; ii < 500; ii++) { // try up to 5 seconds | |||
if (resource_lock(Fpaintlock)) return 1; // OK, locked for caller | if (resource_lock(Fpaintlock)) return 1; // OK, locked for caller | |||
zsleep(0.01); | zsleep(0.01); | |||
if (ii == 100) Plog(1,"waiting for Fpaintlock \n"); | if (ii == 100) Plog(0,"waiting for Fpaintlock \n"); | |||
} | } | |||
zexit("Fpaintlock locked, give up"); // failed, no way out | zexit("Fpaintlock locked, give up"); // failed, no way out | |||
} | } | |||
else if (lock == 0) { | else if (lock == 0) { | |||
resource_unlock(Fpaintlock); | resource_unlock(Fpaintlock); | |||
return 0; | return 0; | |||
} | } | |||
else if (lock == -1) return Fpaintlock; | else if (lock == -1) return Fpaintlock; | |||
skipping to change at line 1620 | skipping to change at line 1635 | |||
px1 = px2 - Morgx + Dorgx; // corresp. position in drawing window | px1 = px2 - Morgx + Dorgx; // corresp. position in drawing window | |||
py1 = py2 - Morgy + Dorgy; | py1 = py2 - Morgy + Dorgy; | |||
if (px1 + ww2 >= Dww) ww2 = Dww - px1 - 1; // stay within window | if (px1 + ww2 >= Dww) ww2 = Dww - px1 - 1; // stay within window | |||
if (py1 + hh2 >= Dhh) hh2 = Dhh - py1 - 1; | if (py1 + hh2 >= Dhh) hh2 = Dhh - py1 - 1; | |||
if (ww2 <= 0 || hh2 <= 0) return; | if (ww2 <= 0 || hh2 <= 0) return; | |||
pixbuf = gdk_pixbuf_new_subpixbuf(Mpxb->pixbuf,px2,py2,ww2,hh2); // Mpxb area to paint | pixbuf = gdk_pixbuf_new_subpixbuf(Mpxb->pixbuf,px2,py2,ww2,hh2); // Mpxb area to paint | |||
if (! pixbuf) { | if (! pixbuf) { | |||
Plog(1,"Fpaint4() pixbuf failure \n"); | Plog(0,"Fpaint4() pixbuf failure \n"); | |||
return; | return; | |||
} | } | |||
px2 = px1; // corresp. position in drawing window | px2 = px1; // corresp. position in drawing window | |||
py2 = py1; | py2 = py1; | |||
px1 = px2 - Dorgx; // corresp. position in background image | px1 = px2 - Dorgx; // corresp. position in background image | |||
py1 = py2 - Dorgy; | py1 = py2 - Dorgy; | |||
if (! cr) { | if (! cr) { | |||
skipping to change at line 1647 | skipping to change at line 1662 | |||
hh1 = hh2; | hh1 = hh2; | |||
if (px1 + ww1 > dww) ww1 = dww - px1; | if (px1 + ww1 > dww) ww1 = dww - px1; | |||
if (py1 + hh1 > dhh) hh1 = dhh - py1; | if (py1 + hh1 > dhh) hh1 = dhh - py1; | |||
if (ww1 > 0 && hh1 > 0) { | if (ww1 > 0 && hh1 > 0) { | |||
bgpixbuf = gdk_pixbuf_new_subpixbuf(BGpixbuf,px1,py1,ww1,hh1); | bgpixbuf = gdk_pixbuf_new_subpixbuf(BGpixbuf,px1,py1,ww1,hh1); | |||
if (bgpixbuf) { | if (bgpixbuf) { | |||
gdk_cairo_set_source_pixbuf(cr,bgpixbuf,px2,py2); | gdk_cairo_set_source_pixbuf(cr,bgpixbuf,px2,py2); | |||
cairo_paint(cr); | cairo_paint(cr); | |||
g_object_unref(bgpixbuf); | g_object_unref(bgpixbuf); | |||
} | } | |||
else Plog(1,"Fpaint4() bgpixbuf failure \n"); | else Plog(0,"Fpaint4() bgpixbuf failure \n"); | |||
} | } | |||
} | } | |||
gdk_cairo_set_source_pixbuf(cr,pixbuf,px2,py2); // draw area to window | gdk_cairo_set_source_pixbuf(cr,pixbuf,px2,py2); // draw area to window | |||
cairo_paint(cr); | cairo_paint(cr); | |||
g_object_unref(pixbuf); | g_object_unref(pixbuf); | |||
if (Fshowarea) { | if (Fshowarea) { | |||
px3 = (px2 - Dorgx + Morgx) / Mscale; // back to image scale, expanded | px3 = (px2 - Dorgx + Morgx) / Mscale; // back to image scale, expanded | |||
skipping to change at line 1972 | skipping to change at line 1987 | |||
// keyboard event functions | // keyboard event functions | |||
// GDK key symbols: /usr/include/gtk-3.0/gdk/gdkkeysyms.h | // GDK key symbols: /usr/include/gtk-3.0/gdk/gdkkeysyms.h | |||
namespace crop_names { void KBfunc(int key); } // keyboard functions called from here | namespace crop_names { void KBfunc(int key); } // keyboard functions called from here | |||
namespace perspective { void KBfunc(int key); } | namespace perspective { void KBfunc(int key); } | |||
namespace mashup { void KBfunc(int key); } | namespace mashup { void KBfunc(int key); } | |||
namespace view360 { void KB_func(int key); } | namespace view360 { void KB_func(int key); } | |||
int KBpress(GtkWidget *, GdkEventKey *event, void *) // keyboard key was pressed | int KBpress(GtkWidget *, GdkEventKey *event, void *) // keyboard key was pressed | |||
{ | { | |||
int ii, jj, cc; | int ii, jj, cc; | |||
char shortkey[20] = ""; | char shortkey[20] = ""; | |||
cchar *KBchar = 0, *action = 0; | cchar *KBchar = 0, *action = 0; | |||
char *pp, *file = 0, *qfile; | char *pp, *file = 0, *qfile; | |||
static int Fshowmenu = 1; | ||||
// 22.35 | ||||
KBkey = event->keyval; // input key | KBkey = event->keyval; // input key | |||
KBchar = gdk_keyval_name(KBkey); // graphic char. for key | KBchar = gdk_keyval_name(KBkey); // graphic char. for key | |||
Plog(2,"KB key: %s \n",KBchar); | Plog(2,"KB key: %s \n",KBchar); | |||
if ((KBkey & 0xfff0) == 0xffe0) return 1; // Ctrl/Shift/Alt key | if ((KBkey & 0xfff0) == 0xffe0) return 1; // Ctrl/Shift/Alt key | |||
KBcontrolkey = KBshiftkey = KBaltkey = 0; // look for combination keys | KBcontrolkey = KBshiftkey = KBaltkey = 0; // look for combination keys | |||
if (event->state & GDK_CONTROL_MASK) KBcontrolkey = 1; | if (event->state & GDK_CONTROL_MASK) KBcontrolkey = 1; | |||
if (event->state & GDK_SHIFT_MASK) KBshiftkey = 1; | if (event->state & GDK_SHIFT_MASK) KBshiftkey = 1; | |||
skipping to change at line 2027 | skipping to change at line 2043 | |||
ss_KBfunc(KBkey); // pass key to slide show | ss_KBfunc(KBkey); // pass key to slide show | |||
return 1; | return 1; | |||
} | } | |||
if (Fview360) { // view360 active | if (Fview360) { // view360 active | |||
view360::KB_func(KBkey); // pass key to view360 | view360::KB_func(KBkey); // pass key to view360 | |||
return 1; | return 1; | |||
} | } | |||
if (KBkey == GDK_KEY_Escape) { // ESC key | if (KBkey == GDK_KEY_Escape) { // ESC key | |||
Plog(0,"escape key \n"); // 22.31 | ||||
if (Fescape) Fescape++; // killable function active, escalate | if (Fescape) Fescape++; // killable function active, escalate | |||
else if (Ffullscreen) win_unfullscreen(); // full-screen mode, shrink | else if (Ffullscreen) win_unfullscreen(); // full-screen mode, shrink | |||
else if (FGWM != 'F') m_viewmode(0,"F"); // file view mode if not already 22.1 | else if (FGWM != 'F') m_viewmode(0,"F"); // file view mode if not already 22.1 | |||
else m_quit(0,0); | else if (Fwsl) return 1; | |||
// quit with cancel option | // Win 11 bug - escape persists 22.31 | |||
else m_quit(0,0); | ||||
// quit fotoxx | ||||
return 1; // ESC also terminates dialogs | return 1; // ESC also terminates dialogs | |||
} | } | |||
if (KBkey == GDK_KEY_F10) { // F10: fullscreen toggle with menu | if (KBkey == GDK_KEY_F10) { // F10: fullscreen toggle with menu | |||
if (! Ffullscreen) win_fullscreen(0); // toggle full-screen mode and back | if (! Ffullscreen) win_fullscreen(0); // toggle full-screen mode and back | |||
else win_unfullscreen(); | else win_unfullscreen(); | |||
Fshowmenu = 1; | ||||
return 1; | return 1; | |||
} | } | |||
if (KBkey == GDK_KEY_F11) { // F11: fullscreen toggle no menu | if (KBkey == GDK_KEY_F11) { // F11: fullscreen toggle without menu | |||
if (! Ffullscreen) win_fullscreen(1); // toggle full-screen mode and back | if (! Ffullscreen) win_fullscreen(1); // toggle full-screen mode and back | |||
else if (Fshowmenu) win_fullscreen(1); | ||||
else win_unfullscreen(); | else win_unfullscreen(); | |||
Fshowmenu = 0; | ||||
return 1; | return 1; | |||
} | } | |||
if (KBkey == GDK_KEY_p) // P key, play video file | if (KBkey == GDK_KEY_p) // P key, play video file | |||
{ // (OK to also use P in shortcuts) | { // (OK to also use P in shortcuts) | |||
if (! curr_file) return 1; | if (! curr_file) return 1; | |||
if (image_file_type(curr_file) == VIDEO) | if (image_file_type(curr_file) == VIDEO) | |||
{ | { | |||
file = zescape_quotes(curr_file); | file = zescape_quotes(curr_file); | |||
cc = strlen(file) + 4; | cc = strlen(file) + 4; | |||
qfile = (char *) zmalloc(cc,"KBpress"); | qfile = (char *) zmalloc(cc,"KBpress"); | |||
strncatv(qfile,cc,"\"",file,"\"",0); | strncatv(qfile,cc,"\"",file,"\"",0); | |||
zshell("log ack",video_command,qfile); // video-command "curr_file" | zshell("ack",video_command,qfile); // video-command "curr_file" | |||
zfree(file); | zfree(file); | |||
zfree(qfile); | zfree(qfile); | |||
return 1; | return 1; | |||
} | } | |||
pp = strrchr(curr_file,'.'); // play animated GIF file | pp = strrchr(curr_file,'.'); // play animated GIF file | |||
if (pp && strstr(".gif .GIF",pp)) { | if (pp && strstr(".gif .GIF",pp)) { | |||
play_gif(curr_file); | play_gif(curr_file); | |||
return 1; | return 1; | |||
} | } | |||
skipping to change at line 2095 | skipping to change at line 2116 | |||
if (KBkey == GDK_KEY_KP_1) KBkey = GDK_KEY_End; | if (KBkey == GDK_KEY_KP_1) KBkey = GDK_KEY_End; | |||
if (KBkey == GDK_KEY_KP_2) KBkey = GDK_KEY_Down; | if (KBkey == GDK_KEY_KP_2) KBkey = GDK_KEY_Down; | |||
if (KBkey == GDK_KEY_KP_3) KBkey = GDK_KEY_Page_Down; | if (KBkey == GDK_KEY_KP_3) KBkey = GDK_KEY_Page_Down; | |||
if (KBkey == GDK_KEY_KP_Enter) KBkey = GDK_KEY_Return; | if (KBkey == GDK_KEY_KP_Enter) KBkey = GDK_KEY_Return; | |||
if (KBkey == GDK_KEY_Delete) action = (char *) "Delete"; // reserved shortcuts | if (KBkey == GDK_KEY_Delete) action = (char *) "Delete"; // reserved shortcuts | |||
if (KBkey == GDK_KEY_Left) action = (char *) "Left"; | if (KBkey == GDK_KEY_Left) action = (char *) "Left"; | |||
if (KBkey == GDK_KEY_Right) action = (char *) "Right"; | if (KBkey == GDK_KEY_Right) action = (char *) "Right"; | |||
if (KBkey == GDK_KEY_Up) action = (char *) "Up"; | if (KBkey == GDK_KEY_Up) action = (char *) "Up"; | |||
if (KBkey == GDK_KEY_Down) action = (char *) "Down"; | if (KBkey == GDK_KEY_Down) action = (char *) "Down"; | |||
if (KBkey == GDK_KEY_Home) action = (char *) "First"; | if (KBkey == GDK_KEY_Home) action = (char *) "Home"; | |||
if (KBkey == GDK_KEY_End) action = (char *) "Last"; | if (KBkey == GDK_KEY_End) action = (char *) "End"; | |||
if (KBkey == GDK_KEY_Page_Up) action = (char *) "Page_Up"; | if (KBkey == GDK_KEY_Page_Up) action = (char *) "Page_Up"; | |||
if (KBkey == GDK_KEY_Page_Down) action = (char *) "Page_Down"; | if (KBkey == GDK_KEY_Page_Down) action = (char *) "Page_Down"; | |||
if (KBkey == GDK_KEY_plus) action = (char *) "Zoom+"; | if (KBkey == GDK_KEY_plus) action = (char *) "Zoom+"; | |||
if (KBkey == GDK_KEY_minus) action = (char *) "Zoom-"; | if (KBkey == GDK_KEY_minus) action = (char *) "Zoom-"; | |||
if (KBkey == GDK_KEY_z) action = (char *) "toggle-zoom"; | if (KBkey == GDK_KEY_z) action = (char *) "toggle-zoom"; | |||
if (KBkey == GDK_KEY_Return) action = (char *) "Open"; // 22.30 | if (KBkey == GDK_KEY_Return) action = (char *) "Open"; // 22.30 | |||
if (! action) // custom shortcut | if (! action) // custom shortcut | |||
{ | { | |||
if (KBkey >= GDK_KEY_F2 && KBkey <= GDK_KEY_F9) { // input key is F2 to F9 | if (KBkey >= GDK_KEY_F2 && KBkey <= GDK_KEY_F9) { // input key is F2 to F9 | |||
skipping to change at line 2131 | skipping to change at line 2152 | |||
if (*shortkey) { // find key in shortcut list | if (*shortkey) { // find key in shortcut list | |||
for (ii = 0; ii < Nkbsu; ii++) | for (ii = 0; ii < Nkbsu; ii++) | |||
if (strmatchcase(shortkey,kbsutab[ii].key)) break; | if (strmatchcase(shortkey,kbsutab[ii].key)) break; | |||
if (ii < Nkbsu) action = kbsutab[ii].menu; // corresp. action or function | if (ii < Nkbsu) action = kbsutab[ii].menu; // corresp. action or function | |||
} | } | |||
} | } | |||
if (! action) { | if (! action) { | |||
if (strlen(shortkey) == 1) | if (strlen(shortkey) == 1) | |||
Plog(1,"shortcut key not found: %c \n",toupper(*shortkey)); | Plog(0,"shortcut key not found: %c \n",toupper(*shortkey)); | |||
else Plog(1,"shortcut key not found: %s \n",shortkey); | else Plog(0,"shortcut key not found: %s \n",shortkey); | |||
return 1; | return 1; | |||
} | } | |||
if (zstrstr(zdialog_button_shortcuts,action)) { // ignore [OK] [cancel] etc. | if (zstrstr(zdialog_button_shortcuts,action)) { // ignore [OK] [cancel] etc. | |||
Plog(1,"dialog button shortcut, ignored \n"); | Plog(0,"dialog button shortcut, ignored \n"); | |||
return 1; | return 1; | |||
} | } | |||
if (FGWM == 'G') { // G view mode | if (FGWM == 'G') { // G view mode | |||
navi::KBaction(action); // pass KB action to gallery | navi::KBaction(action); // pass KB action to gallery | |||
return 1; | return 1; | |||
} | } | |||
if (strmatch(action,"Show Hidden")) return 1; // hidden fles - only in G view | if (strmatch(action,"Show Hidden")) return 1; // hidden fles - only in G view | |||
if (FGWM == 'M') { // map view mode | if (FGWM == 'M') { // map view mode | |||
ii = strmatchV(action,"File View","Gallery",0); // allow only view mode changes | ii = strmatchV(action,"File View","Gallery",0); // allow only view mode changes | |||
if (! ii) { | if (! ii) { | |||
if (strlen(shortkey) == 1) | if (strlen(shortkey) == 1) | |||
Plog(1,"key ignored: %c %s \n",toupper(*shortkey),action); | Plog(0,"key ignored: %c %s \n",toupper(*shortkey),action); | |||
else Plog(1,"key ignored: %s %s \n",shortkey,action); | else Plog(0,"key ignored: %s %s \n",shortkey,action); | |||
return 1; | return 1; | |||
} | } | |||
} | } | |||
if (KBcapture) return 1; // let current function handle it | if (KBcapture) return 1; // let current function handle it | |||
if (Fmashup) { // mashup active, pass KB key | if (Fmashup) { // mashup active, pass KB key | |||
mashup::KBfunc(KBkey); | mashup::KBfunc(KBkey); | |||
return 1; | return 1; | |||
} | } | |||
skipping to change at line 2218 | skipping to change at line 2239 | |||
m_zoom(0,"toggle"); // (Z-key) | m_zoom(0,"toggle"); // (Z-key) | |||
return 1; | return 1; | |||
} | } | |||
// look up action in KB shortcut table, get corresp. function and arg. | // look up action in KB shortcut table, get corresp. function and arg. | |||
for (jj = 0; jj < Nkbsf; jj++) | for (jj = 0; jj < Nkbsf; jj++) | |||
if (strmatchcase(action,kbsftab[jj].menu)) break; | if (strmatchcase(action,kbsftab[jj].menu)) break; | |||
if (jj == Nkbsf) { | if (jj == Nkbsf) { | |||
Plog(1,"shortcut menu func not found: %s %s \n",shortkey,action); | Plog(0,"shortcut menu func not found: %s %s \n",shortkey,action); | |||
return 1; | return 1; | |||
} | } | |||
if (! kbsftab[jj].func) { | if (! kbsftab[jj].func) { | |||
Plog(1,"shortcut func null - ignored \n"); | Plog(0,"shortcut func null - ignored \n"); | |||
return 1; | return 1; | |||
} | } | |||
kbsftab[jj].func(0,kbsftab[jj].arg); // call the menu function | kbsftab[jj].func(0,kbsftab[jj].arg); // call the menu function | |||
return 1; | return 1; | |||
} | } | |||
int KBrelease(GtkWidget *win, GdkEventKey *event, void *) // KB key released | int KBrelease(GtkWidget *win, GdkEventKey *event, void *) // KB key released | |||
{ | { | |||
KBkey = 0; // reset current active key | KBkey = 0; // reset current active key | |||
return 1; | return 1; | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// set the main window to fullscreen status | // set the main window to fullscreen status | |||
// (with no menu or panel) | // (with or without menu and panel) | |||
void win_fullscreen(int hidemenu) | void win_fullscreen(int hidemenu) | |||
{ | { | |||
if (FGWM == 'F' && hidemenu) { // if F window, hide panel | if (FGWM == 'F' && hidemenu) { // if F window, hide panel | |||
gtk_widget_hide(MWmenu); | gtk_widget_hide(MWmenu); | |||
gtk_widget_hide(Fpanel); | gtk_widget_hide(Fpanel); | |||
Fpanelshow = 0; | Fpanelshow = 0; | |||
} | } | |||
if (hidemenu) gtk_window_fullscreen(MWIN); | if (hidemenu) gtk_window_fullscreen(MWIN); | |||
skipping to change at line 2321 | skipping to change at line 2342 | |||
if (*meta_names::meta_pdate) { | if (*meta_names::meta_pdate) { | |||
metadate_pdate(meta_names::meta_pdate,pdate,ptime); // get formatted date and time | metadate_pdate(meta_names::meta_pdate,pdate,ptime); // get formatted date and time | |||
strncpy0(pdatetime,pdate,11); // yyyy-mm-dd hh:mm:ss | strncpy0(pdatetime,pdate,11); // yyyy-mm-dd hh:mm:ss | |||
strncpy0(pdatetime+11,ptime,9); | strncpy0(pdatetime+11,ptime,9); | |||
pdatetime[10] = ' '; | pdatetime[10] = ' '; | |||
} | } | |||
else strcpy(pdatetime,"(undated)"); | else strcpy(pdatetime,"(undated)"); | |||
gtype = navi::gallerytype; | gtype = navi::gallerytype; | |||
if (gtype == GDIR) // gallery name = folder | if (gtype == FOLDER) // gallery name = folder | |||
snprintf(titlebar,250,"%s %d/%d %s %s %s", | snprintf(titlebar,250,"%s %d/%d %s %s %s", | |||
Frelease,fposn,Gimages,ffolder,fname,pdatetime); | Frelease,fposn,Gimages,ffolder,fname,pdatetime); | |||
else { | else { | |||
if (gtype == SEARCH || gtype == META) | if (gtype == SEARCH || gtype == META) | |||
strcpy(gname,"SEARCH RESULTS"); | strcpy(gname,"SEARCH RESULTS"); | |||
else if (gtype == ALBUM) { | else if (gtype == ALBUM) { | |||
pp = strrchr(navi::galleryname,'/'); | pp = strrchr(navi::galleryname,'/'); | |||
if (! pp) pp = navi::galleryname; | if (! pp) pp = navi::galleryname; | |||
else pp++; | else pp++; | |||
strcpy(gname,"ALBUM: "); | strcpy(gname,"ALBUM: "); | |||
skipping to change at line 2718 | skipping to change at line 2739 | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// maintain a set of text strings written over the image in the window. | // maintain a set of text strings written over the image in the window. | |||
// add a new text string to the list. | // add a new text string to the list. | |||
// multiple text strings can be added with the same ID. | // multiple text strings can be added with the same ID. | |||
// px and py are image space. | // px and py are image space. | |||
void add_toptext(int ID, int px, int py, cchar *text, cchar *font) | void add_toptext(int ID, int px, int py, cchar *text, cchar *font) | |||
{ | { | |||
if (Ntoptext == maxtoptext) { | if (Ntoptext == maxtoptext) { | |||
Plog(1,"*** maxtoptext exceeded \n"); | Plog(0,"*** maxtoptext exceeded \n"); | |||
return; | return; | |||
} | } | |||
int ii = Ntoptext++; | int ii = Ntoptext++; | |||
toptext[ii].ID = ID; | toptext[ii].ID = ID; | |||
toptext[ii].px = px; | toptext[ii].px = px; | |||
toptext[ii].py = py; | toptext[ii].py = py; | |||
toptext[ii].text = zstrdup(text,"toptext"); | toptext[ii].text = zstrdup(text,"toptext"); | |||
toptext[ii].font = zstrdup(font,"toptext"); | toptext[ii].font = zstrdup(font,"toptext"); | |||
skipping to change at line 2829 | skipping to change at line 2850 | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// maintain a set of circles drawn over the image in the window | // maintain a set of circles drawn over the image in the window | |||
// px, py are image space, radius is window space | // px, py are image space, radius is window space | |||
void add_topcircle(int px, int py, int radius) | void add_topcircle(int px, int py, int radius) | |||
{ | { | |||
if (Ntopcircles == maxtopcircles) { | if (Ntopcircles == maxtopcircles) { | |||
Plog(1,"*** maxtopcircles exceeded \n"); | Plog(0,"*** maxtopcircles exceeded \n"); | |||
return; | return; | |||
} | } | |||
int ii = Ntopcircles++; | int ii = Ntopcircles++; | |||
topcircles[ii].px = px; | topcircles[ii].px = px; | |||
topcircles[ii].py = py; | topcircles[ii].py = py; | |||
topcircles[ii].radius = radius; | topcircles[ii].radius = radius; | |||
return; | return; | |||
} | } | |||
skipping to change at line 3146 | skipping to change at line 3167 | |||
if (crflag) draw_context_destroy(draw_context); | if (crflag) draw_context_destroy(draw_context); | |||
return; | return; | |||
} | } | |||
/******************************************************************************* * | /******************************************************************************* * | |||
edit transaction management | edit transaction management | |||
edit_wwhhok() check image size within limits | edit_wwhhOK() check image size within limits | |||
edit_setup() get E0 if none, E0 > E1 > E3 | edit_setup() get E0 if none, E0 > E1 > E3 | |||
edit_cancel() free (E1 E3 ER) | edit_cancel() free (E1 E3 ER) | |||
edit_done() E3 > E0, free (E1 ER) add to undo stack | edit_done() E3 > E0, free (E1 ER) add to undo stack | |||
edit_undo() E3 > ER, E1 > E3 | edit_undo() E3 > ER, E1 > E3 | |||
edit_redo() ER > E3 | edit_redo() ER > E3 | |||
edit_reset() free ER, E1 > E3 | edit_reset() free ER, E1 > E3 | |||
edit_fullsize() free (E1 E3) E0 > E1 > E3 | edit_fullsize() free (E1 E3) E0 > E1 > E3 | |||
******************************************************************************** */ | ******************************************************************************** */ | |||
skipping to change at line 3297 | skipping to change at line 3318 | |||
return 1; | return 1; | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// print error message if CEF invalid | // print error message if CEF invalid | |||
int CEF_valid() | int CEF_valid() | |||
{ | { | |||
if (CEF) return 1; | if (CEF) return 1; | |||
Plog(1,"CEF invalid \n"); | Plog(0,"CEF invalid \n"); | |||
return 0; | return 0; | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
// process edit cancel | // process edit cancel | |||
// keep: retain zdialog, mousefunc, curves | // keep: retain zdialog, mousefunc, curves | |||
void edit_cancel(int keep) | void edit_cancel(int keep) | |||
{ | { | |||
skipping to change at line 3694 | skipping to change at line 3715 | |||
strncpy0(URS_menu[URS_pos],CEF->menuname,32); // edit function menu name | strncpy0(URS_menu[URS_pos],CEF->menuname,32); // edit function menu name | |||
if (CEF->edit_hist) | if (CEF->edit_hist) | |||
strncpy0(URS_parms[URS_pos],CEF->edit_hist,100); // edit history text | strncpy0(URS_parms[URS_pos],CEF->edit_hist,100); // edit history text | |||
else URS_parms[URS_pos][0] = 0; | else URS_parms[URS_pos][0] = 0; | |||
URS_saved[URS_pos] = 0; // not yet saved to disk | URS_saved[URS_pos] = 0; // not yet saved to disk | |||
} | } | |||
return; | return; | |||
writefail: | writefail: | |||
zmessageACK(Mwin,"undo/redo stack write failure: %d",errno); | zmessageACK(Mwin,"undo/redo stack write failure: %s",strerror(errno)); | |||
quitxx(); | quitxx(); | |||
} | } | |||
// Load PXM from undo/redo image file stack | // Load PXM from undo/redo image file stack | |||
// stack position = URS_pos | // stack position = URS_pos | |||
PXM * load_undo(int posn) | PXM * load_undo(int posn) | |||
{ | { | |||
char *pp, buff[24]; | char *pp, buff[24]; | |||
FILE *fid; | FILE *fid; | |||
skipping to change at line 3748 | skipping to change at line 3769 | |||
if (nn != 1) goto err3; | if (nn != 1) goto err3; | |||
cc1 -= ccmax; | cc1 -= ccmax; | |||
cc2 += ccmax; | cc2 += ccmax; | |||
} | } | |||
} | } | |||
fclose(fid); | fclose(fid); | |||
return pxm; | return pxm; | |||
err1: | err1: | |||
Plog(1,"err1: %s \n",URS_filename); // extended diagnostics | Plog(0,"err1: %s \n",URS_filename); // extended diagnostics | |||
goto readfail; | goto readfail; | |||
err2: | err2: | |||
Plog(1,"err2: open() failure, errno: %d %s \n",errno,strerror(errno)); | Plog(0,"err2: open() failure, errno: %d %s \n",errno,strerror(errno)); | |||
goto readfail; | goto readfail; | |||
err3: | err3: | |||
Plog(1,"err3: fread() failure, errno: %d %s \n",errno,strerror(errno)); | Plog(0,"err3: fread() failure, errno: %d %s \n",errno,strerror(errno)); | |||
goto readfail; | goto readfail; | |||
err4: | err4: | |||
Plog(1,"err4: %s \n",buff); | Plog(0,"err4: %s \n",buff); | |||
goto readfail; | goto readfail; | |||
readfail: | readfail: | |||
zmessageACK(Mwin,"undo/redo stack read failure"); | zmessageACK(Mwin,"undo/redo stack read failure"); | |||
quitxx(); | quitxx(); | |||
return 0; | return 0; | |||
} | } | |||
/******************************************************************************* */ | /******************************************************************************* */ | |||
skipping to change at line 3963 | skipping to change at line 3984 | |||
// table for loading and saving adjustable parameters between sessions | // table for loading and saving adjustable parameters between sessions | |||
typedef struct { | typedef struct { | |||
char name[20]; | char name[20]; | |||
char type[12]; | char type[12]; | |||
int count; | int count; | |||
void *location; | void *location; | |||
} param; | } param; | |||
#define Nparms 50 | #define Nparms 52 | |||
param paramTab[Nparms] = { | param paramTab[Nparms] = { | |||
// name type count location | // name type count location | |||
{ "fotoxx release", "char", 1, &Prelease }, | { "fotoxx release", "char", 1, &Prelease }, | |||
{ "first time", "int", 1, &Ffirsttime }, | { "first time", "int", 1, &Ffirsttime }, | |||
{ "log level", "int", 1, &Floglevel }, | { "log level", "int", 1, &Floglevel }, | |||
{ "window geometry", "int", 4, &mwgeom }, | { "window geometry", "int", 4, &mwgeom }, | |||
{ "thumbnail size", "int", 1, &navi::thumbsize }, | { "thumbnail size", "int", 1, &navi::thumbsize }, | |||
{ "menu style", "char", 1, &menu_style }, | { "menu style", "char", 1, &menu_style }, | |||
{ "icon size", "int", 1, &iconsize }, | { "icon size", "int", 1, &iconsize }, | |||
{ "F-base-color", "int", 3, &FBrgb }, | { "F-base-color", "int", 3, &FBrgb }, | |||
{ "G-base-color", "int", 3, &GBrgb }, | { "G-base-color", "int", 3, &GBrgb }, | |||
{ "menu font color", "int", 3, &MFrgb }, | { "menu font color", "int", 3, &MFrgb }, | |||
{ "menu background", "int", 3, &MBrgb }, | { "menu background", "int", 3, &MBrgb }, | |||
{ "index level", "int", 1, &Findexlev }, | { "index level", "int", 1, &Findexlev }, | |||
{ "FM index level", "int", 1, &FMindexlev }, | { "FM index level", "int", 1, &FMindexlev }, | |||
{ "max. threads", "int", 1, &NWT }, // 22.35 | ||||
{ "dialog font", "char", 1, &dialog_font }, | { "dialog font", "char", 1, &dialog_font }, | |||
{ "drag option", "int", 1, &Fdragopt }, | { "drag option", "int", 1, &Fdragopt }, | |||
{ "zoom count", "int", 1, &zoomcount }, | { "zoom count", "int", 1, &zoomcount }, | |||
{ "map_dotsize", "int", 1, &map_dotsize }, | { "map_dotsize", "int", 1, &map_dotsize }, | |||
{ "overlay text cc", "int", 2, &ovtxcc }, // 22.18 | { "overlay text cc", "int", 2, &ovtxcc }, | |||
{ "last version", "int", 1, &Flastversion }, | { "last version", "int", 1, &Flastversion }, | |||
{ "Image Position", "char", 1, &ImagePosn }, | { "Image Position", "char", 1, &ImagePosn }, | |||
{ "curve node dist %", "float", 1, &splcurve_minx }, | { "curve node dist %", "float", 1, &splcurve_minx }, | |||
{ "start display", "char", 1, &startdisplay }, | { "start display", "char", 1, &startdisplay }, | |||
{ "start album", "char", 1, &startalbum }, | { "start album", "char", 1, &startalbum }, | |||
{ "start image file", "char", 1, &startfile }, | { "start image file", "char", 1, &startfile }, | |||
{ "start folder", "char", 1, &startfolder }, | { "start folder", "char", 1, &startfolder }, | |||
{ "curr file", "char", 1, &curr_file }, | { "curr file", "char", 1, &curr_file }, | |||
{ "galleryname", "char", 1, &navi::galleryname }, | { "galleryname", "char", 1, &navi::galleryname }, | |||
{ "gallerytype", "int", 1, &navi::gallerytype }, | { "gallerytype", "int", 1, &navi::gallerytype }, | |||
skipping to change at line 4009 | skipping to change at line 4031 | |||
{ "video file types", "char", 1, &VIDEOfiletypes }, | { "video file types", "char", 1, &VIDEOfiletypes }, | |||
{ "video command", "char", 1, &video_command }, | { "video command", "char", 1, &video_command }, | |||
{ "crop sizes", "char", 10, &cropsizes }, | { "crop sizes", "char", 10, &cropsizes }, | |||
{ "crop buttons", "char", 5, &cropbuttons }, | { "crop buttons", "char", 5, &cropbuttons }, | |||
{ "crop ratios", "char", 5, &cropratios }, | { "crop ratios", "char", 5, &cropratios }, | |||
{ "edit resize", "int", 2, &editresize }, | { "edit resize", "int", 2, &editresize }, | |||
{ "show captions", "int", 1, &Fcaps }, | { "show captions", "int", 1, &Fcaps }, | |||
{ "jpeg def quality", "int", 1, &jpeg_def_quality }, | { "jpeg def quality", "int", 1, &jpeg_def_quality }, | |||
{ "tiff comp method", "int", 1, &tiff_comp_method }, | { "tiff comp method", "int", 1, &tiff_comp_method }, | |||
{ "RAW file loader", "int", 1, &Frawloader }, | { "RAW file loader", "int", 1, &Frawloader }, | |||
{ "Raw load command", "char", 1, &rawcommand }, | ||||
{ "RAW auto brighten", "int", 1, &Fautobright }, | { "RAW auto brighten", "int", 1, &Fautobright }, | |||
{ "RAW match thumb", "int", 1, &Fmatchthumb }, | { "RAW match thumb", "int", 1, &Fmatchthumb }, | |||
{ "lens mm", "float", 1, &lens_mm }, | { "lens mm", "float", 1, &lens_mm }, | |||
{ "SS KB keys", "char", 1, &ss_KBkeys }, | { "SS KB keys", "char", 1, &ss_KBkeys }, | |||
{ "line color", "int", 3, &LINE_COLOR }, | { "line color", "int", 3, &LINE_COLOR }, | |||
{ "Faskquit", "int", 1, &Faskquit }, | { "Faskquit", "int", 1, &Faskquit }, | |||
{ "printer color map", "char", 1, &colormapfile } }; | { "printer color map", "char", 1, &colormapfile } }; | |||
// save parameters to file /.../.fotoxx/parameters | // save parameters to file /.../.fotoxx/parameters | |||
End of changes. 65 change blocks. | ||||
102 lines changed or deleted | 130 lines changed or added |