mirror of https://github.com/zlatinb/muwire
option to disable searching in shared folders
parent
08652d7d5a
commit
4fe8fb3fa9
|
@ -100,6 +100,10 @@ class OptionsController {
|
|||
boolean searchCollections = view.searchCollectionsCheckbox.model.isSelected()
|
||||
model.searchCollections = searchCollections
|
||||
settings.searchCollections = searchCollections
|
||||
|
||||
boolean searchPaths = view.searchPathsCheckbox.model.isSelected()
|
||||
model.searchPaths = searchPaths
|
||||
settings.searchPaths = searchPaths
|
||||
|
||||
boolean shareDownloaded = view.shareDownloadedCheckbox.model.isSelected()
|
||||
model.shareDownloadedFiles = shareDownloaded
|
||||
|
|
|
@ -288,6 +288,7 @@ COMMUNICATIONS=Communications
|
|||
OPTIONS_SEARCH_SETTINGS=Search Settings
|
||||
OPTIONS_SEARCH_IN_COMMENTS=Search in comments
|
||||
OPTIONS_SEARCH_IN_COLLECTIONS=Search in collections
|
||||
OPTIONS_SEARCH_IN_FOLDERS=Search in shared folders
|
||||
OPTIONS_ALLOW_BROWSING=Allow browsing
|
||||
OPTIONS_SHOW_PATHS=Send folder information with results
|
||||
OPTIONS_ALLOW_TRACKING=Allow tracking
|
||||
|
|
|
@ -24,6 +24,7 @@ class OptionsModel {
|
|||
@Observable String incompleteLocation
|
||||
@Observable boolean searchComments
|
||||
@Observable boolean searchCollections
|
||||
@Observable boolean searchPaths
|
||||
@Observable boolean browseFiles
|
||||
@Observable boolean showPaths
|
||||
@Observable boolean showPathsCheckboxEnabled
|
||||
|
@ -112,6 +113,7 @@ class OptionsModel {
|
|||
incompleteLocation = settings.incompleteLocation.getAbsolutePath()
|
||||
searchComments = settings.searchComments
|
||||
searchCollections = settings.searchCollections
|
||||
searchPaths = settings.searchPaths
|
||||
browseFiles = settings.browseFiles
|
||||
showPaths = settings.showPaths
|
||||
setShowPathsCheckboxEnabled(browseFiles)
|
||||
|
|
|
@ -54,6 +54,7 @@ class OptionsView {
|
|||
def ignoredFileTypesTextField
|
||||
def searchCommentsCheckbox
|
||||
def searchCollectionsCheckbox
|
||||
def searchPathsCheckbox
|
||||
def browseFilesCheckbox
|
||||
def showPathsCheckbox
|
||||
def allowTrackingCheckbox
|
||||
|
@ -124,22 +125,26 @@ class OptionsView {
|
|||
label(text : trans("OPTIONS_SEARCH_IN_COMMENTS"), constraints:gbc(gridx: 0, gridy:0, anchor : GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
searchCommentsCheckbox = checkBox(selected : bind {model.searchComments}, constraints : gbc(gridx:1, gridy:0,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_SEARCH_IN_COLLECTIONS"), constraints:gbc(gridx: 0, gridy:1, anchor : GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
searchCollectionsCheckbox = checkBox(selected : bind {model.searchCollections}, constraints : gbc(gridx:1, gridy:1,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_ALLOW_BROWSING"), constraints : gbc(gridx : 0, gridy : 2, anchor : GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 2,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_SHOW_PATHS"), enabled: bind{model.showPathsCheckboxEnabled}, constraints: gbc(gridx:0, gridy:3, anchor: GridBagConstraints.LINE_START,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_SEARCH_IN_FOLDERS"), constraints:gbc(gridx: 0, gridy:2, 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,
|
||||
searchPathsCheckbox = checkBox(selected : bind {model.searchPaths}, constraints : gbc(gridx:1, gridy:2,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_ALLOW_BROWSING"), constraints : gbc(gridx : 0, gridy : 3, anchor : GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
allowTrackingCheckbox = checkBox(selected : bind {model.allowTracking}, constraints : gbc(gridx: 1, gridy : 4,
|
||||
browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 3,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx: 0))
|
||||
label(text : trans("OPTIONS_SHOW_PATHS"), enabled: bind{model.showPathsCheckboxEnabled}, constraints: gbc(gridx:0, gridy:4, anchor: GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
showPathsCheckbox = checkBox(selected : bind {model.showPaths}, enabled : bind{model.showPathsCheckboxEnabled}, constraints : gbc(gridx: 1, gridy : 4,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0))
|
||||
label(text : trans("OPTIONS_ALLOW_TRACKING"), constraints : gbc(gridx: 0, gridy: 5, anchor: GridBagConstraints.LINE_START,
|
||||
fill : GridBagConstraints.HORIZONTAL, weightx: 100))
|
||||
allowTrackingCheckbox = checkBox(selected : bind {model.allowTracking}, constraints : gbc(gridx: 1, gridy : 5,
|
||||
anchor : GridBagConstraints.LINE_END, fill : GridBagConstraints.HORIZONTAL, weightx : 0))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue