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