mirror of https://github.com/zlatinb/muwire
fetch group by name,add sequential download checkbox to browse view
parent
9f6a7eb368
commit
35322d2c15
|
@ -64,8 +64,11 @@ class BrowseController {
|
|||
def selectedResults = view.selectedResults()
|
||||
if (selectedResults == null || selectedResults.isEmpty())
|
||||
return
|
||||
|
||||
def group = application.mvcGroupManager.getGroups()['MainFrame']
|
||||
|
||||
selectedResults.removeAll {
|
||||
!mvcGroup.parentGroup.parentGroup.model.canDownload(it.infohash)
|
||||
!group.model.canDownload(it.infohash)
|
||||
}
|
||||
|
||||
selectedResults.each { result ->
|
||||
|
@ -74,11 +77,11 @@ class BrowseController {
|
|||
result : [result],
|
||||
sources : [model.host.destination],
|
||||
target : file,
|
||||
sequential : mvcGroup.parentGroup.view.sequentialDownloadCheckbox.model.isSelected()
|
||||
sequential : view.sequentialDownloadCheckbox.model.isSelected()
|
||||
))
|
||||
}
|
||||
|
||||
mvcGroup.parentGroup.parentGroup.view.showDownloadsWindow.call()
|
||||
group.view.showDownloadsWindow.call()
|
||||
dismiss()
|
||||
}
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ class BrowseView {
|
|||
def p
|
||||
def resultsTable
|
||||
def lastSortEvent
|
||||
def sequentialDownloadCheckbox
|
||||
|
||||
void initUI() {
|
||||
int rowHeight = application.context.get("row-height")
|
||||
mainFrame = application.windowManager.findWindow("main-frame")
|
||||
|
@ -67,6 +69,8 @@ class BrowseView {
|
|||
button(text : "View Comment", enabled : bind{model.viewCommentActionEnabled}, viewCommentAction)
|
||||
button(text : "View Certificates", enabled : bind{model.viewCertificatesActionEnabled}, viewCertificatesAction)
|
||||
button(text : "Dismiss", dismissAction)
|
||||
label(text : "Download sequentially")
|
||||
sequentialDownloadCheckbox = checkBox()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue