comparison src/name/blackcap/exifwasher/WashDialog.kt @ 11:e52fd1a575de

Add Mac icons.
author David Barts <n5jrn@me.com>
date Fri, 10 Apr 2020 20:58:03 -0700
parents 0a106e9b91b4
children 841f711c40bd
comparison
equal deleted inserted replaced
10:9bbe6d803eba 11:e52fd1a575de
150 } 150 }
151 151
152 /* get new file name */ 152 /* get new file name */
153 val (name, ext) = splitext(washing.name) 153 val (name, ext) = splitext(washing.name)
154 var newFile = File(outDir, "${name}_washed${ext}") 154 var newFile = File(outDir, "${name}_washed${ext}")
155
156 /* warn (and allow user to back out) if overwriting */
157 if (newFile.exists()) {
158 val answer = JOptionPane.showConfirmDialog(Application.mainFrame,
159 "File ${newFile.name} already exists. Overwrite?",
160 "Confirm overwriting file",
161 JOptionPane.YES_NO_OPTION,
162 JOptionPane.WARNING_MESSAGE)
163 if (answer != JOptionPane.YES_OPTION) {
164 close()
165 return
166 }
167 }
155 168
156 /* copy the file, then edit the Exif in the copy */ 169 /* copy the file, then edit the Exif in the copy */
157 useWaitCursor() 170 useWaitCursor()
158 swingWorker<Boolean> { 171 swingWorker<Boolean> {
159 inBackground { 172 inBackground {