annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
57
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
1 /*
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
2 * OS-dependent code, Mac version.
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
3 */
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
4 package name.blackcap.clipman
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
5
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
6 import java.awt.Desktop
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
7 import java.awt.desktop.AboutHandler
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
8 import java.awt.desktop.PreferencesHandler
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
9 import java.awt.desktop.QuitStrategy
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
10
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
11 fun setMacMenus() {
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
12 if (OS.type == OS.MAC) {
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
13 Desktop.getDesktop().run {
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
14 setAboutHandler(AboutHandler({ showAboutDialog() }))
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
15 setPreferencesHandler(
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
16 PreferencesHandler({ Application.settingsDialog.setVisible(true) }))
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
17 setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
18 }
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
19 }
c6cccbe2f393 Port to OpenJDK 15 (mostly done).
David Barts <n5jrn@me.com>
parents:
diff changeset
20 }