summaryrefslogtreecommitdiffstats
path: root/src/cli/report.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-04-15 15:52:09 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-04-15 15:52:09 +0200
commit3ebfe02dd9c81b10f47ca258bb2a0ef080dbbbeb (patch)
treed936b4e68e219e8783e6ac70821da4a9e5a35cd7 /src/cli/report.c
parentaa77bb9ee015eace791d5331b5ce5fe9e5e14634 (diff)
downloadabrt-3ebfe02dd9c81b10f47ca258bb2a0ef080dbbbeb.tar.gz
abrt-3ebfe02dd9c81b10f47ca258bb2a0ef080dbbbeb.tar.xz
abrt-3ebfe02dd9c81b10f47ca258bb2a0ef080dbbbeb.zip
Implement the possibility to add text labels to even config GUI. Closes #199.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/cli/report.c')
-rw-r--r--src/cli/report.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/cli/report.c b/src/cli/report.c
index 9374a3f7..f2c23804 100644
--- a/src/cli/report.c
+++ b/src/cli/report.c
@@ -443,17 +443,17 @@ static void ask_for_missing_settings(const char *event_name)
event_option_t *opt = get_event_option_from_list(opt_name,
event_config->options);
- free(opt->value);
- opt->value = NULL;
+ free(opt->eo_value);
+ opt->eo_value = NULL;
char result[512];
- char *question = xasprintf("%s: ", (opt->label) ? opt->label: opt->name);
- switch (opt->type) {
+ char *question = xasprintf("%s: ", (opt->eo_label) ? opt->eo_label : opt->eo_name);
+ switch (opt->eo_type) {
case OPTION_TYPE_TEXT:
case OPTION_TYPE_NUMBER:
read_from_stdin(question, result, 512);
- opt->value = xstrdup(result);
+ opt->eo_value = xstrdup(result);
break;
case OPTION_TYPE_PASSWORD:
{
@@ -462,7 +462,7 @@ static void ask_for_missing_settings(const char *event_name)
if (changed)
set_echo(true);
- opt->value = xstrdup(result);
+ opt->eo_value = xstrdup(result);
/* Newline was not added by pressing Enter because ECHO was
disabled, so add it now. */
puts("");
@@ -470,11 +470,12 @@ static void ask_for_missing_settings(const char *event_name)
}
case OPTION_TYPE_BOOL:
if (ask_yesno(question))
- opt->value = xstrdup("yes");
+ opt->eo_value = xstrdup("yes");
else
- opt->value = xstrdup("no");
+ opt->eo_value = xstrdup("no");
break;
+ case OPTION_TYPE_HINT_HTML: /* TODO? */
case OPTION_TYPE_INVALID:
break;
};