# HG changeset patch # User David Barts # Date 1580458019 28800 # Node ID 2a5808156f995b36ed64e3b627ecd84988162dff # Parent 08eaae2aaf7622a9462d9784c45cf177431d5e4a Remove more deadwood, add non-Mac About dialog. diff -r 08eaae2aaf76 -r 2a5808156f99 src/name/blackcap/clipman/Menus.kt --- 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() diff -r 08eaae2aaf76 -r 2a5808156f99 src/name/blackcap/clipman/Pasteboard.kt --- a/src/name/blackcap/clipman/Pasteboard.kt Thu Jan 30 22:06:37 2020 -0800 +++ b/src/name/blackcap/clipman/Pasteboard.kt Fri Jan 31 00:06:59 2020 -0800 @@ -119,11 +119,6 @@ * @return a PasteboardItem? object, null if nothing could be read */ fun read() : PasteboardItem? { - /* println("-- BEGIN FLAVORS --") - CLIPBOARD.availableDataFlavors.forEach { - println(it.mimeType) - } - println("-- END FLAVORS --") */ check() val plain = getClipboardData(DataFlavor.stringFlavor) as String? if (plain == null) {