diff options
-rw-r--r-- | doc/README.extcap | 8 | ||||
-rwxr-xr-x | doc/extcap_example.py | 9 | ||||
-rw-r--r-- | ui/qt/extcap_argument_file.cpp | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/doc/README.extcap b/doc/README.extcap index 025c3ffb71..94ca73584b 100644 --- a/doc/README.extcap +++ b/doc/README.extcap @@ -85,7 +85,7 @@ capture. To allow an end-user to specify certain options, such options may be provided using the extcap config argument. To share which options are available for an interface, the extcap responds to -the command --config, that shows all the available options (aka additional command +the command --extcap-config, that shows all the available options (aka additional command line options). Those options are automatically presented via a dialog to the user for the individual @@ -167,10 +167,10 @@ These options do have types, for which the following types are being supported: arg {number=2}{call=--verify}{display=Verify}{tooltip=Verify package content}{type=boolflag} - * LOGFILE - Let the user provide a filepath to the capture. If FILE_MUSTEXIST is - being provided, the GUI checks if the file exists + * FILESELECT - Let the user provide a filepath to the capture. If MUSTEXIST is + being provided, the GUI checks if the file exists. - arg {number=3}{call=--logfile}{display=Logfile}{tooltip=A file for log messages}{type=fileselect}{file_mustexist=false} + arg {number=3}{call=--logfile}{display=Logfile}{tooltip=A file for log messages}{type=fileselect}{mustexist=false} * SELECTOR, RADIO, MULTICHECK - an optionfield, where the user may choose one or more options from. If PARENT is provided for the value items, the option fields diff --git a/doc/extcap_example.py b/doc/extcap_example.py index 3a3fde7aa7..6ab5699afb 100755 --- a/doc/extcap_example.py +++ b/doc/extcap_example.py @@ -107,10 +107,19 @@ def extcap_config(interface): args.append ( (7, '--d2test', 'Double 2 Test', 'Long Test Value', 'double', '{default= 123,456}')) args.append ( (8, '--password', 'Password', 'Package message password', 'password', '') ) args.append ( (9, '--ts', 'Start Time', 'Capture start time', 'timestamp', '') ) + args.append ( (10, '--logfile', 'Log File Test', 'The Log File Test', 'fileselect', '') ) + args.append ( (11, '--radio', 'Radio Test', 'Radio Test Value', 'radio', '') ) + args.append ( (12, '--multi', 'MultiCheck Test', 'MultiCheck Test Value', 'multicheck', '') ) values.append ( (3, "if1", "Remote1", "true" ) ) values.append ( (3, "if2", "Remote2", "false" ) ) + values.append ( (11, "r1", "Radio1", "false" ) ) + values.append ( (11, "r2", "Radio2", "true" ) ) + + values.append ( (12, "m1", "MultiCheck1", "false" ) ) + values.append ( (12, "m2", "MultiCheck2", "false" ) ) + for arg in args: print ("arg {number=%d}{call=%s}{display=%s}{tooltip=%s}{type=%s}%s" % arg) diff --git a/ui/qt/extcap_argument_file.cpp b/ui/qt/extcap_argument_file.cpp index 5d7df3f5b5..bff5ea0ea5 100644 --- a/ui/qt/extcap_argument_file.cpp +++ b/ui/qt/extcap_argument_file.cpp @@ -135,7 +135,9 @@ bool ExtcapArgumentFileSelection::isValid() if ( textBox->text().length() > 0 ) { - if ( QFileInfo(textBox->text()).exists() && _argument->fileexists ) + if (_argument->fileexists) + valid = QFileInfo(textBox->text()).exists(); + else valid = true; } else if ( ! isRequired() ) |