option to disable sending paths

auto-update
Zlatin Balevsky 2021-10-05 02:41:24 +01:00
parent 844462602b
commit 75151e39db
No known key found for this signature in database
GPG Key ID: A72832072D525E41
4 changed files with 20 additions and 2 deletions

View File

@ -126,6 +126,10 @@ class OptionsController {
model.browseFiles = browseFiles model.browseFiles = browseFiles
settings.browseFiles = browseFiles settings.browseFiles = browseFiles
boolean showPaths = view.showPathsCheckbox.model.isSelected()
model.showPaths = showPaths
settings.showPaths = showPaths
boolean allowTracking = view.allowTrackingCheckbox.model.isSelected() boolean allowTracking = view.allowTrackingCheckbox.model.isSelected()
model.allowTracking = allowTracking model.allowTracking = allowTracking
settings.allowTracking = allowTracking settings.allowTracking = allowTracking

View File

@ -289,6 +289,7 @@ OPTIONS_SEARCH_SETTINGS=Search Settings
OPTIONS_SEARCH_IN_COMMENTS=Search in comments OPTIONS_SEARCH_IN_COMMENTS=Search in comments
OPTIONS_SEARCH_IN_COLLECTIONS=Search in collections OPTIONS_SEARCH_IN_COLLECTIONS=Search in collections
OPTIONS_ALLOW_BROWSING=Allow browsing OPTIONS_ALLOW_BROWSING=Allow browsing
OPTIONS_SHOW_PATHS=Send folder information with results
OPTIONS_ALLOW_TRACKING=Allow tracking OPTIONS_ALLOW_TRACKING=Allow tracking
OPTIONS_DOWNLOAD_SETTINGS=Download Settings OPTIONS_DOWNLOAD_SETTINGS=Download Settings
OPTIONS_RETRY_FAILED_DOWNLOADS=Retry failed downloads every (seconds) OPTIONS_RETRY_FAILED_DOWNLOADS=Retry failed downloads every (seconds)

View File

@ -25,6 +25,8 @@ class OptionsModel {
@Observable boolean searchComments @Observable boolean searchComments
@Observable boolean searchCollections @Observable boolean searchCollections
@Observable boolean browseFiles @Observable boolean browseFiles
@Observable boolean showPaths
@Observable boolean showPathsCheckboxEnabled
@Observable boolean allowTracking @Observable boolean allowTracking
@Observable int speedSmoothSeconds @Observable int speedSmoothSeconds
@Observable int totalUploadSlots @Observable int totalUploadSlots
@ -111,6 +113,8 @@ class OptionsModel {
searchComments = settings.searchComments searchComments = settings.searchComments
searchCollections = settings.searchCollections searchCollections = settings.searchCollections
browseFiles = settings.browseFiles browseFiles = settings.browseFiles
showPaths = settings.showPaths
setShowPathsCheckboxEnabled(browseFiles)
allowTracking = settings.allowTracking allowTracking = settings.allowTracking
speedSmoothSeconds = settings.speedSmoothSeconds speedSmoothSeconds = settings.speedSmoothSeconds
totalUploadSlots = settings.totalUploadSlots totalUploadSlots = settings.totalUploadSlots

View File

@ -55,6 +55,7 @@ class OptionsView {
def searchCommentsCheckbox def searchCommentsCheckbox
def searchCollectionsCheckbox def searchCollectionsCheckbox
def browseFilesCheckbox def browseFilesCheckbox
def showPathsCheckbox
def allowTrackingCheckbox def allowTrackingCheckbox
def speedSmoothSecondsField def speedSmoothSecondsField
def totalUploadSlotsField def totalUploadSlotsField
@ -132,9 +133,13 @@ class OptionsView {
fill : GridBagConstraints.HORIZONTAL, weightx: 100)) fill : GridBagConstraints.HORIZONTAL, weightx: 100))
browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 2, browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 2,
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0)) anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
label(text : trans("OPTIONS_ALLOW_TRACKING"), constraints : gbc(gridx: 0, gridy: 3, anchor: GridBagConstraints.LINE_START, label(text : trans("OPTIONS_SHOW_PATHS"), enabled: bind{model.showPathsCheckboxEnabled}, constraints: gbc(gridx:0, gridy:3, anchor: GridBagConstraints.LINE_START,
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
showPathsCheckbox = checkBox(selected : bind {model.showPaths}, enabled : bind{model.showPathsCheckboxEnabled}, constraints : gbc(gridx: 1, gridy : 3,
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0))
label(text : trans("OPTIONS_ALLOW_TRACKING"), constraints : gbc(gridx: 0, gridy: 4, anchor: GridBagConstraints.LINE_START,
fill : GridBagConstraints.HORIZONTAL, weightx: 100)) fill : GridBagConstraints.HORIZONTAL, weightx: 100))
allowTrackingCheckbox = checkBox(selected : bind {model.allowTracking}, constraints : gbc(gridx: 1, gridy : 3, allowTrackingCheckbox = checkBox(selected : bind {model.allowTracking}, constraints : gbc(gridx: 1, gridy : 4,
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0)) anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0))
} }
@ -444,6 +449,10 @@ class OptionsView {
allowUntrustedCheckbox.addActionListener { allowUntrustedCheckbox.addActionListener {
model.searchExtraHopCheckboxEnabled = allowUntrustedCheckbox.model.isSelected() model.searchExtraHopCheckboxEnabled = allowUntrustedCheckbox.model.isSelected()
} }
browseFilesCheckbox.addActionListener {
model.showPathsCheckboxEnabled = browseFilesCheckbox.model.isSelected()
}
} }
boolean isAqua() { boolean isAqua() {