diff --git a/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy b/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy index 6bd51e83..d10eb9ce 100644 --- a/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy +++ b/gui/griffon-app/models/com/muwire/gui/MainFrameModel.groovy @@ -14,6 +14,8 @@ import com.muwire.core.files.FileHashedEvent import com.muwire.core.files.FileLoadedEvent import com.muwire.core.files.FileSharedEvent import com.muwire.core.search.UIResultEvent +import com.muwire.core.trust.TrustEvent +import com.muwire.core.trust.TrustService import com.muwire.core.upload.UploadEvent import com.muwire.core.upload.UploadFinishedEvent @@ -55,6 +57,7 @@ class MainFrameModel { core.eventBus.register(FileLoadedEvent.class, this) core.eventBus.register(UploadEvent.class, this) core.eventBus.register(UploadFinishedEvent.class, this) + core.eventBus.register(TrustEvent.class, this) }) Timer timer = new Timer("download-pumper", true) timer.schedule({ @@ -130,4 +133,11 @@ class MainFrameModel { table.model.fireTableDataChanged() } } + + void onTrustEvent(TrustEvent e) { + runInsideUIAsync { + JTable table = builder.getVariable("results-table") + table.model.fireTableDataChanged() + } + } } \ No newline at end of file diff --git a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy index 08720f62..2db6b32b 100644 --- a/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy +++ b/gui/griffon-app/views/com/muwire/gui/MainFrameView.groovy @@ -70,6 +70,9 @@ class MainFrameView { closureColumn(header: "Name", type: String, read : {row -> row.name}) closureColumn(header: "Size", preferredWidth: 150, type: Long, read : {row -> row.size}) closureColumn(header: "Sender", type: String, read : {row -> row.sender.getHumanReadableName()}) + closureColumn(header: "Trust", type: String, read : {row -> + model.core.trustService.getLevel(row.sender.destination) + }) } } }