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