option for download attempts before giving up in desktop gui
This commit is contained in:
@ -59,8 +59,11 @@ class OptionsController {
|
||||
|
||||
text = view.retryField.text
|
||||
model.downloadRetryInterval = text
|
||||
|
||||
settings.downloadRetryInterval = Integer.valueOf(text)
|
||||
|
||||
text = view.downloadMaxFailuresField.text
|
||||
model.downloadMaxFailures = text
|
||||
settings.downloadMaxFailures = Integer.valueOf(text)
|
||||
|
||||
text = view.updateField.text
|
||||
model.updateCheckInterval = text
|
||||
|
@ -12,6 +12,7 @@ import java.awt.Font
|
||||
@ArtifactProviderFor(GriffonModel)
|
||||
class OptionsModel {
|
||||
@Observable String downloadRetryInterval
|
||||
@Observable String downloadMaxFailures
|
||||
@Observable String updateCheckInterval
|
||||
@Observable boolean autoDownloadUpdate
|
||||
@Observable boolean shareDownloadedFiles
|
||||
@ -78,6 +79,7 @@ class OptionsModel {
|
||||
void mvcGroupInit(Map<String, String> args) {
|
||||
MuWireSettings settings = application.context.get("muwire-settings")
|
||||
downloadRetryInterval = settings.downloadRetryInterval
|
||||
downloadMaxFailures = settings.downloadMaxFailures
|
||||
updateCheckInterval = settings.updateCheckInterval
|
||||
autoDownloadUpdate = settings.autoDownloadUpdate
|
||||
shareDownloadedFiles = settings.shareDownloadedFiles
|
||||
|
@ -39,6 +39,7 @@ class OptionsView {
|
||||
def chat
|
||||
|
||||
def retryField
|
||||
def downloadMaxFailuresField
|
||||
def updateField
|
||||
def autoDownloadUpdateCheckbox
|
||||
def shareDownloadedCheckbox
|
||||
@ -123,13 +124,17 @@ class OptionsView {
|
||||
retryField = textField(text : bind { model.downloadRetryInterval }, columns : 2,
|
||||
constraints : gbc(gridx: 2, gridy: 0, anchor : GridBagConstraints.LINE_END, weightx: 0))
|
||||
|
||||
label(text : "Save downloaded files to:", constraints: gbc(gridx:0, gridy:1, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : bind {model.downloadLocation}, constraints: gbc(gridx:1, gridy:1, anchor : GridBagConstraints.LINE_START))
|
||||
button(text : "Choose", constraints : gbc(gridx : 2, gridy:1), downloadLocationAction)
|
||||
label(text : "Give up on sources after this many failures (-1 means never)", constraints: gbc(gridx: 0, gridy: 1, anchor : GridBagConstraints.LINE_START, weightx: 100))
|
||||
downloadMaxFailuresField = textField(text : bind { model.downloadMaxFailures }, columns : 2,
|
||||
constraints : gbc(gridx: 2, gridy: 1, anchor : GridBagConstraints.LINE_END, weightx: 0))
|
||||
|
||||
label(text : "Store incomplete files in:", constraints: gbc(gridx:0, gridy:2, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : bind {model.incompleteLocation}, constraints: gbc(gridx:1, gridy:2, anchor : GridBagConstraints.LINE_START))
|
||||
button(text : "Choose", constraints : gbc(gridx : 2, gridy:2), incompleteLocationAction)
|
||||
label(text : "Save downloaded files to:", constraints: gbc(gridx:0, gridy:2, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : bind {model.downloadLocation}, constraints: gbc(gridx:1, gridy:2, anchor : GridBagConstraints.LINE_START))
|
||||
button(text : "Choose", constraints : gbc(gridx : 2, gridy:2), downloadLocationAction)
|
||||
|
||||
label(text : "Store incomplete files in:", constraints: gbc(gridx:0, gridy:3, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : bind {model.incompleteLocation}, constraints: gbc(gridx:1, gridy:3, anchor : GridBagConstraints.LINE_START))
|
||||
button(text : "Choose", constraints : gbc(gridx : 2, gridy:3), incompleteLocationAction)
|
||||
}
|
||||
|
||||
panel (border : titledBorder(title : "Upload Settings", border : etchedBorder(), titlePosition : TitledBorder.TOP,
|
||||
|
Reference in New Issue
Block a user