comparison src/name/blackcap/clipman/Osdep.kt.mac.osdep @ 47:19d9da731c43

Recoded; cleaned up root namespace, removed race conditions.
author David Barts <n5jrn@me.com>
date Sun, 12 Apr 2020 14:31:06 -0700
parents 33fbe3a78d84
children
comparison
equal deleted inserted replaced
46:88066346f129 47:19d9da731c43
2 * OS-dependent code, Mac version. 2 * OS-dependent code, Mac version.
3 */ 3 */
4 package name.blackcap.clipman 4 package name.blackcap.clipman
5 5
6 import com.apple.eawt.AboutHandler 6 import com.apple.eawt.AboutHandler
7 import com.apple.eawt.Application
8 import com.apple.eawt.PreferencesHandler 7 import com.apple.eawt.PreferencesHandler
8 import com.apple.eawt.QuitStrategy
9 9
10 fun setMacMenus() { 10 fun setMacMenus() {
11 Application.getApplication().run { 11 com.apple.eawt.Application.getApplication().run {
12 setAboutHandler(AboutHandler({ showAboutDialog() })) 12 setAboutHandler(AboutHandler({ showAboutDialog() }))
13 setPreferencesHandler( 13 setPreferencesHandler(
14 PreferencesHandler({ settingsDialog.setVisible(true) })) 14 PreferencesHandler({ Application.settingsDialog.setVisible(true) }))
15 setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
15 } 16 }
16 } 17 }