diff options
Diffstat (limited to 'contrib/bsddialog/utility/util_cli.c')
| -rw-r--r-- | contrib/bsddialog/utility/util_cli.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/bsddialog/utility/util_cli.c b/contrib/bsddialog/utility/util_cli.c index a70de36a699e..7e76ec84654f 100644 --- a/contrib/bsddialog/utility/util_cli.c +++ b/contrib/bsddialog/utility/util_cli.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2021-2023 Alfonso Sabato Siciliano + * Copyright (c) 2021-2025 Alfonso Sabato Siciliano * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -143,7 +143,8 @@ enum OPTS { TEXTBOX, TIMEBOX, TREEVIEW, - YESNO + YESNO, + SLIDER, }; /* options descriptor */ @@ -264,6 +265,7 @@ static struct option longopts[] = { {"pause", no_argument, NULL, PAUSE}, {"radiolist", no_argument, NULL, RADIOLIST}, {"rangebox", no_argument, NULL, RANGEBOX}, + {"slider", no_argument, NULL, SLIDER}, {"textbox", no_argument, NULL, TEXTBOX}, {"timebox", no_argument, NULL, TIMEBOX}, {"treeview", no_argument, NULL, TREEVIEW}, @@ -801,6 +803,13 @@ parseargs(int argc, char **argv, struct bsddialog_conf *conf, opt->name = "--rangebox"; opt->dialogbuilder = rangebox_builder; break; + case SLIDER: + if (opt->dialogbuilder != NULL) + exit_error(true, "%s and --slider without " + "--and-dialog", opt->name); + opt->name = "--slider"; + opt->dialogbuilder = slider_builder; + break; case TEXTBOX: if (opt->dialogbuilder != NULL) exit_error(true, "%s and --textbox without " |
