comparison src/name/blackcap/imageprep/Osdep.kt @ 30:098c4f5507c7

Convert to JDK 15.
author David Barts <n5jrn@me.com>
date Mon, 13 Jun 2022 11:31:49 -0700
parents
children
comparison
equal deleted inserted replaced
29:e90d290a9a8d 30:098c4f5507c7
1 /*
2 * OS-dependent code, Mac version.
3 */
4 package name.blackcap.imageprep
5
6 import java.awt.Desktop
7 import java.awt.desktop.AboutHandler
8 import java.awt.desktop.PreferencesHandler
9 import java.awt.desktop.QuitStrategy
10
11 fun setMacMenus() {
12 if (OS.type == OS.MAC) {
13 Desktop.getDesktop().run {
14 setAboutHandler(AboutHandler({ showAboutDialog() }))
15 setPreferencesHandler(
16 PreferencesHandler({ Application.settingsDialog.setVisible(true) }))
17 setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
18 }
19 }
20 }