Mercurial > cgi-bin > hgweb.cgi > ClipMan
diff src/name/blackcap/clipman/SearchDialog.kt @ 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 | 08eaae2aaf76 |
children |
line wrap: on
line diff
--- a/src/name/blackcap/clipman/SearchDialog.kt Mon Feb 10 16:40:09 2020 -0700 +++ b/src/name/blackcap/clipman/SearchDialog.kt Sun Apr 12 14:31:06 2020 -0700 @@ -11,7 +11,7 @@ import javax.swing.event.DocumentEvent import javax.swing.event.DocumentListener -class SearchDialog: JDialog(frame.v), ActionListener, DocumentListener { +class SearchDialog: JDialog(Application.frame), ActionListener, DocumentListener { /* the search term */ private val _searchFor = JTextField(25).also { it.border = BorderFactory.createLineBorder(Color.GRAY, 1) @@ -155,7 +155,7 @@ origin = null return } - fun doFind(o: PasteboardQueue.Offset?) = queue.v.find(searchFor, + fun doFind(o: PasteboardQueue.Offset?) = Application.queue.find(searchFor, direction = direction, foldCase = ignoreCase, origin = o) var result = doFind(origin) if (result == null && origin != null && autoWrap) { @@ -187,5 +187,3 @@ override fun insertUpdate(e: DocumentEvent) = changedUpdate(e) override fun removeUpdate(e: DocumentEvent) = changedUpdate(e) } - -val searchDialog = SearchDialog() \ No newline at end of file