view src/name/blackcap/clipman/Osdep.kt @ 62:c56a0747c256 default tip

Add make plain feature.
author David Barts <n5jrn@me.com>
date Thu, 28 Apr 2022 20:53:39 -0700
parents c6cccbe2f393
children
line wrap: on
line source

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

import java.awt.Desktop
import java.awt.desktop.AboutHandler
import java.awt.desktop.PreferencesHandler
import java.awt.desktop.QuitStrategy

fun setMacMenus() {
    if (OS.type == OS.MAC) {
        Desktop.getDesktop().run {
            setAboutHandler(AboutHandler({ showAboutDialog() }))
            setPreferencesHandler(
                PreferencesHandler({ Application.settingsDialog.setVisible(true) }))
            setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
        }
    }
}