gui option to disable tracking

This commit is contained in:
Zlatin Balevsky
2020-04-12 11:26:08 +01:00
parent 9f7aaec991
commit 7864eebb24
3 changed files with 11 additions and 0 deletions

View File

@ -104,6 +104,10 @@ class OptionsController {
model.browseFiles = browseFiles
settings.browseFiles = browseFiles
boolean allowTracking = view.allowTrackingCheckbox.model.isSelected()
model.allowTracking = allowTracking
settings.allowTracking = allowTracking
text = view.speedSmoothSecondsField.text
model.speedSmoothSeconds = Integer.valueOf(text)
settings.speedSmoothSeconds = Integer.valueOf(text)

View File

@ -18,6 +18,7 @@ class OptionsModel {
@Observable String incompleteLocation
@Observable boolean searchComments
@Observable boolean browseFiles
@Observable boolean allowTracking
@Observable int speedSmoothSeconds
@Observable int totalUploadSlots
@Observable int uploadSlotsPerUser
@ -83,6 +84,7 @@ class OptionsModel {
incompleteLocation = settings.incompleteLocation.getAbsolutePath()
searchComments = settings.searchComments
browseFiles = settings.browseFiles
allowTracking = settings.allowTracking
speedSmoothSeconds = settings.speedSmoothSeconds
totalUploadSlots = settings.totalUploadSlots
uploadSlotsPerUser = settings.uploadSlotsPerUser

View File

@ -43,6 +43,7 @@ class OptionsView {
def shareHiddenCheckbox
def searchCommentsCheckbox
def browseFilesCheckbox
def allowTrackingCheckbox
def speedSmoothSecondsField
def totalUploadSlotsField
def uploadSlotsPerUserField
@ -107,6 +108,10 @@ class OptionsView {
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 1,
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
label(text : "Allow tracking", constraints : gbc(gridx: 0, gridy: 2, anchor: GridBagConstraints.LINE_START,
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
allowTrackingCheckbox = checkBox(selected : bind {model.allowTracking}, constraints : gbc(gridx: 1, gridy : 2,
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0))
}
panel (border : titledBorder(title : "Download Settings", border : etchedBorder(), titlePosition : TitledBorder.TOP,