view src/name/blackcap/imageprep/Osdep.kt.mac.osdep @ 0:e0efe7848130

Initial commit. Untested!
author David Barts <davidb@stashtea.com>
date Thu, 16 Jul 2020 19:57:23 -0700
parents
children 0bded24f746e
line wrap: on
line source

/*
 * OS-dependent code, Mac version.
 */
package name.blackcap.exifwasher

import com.apple.eawt.AboutHandler
import com.apple.eawt.PreferencesHandler
import com.apple.eawt.QuitStrategy

fun setMacMenus() {
    com.apple.eawt.Application.getApplication().run {
        setAboutHandler(AboutHandler { showAboutDialog() })
        setPreferencesHandler(
            PreferencesHandler { Application.settingsDialog.setVisible(true) })
        setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
    }
}