mirror of https://github.com/zlatinb/muwire
show source in incoming searches
parent
fad01603de
commit
9e0d52d548
|
@ -228,11 +228,16 @@ class MainFrameModel {
|
||||||
if (search.trim().size() == 0)
|
if (search.trim().size() == 0)
|
||||||
return
|
return
|
||||||
runInsideUIAsync {
|
runInsideUIAsync {
|
||||||
searches.addFirst(search)
|
searches.addFirst(new IncomingSearch(search : search, replyTo : e.replyTo))
|
||||||
while(searches.size() > 200)
|
while(searches.size() > 200)
|
||||||
searches.removeLast()
|
searches.removeLast()
|
||||||
JTable table = builder.getVariable("searches-table")
|
JTable table = builder.getVariable("searches-table")
|
||||||
table.model.fireTableDataChanged()
|
table.model.fireTableDataChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class IncomingSearch {
|
||||||
|
String search
|
||||||
|
Destination replyTo
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -177,7 +177,8 @@ class MainFrameView {
|
||||||
scrollPane(constraints : BorderLayout.CENTER) {
|
scrollPane(constraints : BorderLayout.CENTER) {
|
||||||
table(id : "searches-table") {
|
table(id : "searches-table") {
|
||||||
tableModel(list : model.searches) {
|
tableModel(list : model.searches) {
|
||||||
closureColumn(header : "Keywords", type : String, read : { it })
|
closureColumn(header : "Keywords", type : String, read : { it.search })
|
||||||
|
closureColumn(header : "From", type : String, read : {it.replyTo.toBase32()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue