Commit 09c73432 authored by Jack Jansen's avatar Jack Jansen

Turns out GetArgv() options can be 4-tuples too, with the last value being the...

Turns out GetArgv() options can be 4-tuples too, with the last value being the default (or something like that). Cater for this.

Also put in a safeguard against very long help strings.
parent 96cad2ea
...@@ -361,12 +361,18 @@ def _selectoption(d, optionlist, idx): ...@@ -361,12 +361,18 @@ def _selectoption(d, optionlist, idx):
MacOS.SysBeep() MacOS.SysBeep()
return return
option = optionlist[idx] option = optionlist[idx]
if type(option) == type(()) and \ if type(option) == type(()):
len(option) > 1: if len(option) == 4:
help = option[2]
elif len(option) > 1:
help = option[-1] help = option[-1]
else: else:
help = '' help = ''
else:
help = ''
h = d.GetDialogItemAsControl(ARGV_OPTION_EXPLAIN) h = d.GetDialogItemAsControl(ARGV_OPTION_EXPLAIN)
if help and len(help) > 250:
help = help[:250] + '...'
Dlg.SetDialogItemText(h, help) Dlg.SetDialogItemText(h, help)
hasvalue = 0 hasvalue = 0
if type(option) == type(()): if type(option) == type(()):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment