mirror of https://github.com/zlatinb/muwire
add option to disable browsing of files, make the dialog bigger
parent
383addbc37
commit
2b04374e23
|
@ -87,6 +87,10 @@ class OptionsController {
|
|||
model.shareHiddenFiles = shareHidden
|
||||
settings.shareHiddenFiles = shareHidden
|
||||
|
||||
boolean browseFiles = view.browseFilesCheckbox.model.isSelected()
|
||||
model.browseFiles = browseFiles
|
||||
settings.browseFiles = browseFiles
|
||||
|
||||
String downloadLocation = model.downloadLocation
|
||||
settings.downloadLocation = new File(downloadLocation)
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ class OptionsModel {
|
|||
@Observable boolean shareHiddenFiles
|
||||
@Observable String downloadLocation
|
||||
@Observable boolean searchComments
|
||||
@Observable boolean browseFiles
|
||||
|
||||
// i2p options
|
||||
@Observable String inboundLength
|
||||
|
@ -56,6 +57,7 @@ class OptionsModel {
|
|||
shareHiddenFiles = settings.shareHiddenFiles
|
||||
downloadLocation = settings.downloadLocation.getAbsolutePath()
|
||||
searchComments = settings.searchComments
|
||||
browseFiles = settings.browseFiles
|
||||
|
||||
Core core = application.context.get("core")
|
||||
inboundLength = core.i2pOptions["inbound.length"]
|
||||
|
|
|
@ -102,7 +102,7 @@ class BrowseView {
|
|||
controller.register()
|
||||
|
||||
dialog.getContentPane().add(p)
|
||||
dialog.pack()
|
||||
dialog.setSize(700, 400)
|
||||
dialog.setLocationRelativeTo(mainFrame)
|
||||
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE)
|
||||
dialog.addWindowListener( new WindowAdapter() {
|
||||
|
|
|
@ -38,6 +38,7 @@ class OptionsView {
|
|||
def shareDownloadedCheckbox
|
||||
def shareHiddenCheckbox
|
||||
def searchCommentsCheckbox
|
||||
def browseFilesCheckbox
|
||||
|
||||
def inboundLengthField
|
||||
def inboundQuantityField
|
||||
|
@ -93,9 +94,12 @@ class OptionsView {
|
|||
label(text : "Share hidden files", constraints : gbc(gridx : 0, gridy:5))
|
||||
shareHiddenCheckbox = checkBox(selected : bind {model.shareHiddenFiles}, constraints : gbc(gridx :1, gridy:5))
|
||||
|
||||
label(text : "Save downloaded files to:", constraints: gbc(gridx:0, gridy:6))
|
||||
button(text : "Choose", constraints : gbc(gridx : 1, gridy:6), downloadLocationAction)
|
||||
label(text : bind {model.downloadLocation}, constraints: gbc(gridx:0, gridy:7, gridwidth:2))
|
||||
label(text : "Allow browsing", constraints : gbc(gridx : 0, gridy : 6))
|
||||
browseFilesCheckbox = checkBox(selected : bind {model.browseFiles}, constraints : gbc(gridx : 1, gridy : 6))
|
||||
|
||||
label(text : "Save downloaded files to:", constraints: gbc(gridx:0, gridy:7))
|
||||
button(text : "Choose", constraints : gbc(gridx : 1, gridy:7), downloadLocationAction)
|
||||
label(text : bind {model.downloadLocation}, constraints: gbc(gridx:0, gridy:8, gridwidth:2))
|
||||
|
||||
}
|
||||
i = builder.panel {
|
||||
|
|
Loading…
Reference in New Issue