mirror of https://github.com/zlatinb/muwire
browse collections from contacts list
parent
47dc50b2bb
commit
38036132b8
|
@ -365,6 +365,24 @@ class MainFrameController {
|
|||
view.showSearchWindow.call()
|
||||
}
|
||||
|
||||
@ControllerAction
|
||||
void browseCollectionsFromTrusted() {
|
||||
int row = view.getSelectedTrustTablesRow("trusted-table")
|
||||
if (row < 0)
|
||||
return
|
||||
Persona p = model.trusted[row].persona
|
||||
|
||||
UUID uuid = UUID.randomUUID()
|
||||
def params = [:]
|
||||
params.fileName = p.getHumanReadableName()
|
||||
params.eventBus = core.eventBus
|
||||
params.everything = true
|
||||
params.uuid = uuid
|
||||
params.host = p
|
||||
mvcGroup.createMVCGroup("collection-tab", uuid.toString(), params)
|
||||
view.showSearchWindow.call()
|
||||
}
|
||||
|
||||
@ControllerAction
|
||||
void chatFromTrusted() {
|
||||
int row = view.getSelectedTrustTablesRow("trusted-table")
|
||||
|
|
|
@ -1256,6 +1256,9 @@ class MainFrameView {
|
|||
JMenuItem browseItem = new JMenuItem(trans("BROWSE"))
|
||||
browseItem.addActionListener({mvcGroup.controller.browseFromTrusted()})
|
||||
trustMenu.add(browseItem)
|
||||
JMenuItem browseCollectionsItem = new JMenuItem(trans("BROWSE_COLLECTIONS"))
|
||||
browseCollectionsItem.addActionListener({mvcGroup.controller.browseCollectionsFromTrusted()})
|
||||
trustMenu.add(browseCollectionsItem)
|
||||
JMenuItem chatItem = new JMenuItem(trans("CHAT"))
|
||||
chatItem.addActionListener({mvcGroup.controller.chatFromTrusted()})
|
||||
trustMenu.add(chatItem)
|
||||
|
|
Loading…
Reference in New Issue