view src/name/blackcap/imageprep/Osdep.kt.mac.osdep @ 28:c310ec097194

Add Linux support.
author David Barts <n5jrn@me.com>
date Fri, 25 Dec 2020 19:07:47 -0800
parents 5fa5d15b4a7b
children a495f9ea498b
line wrap: on
line source

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

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)
    }
}