diff src/name/blackcap/imageprep/Osdep.kt.mac.osdep @ 0:e0efe7848130

Initial commit. Untested!
author David Barts <davidb@stashtea.com>
date Thu, 16 Jul 2020 19:57:23 -0700
parents
children 0bded24f746e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/name/blackcap/imageprep/Osdep.kt.mac.osdep	Thu Jul 16 19:57:23 2020 -0700
@@ -0,0 +1,17 @@
+/*
+ * OS-dependent code, Mac version.
+ */
+package name.blackcap.exifwasher
+
+import com.apple.eawt.AboutHandler
+import com.apple.eawt.PreferencesHandler
+import com.apple.eawt.QuitStrategy
+
+fun setMacMenus() {
+    com.apple.eawt.Application.getApplication().run {
+        setAboutHandler(AboutHandler { showAboutDialog() })
+        setPreferencesHandler(
+            PreferencesHandler { Application.settingsDialog.setVisible(true) })
+        setQuitStrategy(QuitStrategy.CLOSE_ALL_WINDOWS)
+    }
+}