mirror of https://github.com/zlatinb/muwire
name update search tab
parent
f3712fe7af
commit
5c959bc8b7
|
@ -58,12 +58,12 @@ class MainFrameController {
|
||||||
originator : core.me))
|
originator : core.me))
|
||||||
}
|
}
|
||||||
|
|
||||||
void search(String infoHash) {
|
void search(String infoHash, String tabTitle) {
|
||||||
def cardsPanel = builder.getVariable("cards-panel")
|
def cardsPanel = builder.getVariable("cards-panel")
|
||||||
cardsPanel.getLayout().show(cardsPanel, "search window")
|
cardsPanel.getLayout().show(cardsPanel, "search window")
|
||||||
def uuid = UUID.randomUUID()
|
def uuid = UUID.randomUUID()
|
||||||
Map<String, Object> params = new HashMap<>()
|
Map<String, Object> params = new HashMap<>()
|
||||||
params["search-terms"] = infoHash
|
params["search-terms"] = tabTitle
|
||||||
params["uuid"] = uuid.toString()
|
params["uuid"] = uuid.toString()
|
||||||
def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params)
|
def group = mvcGroup.createMVCGroup("SearchTab", uuid.toString(), params)
|
||||||
model.results[uuid.toString()] = group
|
model.results[uuid.toString()] = group
|
||||||
|
|
|
@ -272,7 +272,7 @@ class MainFrameModel {
|
||||||
"New MuWire version availble", JOptionPane.OK_CANCEL_OPTION)
|
"New MuWire version availble", JOptionPane.OK_CANCEL_OPTION)
|
||||||
if (option == JOptionPane.CANCEL_OPTION)
|
if (option == JOptionPane.CANCEL_OPTION)
|
||||||
return
|
return
|
||||||
controller.search(e.infoHash)
|
controller.search(e.infoHash,"MuWire update")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue