Added ability to specify comma separated values for the trust anchor.
This commit is contained in:
parent
33ad8fcb36
commit
e85fe47a13
3 changed files with 17 additions and 1 deletions
|
|
@ -528,6 +528,9 @@ class CommandBase(object):
|
|||
setting.type == 'folder'):
|
||||
val_str = self.convert_val_to_str(new_dic[item])
|
||||
setting.value = val_str
|
||||
if setting.type == 'strings':
|
||||
strs = self.convert_val_to_str(new_dic[item]).split(',')
|
||||
setting.value = strs
|
||||
if setting.type == 'check':
|
||||
setting.value = new_dic[item]
|
||||
if setting.type == 'list':
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
|||
[[[additional_trust_anchors]]]
|
||||
display_name='Trust Anchors'
|
||||
default_value=''
|
||||
type='string'
|
||||
type='strings'
|
||||
description='A list of PEM-encoded certificates. Used as additional root certificates for validation to allow connecting to services using a self-signed certificate.'
|
||||
|
||||
[[webkit_settings]]
|
||||
|
|
|
|||
13
main.py
13
main.py
|
|
@ -872,6 +872,8 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
|
|||
setting = self.get_setting(name)
|
||||
if setting.type == 'string':
|
||||
return self.create_text_input_setting(name)
|
||||
elif setting.type == 'strings':
|
||||
return self.create_text_input_setting(name)
|
||||
elif setting.type == 'file':
|
||||
return self.create_text_input_with_file_setting(name)
|
||||
elif setting.type == 'folder':
|
||||
|
|
@ -1042,6 +1044,12 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
|
|||
|
||||
setting.value = old_val.replace('\\', '\\\\')
|
||||
widget.setText(unicode(old_val))
|
||||
elif setting.type == 'strings':
|
||||
old_val = []
|
||||
if setting.default_value is not None:
|
||||
old_val = setting.default_value
|
||||
setting.value = [unicode(v.replace('\\', '\\\\')) for v in old_val]
|
||||
widget.setText(','.join(setting.value))
|
||||
|
||||
elif setting.type == 'check':
|
||||
old_val = False
|
||||
|
|
@ -1093,6 +1101,8 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
|
|||
setting.type == 'file' or
|
||||
setting.type == 'folder'):
|
||||
setting.value = args[0]
|
||||
elif setting.type == 'strings':
|
||||
setting.value = args[0].split(',')
|
||||
elif setting.type == 'check':
|
||||
setting.value = obj.isChecked()
|
||||
check_action = setting.check_action
|
||||
|
|
@ -1229,6 +1239,9 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
|
|||
setting.type == 'folder'):
|
||||
val_str = self.convert_val_to_str(setting.value)
|
||||
setting_field.setText(setting.filter_name(val_str))
|
||||
if setting.type == 'strings':
|
||||
vals = [self.convert_val_to_str(v) for v in setting.value]
|
||||
setting_field.setText(','.join(vals))
|
||||
if setting.type == 'check':
|
||||
setting_field.setChecked(setting.value)
|
||||
if setting.type == 'list':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue