annotate src/name/blackcap/clipman/Osdep.kt.mac.osdep @ 56:22725d4d7849

An attempt to get it to troff-ize styled text.
author David Barts <n5jrn@me.com>
date Sat, 19 Mar 2022 23:04:40 -0700
parents 19d9da731c43
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
1 /*
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
2 * OS-dependent code, Mac version.
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
3 */
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
4 package name.blackcap.clipman
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
5
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
6 import com.apple.eawt.AboutHandler
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
7 import com.apple.eawt.PreferencesHandler
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 41
diff changeset
8 import com.apple.eawt.QuitStrategy
41
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
9
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
10 fun setMacMenus() {
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 41
diff changeset
11 com.apple.eawt.Application.getApplication().run {
41
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
12 setAboutHandler(AboutHandler({ showAboutDialog() }))
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
13 setPreferencesHandler(
47
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 41
diff changeset
14 PreferencesHandler({ Application.settingsDialog.setVisible(true) }))
19d9da731c43 Recoded; cleaned up root namespace, removed race conditions.
David Barts <n5jrn@me.com>
parents: 41
diff changeset
15 setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
41
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
16 }
33fbe3a78d84 Got the settings stuff compiling (untested).
David Barts <n5jrn@me.com>
parents:
diff changeset
17 }