diff options
author | Tomasz Moń <desowin@gmail.com> | 2014-10-12 17:26:04 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-10-12 19:54:57 +0000 |
commit | fc2f31810a6096909c8f81f9f74659edbec7a55b (patch) | |
tree | e23fedae90d9cd47efb85e2558d2f9a9f2ecc246 /ui/gtk/extcap_gtk.c | |
parent | 1b8b2a8aa8b3b21647070c8cb85de7d43cdd480e (diff) | |
download | wireshark-fc2f31810a6096909c8f81f9f74659edbec7a55b.tar.gz |
Fix handling of extcap boolflags which defaults to true.
Example:
arg {number=0}{call=--test}{type=boolflag}{default=true}
Before this change --test was never added to argument list (no matter if
user left it selected or explicitly deselected it).
After this change --test will be added to argument list unless user
explicitly deselects it.
Change-Id: Ia5bc11f900b03e630aba882ef918dcb7f0b79291
Reviewed-on: https://code.wireshark.org/review/4618
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'ui/gtk/extcap_gtk.c')
-rw-r--r-- | ui/gtk/extcap_gtk.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui/gtk/extcap_gtk.c b/ui/gtk/extcap_gtk.c index cc7bc883a0..0f8596b2f7 100644 --- a/ui/gtk/extcap_gtk.c +++ b/ui/gtk/extcap_gtk.c @@ -289,9 +289,6 @@ GHashTable *extcap_gtk_get_state(GtkWidget *widget) { if (parsed_complex == NULL && call_string == NULL) continue; - /* Comparing if the user has changed the value at all, and ignoring it if so */ - if (extcap_compare_is_default(arg, parsed_complex)) - continue; /* Flags are set as is, and have not true/false switch */ if (arg->arg_type == EXTCAP_ARG_BOOLFLAG) @@ -312,6 +309,14 @@ GHashTable *extcap_gtk_get_state(GtkWidget *widget) { continue; } } + else + { + /* Comparing if the user has changed the value at all, and ignoring it if so. + * This does not apply to EXTCAP_ARG_BOOLFLAG. + */ + if (extcap_compare_is_default(arg, parsed_complex)) + continue; + } if (parsed_complex != NULL && call_string == NULL) call_string = extcap_get_complex_as_string(parsed_complex); |