comparison src/name/blackcap/clipman/Main.kt @ 35:5f8475b37e23

Got it correctly enabling and disabling menu items.
author David Barts <n5jrn@me.com>
date Thu, 30 Jan 2020 20:21:42 -0800
parents 0c6c18a733b7
children 33fbe3a78d84
comparison
equal deleted inserted replaced
34:376643a09b52 35:5f8475b37e23
136 source.validate() 136 source.validate()
137 anyRequired.enable() 137 anyRequired.enable()
138 source.basedOn.let { 138 source.basedOn.let {
139 if (it is PasteboardItem.HTML || it is PasteboardItem.RTF) { 139 if (it is PasteboardItem.HTML || it is PasteboardItem.RTF) {
140 styledRequired.enable() 140 styledRequired.enable()
141 } else {
142 styledRequired.disable()
141 } 143 }
142 } 144 }
143 } 145 }
144 146
145 override fun mousePressed(e: MouseEvent) { 147 override fun mousePressed(e: MouseEvent) {