comparison src/name/blackcap/clipman/Osdep.kt @ 57:c6cccbe2f393

Port to OpenJDK 15 (mostly done).
author David Barts <n5jrn@me.com>
date Wed, 23 Mar 2022 23:56:29 -0700
parents
children
comparison
equal deleted inserted replaced
56:22725d4d7849 57:c6cccbe2f393
1 /*
2 * OS-dependent code, Mac version.
3 */
4 package name.blackcap.clipman
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 }