Mercurial > cgi-bin > hgweb.cgi > JpegWasher
changeset 11:e52fd1a575de
Add Mac icons.
author | David Barts <n5jrn@me.com> |
---|---|
date | Fri, 10 Apr 2020 20:58:03 -0700 |
parents | 9bbe6d803eba |
children | 9ac6136c710c |
files | ExifWasher.iconset/icon_128x128.png ExifWasher.iconset/icon_128x128@2x.png ExifWasher.iconset/icon_16x16.png ExifWasher.iconset/icon_16x16@2x.png ExifWasher.iconset/icon_256x256.png ExifWasher.iconset/icon_256x256@2x.png ExifWasher.iconset/icon_32x32.png ExifWasher.iconset/icon_32x32@2x.png ExifWasher.iconset/icon_512x512.png ExifWasher.iconset/icon_512x512@2x.png build.xml icon.jpg icon.xcf src/name/blackcap/exifwasher/WashDialog.kt src/name/blackcap/exifwasher/default.properties |
diffstat | 15 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/build.xml Fri Apr 10 19:29:58 2020 -0700 +++ b/build.xml Fri Apr 10 20:58:03 2020 -0700 @@ -108,6 +108,7 @@ <macrodef name="bundle"> <attribute name="type"/> <element name="args"/> + <element name="icons"/> <sequential> <fx:deploy nativeBundles="@{type}" outdir="${basedir}" outfile="${app.name}" signBundle="false"> @@ -115,7 +116,9 @@ version="1.0"/> <fx:info description="ExifWasher" title="${app.name}" vendor="David Barts <n5jrn@me.com>" - copyright="© MMXX, David W. Barts"/> + copyright="© MMXX, David W. Barts"> + <icons/> + </fx:info> <fx:resources> <fx:fileset dir="${basedir}" includes="${lc.app.name}.jar"/> </fx:resources> @@ -130,6 +133,9 @@ <args> <fx:bundleArgument arg="jvmOptions" value="-Xdock:name=${app.name}"/> </args> + <icons> + <fx:icon href="${basedir}/ExifWasher.icns"/> + </icons> </bundle> </target>
--- a/src/name/blackcap/exifwasher/WashDialog.kt Fri Apr 10 19:29:58 2020 -0700 +++ b/src/name/blackcap/exifwasher/WashDialog.kt Fri Apr 10 20:58:03 2020 -0700 @@ -153,6 +153,19 @@ val (name, ext) = splitext(washing.name) var newFile = File(outDir, "${name}_washed${ext}") + /* warn (and allow user to back out) if overwriting */ + if (newFile.exists()) { + val answer = JOptionPane.showConfirmDialog(Application.mainFrame, + "File ${newFile.name} already exists. Overwrite?", + "Confirm overwriting file", + JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE) + if (answer != JOptionPane.YES_OPTION) { + close() + return + } + } + /* copy the file, then edit the Exif in the copy */ useWaitCursor() swingWorker<Boolean> {
--- a/src/name/blackcap/exifwasher/default.properties Fri Apr 10 19:29:58 2020 -0700 +++ b/src/name/blackcap/exifwasher/default.properties Fri Apr 10 20:58:03 2020 -0700 @@ -2,6 +2,7 @@ outputToInputDir=true whitelist=\ Exif.Image.ColorMap,\ + Exif.Image.ExifTag,\ Exif.Image.Indexed,\ Exif.Image.InterColorProfile,\ Exif.Image.Orientation,\