GNOME Bugzilla – Bug 346016
file-ico-save ignores run-mode parameter
Last modified: 2008-01-15 13:09:01 UTC
Please describe the problem: I want to create a Windows icon file that contains an image in several different resolutions. To do this, I use the following script: ---------------------- cut -------------------------------------- gimp -i -b - <<EOF ( let* ((image (car (gimp-file-load 1 "test.png" "test.png"))) (drawable (car (gimp-image-get-active-layer image)))) (set! layer (car (gimp-layer-new-from-drawable drawable image))) (gimp-image-add-layer image layer -1) (gimp-layer-scale layer 32 32 FALSE) (set! layer (car (gimp-layer-new-from-drawable drawable image))) (gimp-image-add-layer image layer -1) (gimp-layer-scale layer 24 24 FALSE) (set! layer (car (gimp-layer-new-from-drawable drawable image))) (gimp-image-add-layer image layer -1) (gimp-layer-scale layer 16 16 FALSE) (gimp-layer-scale drawable 48 48 FALSE) (file-ico-save 1 image drawable "test.ico" "test.ico") (gimp-quit 0) ) EOF ---------------------- cut -------------------------------------- Despite the '1' in the call to 'file-ico-save', GIMP shows me the "Icon details" dialog before saving the icon file. This is preventing me from running this completely in batch mode. Steps to reproduce: Run the script I've posted. Actual results: The "Icon details" dialog appears when it shouldn't. Expected results: The script should run without any interaction. Does this happen every time? Yes. Other information:
The plug-in seems to ignore the run-mode parameter. Patches to fix this would be very much appreciated. Preferably against current CVS.
2006-10-06 Sven Neumann <sven@gimp.org> * plug-ins/winicon/icodialog.[ch] * plug-ins/winicon/icoload.[ch] * plug-ins/winicon/icosave.[ch] * plug-ins/winicon/main.[ch]: applied patch from Aurimas Juška with code cleanup and fixes for bug #346016 and other issues (see bug #352899).