"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "f.file.cc" between
fotoxx-22.41.tar.gz and fotoxx-22.50.tar.gz

About: fotoxx is a program for photo editing and collection management.

f.file.cc  (fotoxx-22.41):f.file.cc  (fotoxx-22.50)
skipping to change at line 49 skipping to change at line 49
m_zoom_menu menu button function - zoom image/thumb (F/G view) m_zoom_menu menu button function - zoom image/thumb (F/G view)
m_blank_image create a new monocolor image m_blank_image create a new monocolor image
create_blank_file callable function to create a new monocolor image create_blank_file callable function to create a new monocolor image
m_blank_window blank/restore window m_blank_window blank/restore window
play_gif play current GIF file animation play_gif play current GIF file animation
m_copy_move copy or move an image file to a new location m_copy_move copy or move an image file to a new location
m_copyto_desktop copy an image file to the desktop m_copyto_desktop copy an image file to the desktop
m_copyto_clip copy clicked file or current file to the clipboard m_copyto_clip copy clicked file or current file to the clipboard
m_delete_trash delete or trash an image file m_delete_trash delete or trash an image file
m_convert_adobe convert Adobe file into one or more jpeg files
m_wallpaper set current image file as wallpaper m_wallpaper set current image file as wallpaper
m_print print an image file m_print print an image file
m_print_calibrated print an image file with calibrated colors m_print_calibrated print an image file with calibrated colors
m_quit menu quit m_quit menu quit
quitxx callable quit quitxx callable quit
m_help help menu: user guide, change log, about m_help help menu: user guide, change log, about
m_file_save save a (modified) image file to disk m_file_save save a (modified) image file to disk
m_file_save_replace save file (replace) for KB shortcut m_file_save_replace save file (replace) for KB shortcut
skipping to change at line 1110 skipping to change at line 1111
file = zstrdup(filespec,"f-open"); // use passed filespec file = zstrdup(filespec,"f-open"); // use passed filespec
else { else {
pp = curr_file; // use file open dialog pp = curr_file; // use file open dialog
if (! pp && navi::gallerytype == FOLDER) pp = navi::galleryname; if (! pp && navi::gallerytype == FOLDER) pp = navi::galleryname;
file = zgetfile("Open Image File",MWIN,"file",pp); file = zgetfile("Open Image File",MWIN,"file",pp);
} }
if (! file) goto ret3; if (! file) goto ret3;
if (! regfile(file)) { // check file exists if (! regfile(file)) { // check file exists
if (Fack) zmessage_post(Mwin,"20/20",4,"file not found: %s",file); if (Fack) zmessage_post_bold(Mwin,"20/20",4,"file not found: %s",file);
zfree(file); zfree(file);
goto ret3; goto ret3;
} }
ftype = image_file_type(file); // reject thumbnail ftype = image_file_type(file); // reject thumbnail
if (ftype == THUMB) { if (ftype == THUMB) {
if (Fack) zmessageACK(Mwin,"thumbnail file"); if (Fack) zmessageACK(Mwin,"thumbnail file");
goto ret4; goto ret4;
} }
skipping to change at line 2313 skipping to change at line 2314
if (deltrash_file) zfree(deltrash_file); // free memory if (deltrash_file) zfree(deltrash_file); // free memory
deltrash_file = 0; deltrash_file = 0;
zdialog_free(zd); // quit dialog zdialog_free(zd); // quit dialog
zd_deltrash = 0; zd_deltrash = 0;
return 1; return 1;
} }
/******************************************************************************* */ /******************************************************************************* */
// Select an Adobe document file and convert all pages into jpeg image files.
// The image files are named InputFileName-N.jpg where N is the page number.
// File types recognized:
// .pdf portable document format
// .ps .eps postscript
// .psd photoshop image file
void m_convert_adobe(GtkWidget *, cchar *)
// 22.20
{
char *pp, *infile = 0, *outfile = 0;
zdialog *zd = 0;
int err;
F1_help_topic = "convert adobe";
Plog(1,"convert adobe \n");
if (Fblock(0,"blocked edits")) return;
// check nothing pending
pp = 0;
if (navi::gallerytype == FOLDER) pp = navi::galleryname;
infile = zgetfile("Open Adobe File",MWIN,"file",pp);
if (! infile) goto returnx;
pp = strrchr(infile,'.');
if (! strcasestr(".pdf .ps .eps .psd",pp)) {
zmessageACK(Mwin,"not an Adobe file (.pdf .ps .eps .psd)");
goto returnx;
}
if (strmatchcase(".psd",pp)) goto photoshop;
// photoshop image 22.50
err = zshell(0,"which gs >/dev/null 2>&1");
// check ghostscript installed
if (err) {
zmessageACK(Mwin,"ghostscript must be installed");
goto returnx;
}
outfile = zstrdup(infile,"convert adobe",12);
// file.pdf >> file-%d.jpg
pp = strrchr(outfile,'.');
if (! pp) goto returnx;
strcpy(pp,"-%d.jpg");
// file-1.jpg, file-2.jpg, ...
err = zshell("ack","gs -q -sDEVICE=jpeg -r300 -dFitPage "
// 300 dpi
"-o \"%s\" \"%s\" ", outfile, infile);
if (err) goto returnx;
strcpy(pp,"-1.jpg");
// open 1st output file
f_open(outfile,0,0,1,0);
m_viewmode(0,"G");
// show gallery at file position
goto returnx;
photoshop:
err = zshell(0,"which convert >/dev/null 2>&1");
// check imagemagick installed 22.50
if (err) {
zmessageACK(Mwin,"imagemagick must be installed");
goto returnx;
}
outfile = zstrdup(infile,"convert adobe",8);
// file.psd >> file.jpg
pp = strrchr(outfile,'.');
if (! pp) goto returnx;
strcpy(pp,".jpg");
// output file: file.jpg
err = zshell("ack","convert \"%s\" \"%s\" ",infile, outfile);
if (err) goto returnx;
f_open(outfile,0,0,1,0);
m_viewmode(0,"G");
// show gallery at file position
returnx:
if (zd) zdialog_free(zd);
if (infile) zfree(infile);
if (outfile) zfree(outfile);
return;
}
/*******************************************************************************
*/
// set current file as desktop wallpaper (GNOME only) // set current file as desktop wallpaper (GNOME only)
void m_wallpaper(GtkWidget *, cchar *) void m_wallpaper(GtkWidget *, cchar *)
{ {
cchar * key = "gsettings set org.gnome.desktop.background"; cchar * key = "gsettings set org.gnome.desktop.background";
cchar * id = "picture-uri"; cchar * id = "picture-uri";
F1_help_topic = "set wallpaper"; F1_help_topic = "set wallpaper";
Plog(1,"m_wallpaper \n"); Plog(1,"m_wallpaper \n");
skipping to change at line 2475 skipping to change at line 2557
zd = zfuncs::zdialog_list[ii]; zd = zfuncs::zdialog_list[ii];
if (strmatch(zd->title,"userguide")) continue; // omit this dialog if (strmatch(zd->title,"userguide")) continue; // omit this dialog
zdialog_show(zd,1); // un-hide minimized dialog zdialog_show(zd,1); // un-hide minimized dialog
yn = zmessageYN(Mwin,"Kill active dialog? %s",zd->title); // allow user bailout yn = zmessageYN(Mwin,"Kill active dialog? %s",zd->title); // allow user bailout
if (! yn) return; if (! yn) return;
zdialog_send_event(zd,"cancel"); zdialog_send_event(zd,"cancel");
zmainsleep(0.1); zmainsleep(0.1);
} }
} }
if (Fblock(0,"blocked quiet") || Ffuncbusy) { // someth ing is still running if (Fblock(0,"blocked quiet") || Ffuncbusy) { // something is still running
yn = zmessageYN(Mwin,"Kill busy function?"); yn = zmessageYN(Mwin,"Kill busy function?");
if (! yn) return; if (! yn) return;
Fescape = 2; // tell it to exit Fescape = 2; // tell it to exit
for (ii = 0; ii < 20; ii++) { // allow 2 secs. for (ii = 0; ii < 20; ii++) { // allow 2 secs.
if (Fblock(0,"blocked quiet") || Ffuncbusy) if (Fblock(0,"blocked quiet") || Ffuncbusy)
zmainsleep(0.1); zmainsleep(0.1);
else break; else break;
} }
if (ii == 20) Plog(1,"busy function will be killed \n"); // still running if (ii == 20) Plog(1,"busy function will be killed \n"); // still running
 End of changes. 4 change blocks. 
2 lines changed or deleted 98 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)