diff src/name/blackcap/clipman/Menus.kt @ 39:2a5808156f99

Remove more deadwood, add non-Mac About dialog.
author David Barts <n5jrn@me.com>
date Fri, 31 Jan 2020 00:06:59 -0800
parents fcf82e3b7e31
children 33fbe3a78d84
line wrap: on
line diff
--- a/src/name/blackcap/clipman/Menus.kt	Thu Jan 30 22:06:37 2020 -0800
+++ b/src/name/blackcap/clipman/Menus.kt	Fri Jan 31 00:06:59 2020 -0800
@@ -22,6 +22,11 @@
             "Edit.Coerce" -> onlyIfSelected { coerceDialog.setVisible(true) }
             "Edit.Find" -> searchDialog.setVisible(true)
             "Edit.FindAgain" -> searchDialog.find()
+            "Help.About" -> JOptionPane.showMessageDialog(frame.v,
+                "ClipMan, a clipboard manager.\n"
+                + "© MMXX, David W. Barts",
+                "About ClipMan",
+                JOptionPane.PLAIN_MESSAGE)
             else -> throw RuntimeException("unexpected actionCommand!")
         }
     }
@@ -37,19 +42,6 @@
             block(selected)
         }
     }
-
-    private fun clone(contents: PasteboardItem) {
-        val (plain, html) = when(contents) {
-            is PasteboardItem.Plain -> Pair(contents.plain, null)
-            is PasteboardItem.HTML -> Pair(contents.plain, contents.html)
-            is PasteboardItem.RTF -> Pair(contents.plain, contents.html)
-        }
-        if (html == null) {
-            PasteboardItem.write(PasteboardItem.Plain(plain))
-        } else {
-            PasteboardItem.write(PasteboardItem.HTML(plain, scrub(html)))
-        }
-    }
 }
 
 val menuItemListener = MenuItemListener()