make speed smoothing interval configurable
This commit is contained in:
@@ -91,6 +91,10 @@ class OptionsController {
|
||||
model.browseFiles = browseFiles
|
||||
settings.browseFiles = browseFiles
|
||||
|
||||
text = view.speedSmoothSecondsField.text
|
||||
model.speedSmoothSeconds = Integer.valueOf(text)
|
||||
settings.speedSmoothSeconds = Integer.valueOf(text)
|
||||
|
||||
String downloadLocation = model.downloadLocation
|
||||
settings.downloadLocation = new File(downloadLocation)
|
||||
|
||||
|
@@ -18,6 +18,7 @@ class OptionsModel {
|
||||
@Observable String incompleteLocation
|
||||
@Observable boolean searchComments
|
||||
@Observable boolean browseFiles
|
||||
@Observable int speedSmoothSeconds
|
||||
|
||||
// i2p options
|
||||
@Observable String inboundLength
|
||||
@@ -60,6 +61,7 @@ class OptionsModel {
|
||||
incompleteLocation = settings.incompleteLocation.getAbsolutePath()
|
||||
searchComments = settings.searchComments
|
||||
browseFiles = settings.browseFiles
|
||||
speedSmoothSeconds = settings.speedSmoothSeconds
|
||||
|
||||
Core core = application.context.get("core")
|
||||
inboundLength = core.i2pOptions["inbound.length"]
|
||||
|
@@ -39,6 +39,7 @@ class OptionsView {
|
||||
def shareHiddenCheckbox
|
||||
def searchCommentsCheckbox
|
||||
def browseFilesCheckbox
|
||||
def speedSmoothSecondsField
|
||||
|
||||
def inboundLengthField
|
||||
def inboundQuantityField
|
||||
@@ -149,9 +150,12 @@ class OptionsView {
|
||||
label(text : "Automatically Clear Finished Downloads", constraints: gbc(gridx: 0, gridy:6))
|
||||
clearFinishedDownloadsCheckbox = checkBox(selected : bind {model.clearFinishedDownloads},
|
||||
constraints : gbc(gridx : 1, gridy:6, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : "Exclude Local Files From Results", constraints: gbc(gridx:0, gridy:7))
|
||||
label(text : "Smooth Download Speed Over (seconds)", constraints : gbc(gridx: 0, gridy : 7))
|
||||
speedSmoothSecondsField = textField(text : bind {model.speedSmoothSeconds},
|
||||
constraints : gbc(gridx:1, gridy: 7, anchor : GridBagConstraints.LINE_START))
|
||||
label(text : "Exclude Local Files From Results", constraints: gbc(gridx:0, gridy:8))
|
||||
excludeLocalResultCheckbox = checkBox(selected : bind {model.excludeLocalResult},
|
||||
constraints : gbc(gridx: 1, gridy : 7, anchor : GridBagConstraints.LINE_START))
|
||||
constraints : gbc(gridx: 1, gridy : 8, anchor : GridBagConstraints.LINE_START))
|
||||
|
||||
}
|
||||
bandwidth = builder.panel {
|
||||
|
Reference in New Issue
Block a user