From f494faac99958fac8e04834e91f6e8c61984f361 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 15 Sep 2014 23:28:12 +0100 Subject: Show form fields after updating --- src/command/commands.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/command') diff --git a/src/command/commands.c b/src/command/commands.c index 0f181f31..e96d2f7a 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1858,15 +1858,15 @@ cmd_form(gchar **args, struct cmd_help_t help) case FIELD_TEXT_PRIVATE: case FIELD_JID_SINGLE: form_set_value(current->form, tag, value); - ui_current_print_line("%s set to %s", tag, value); + ui_show_form_field(current, current->form, tag); break; case FIELD_BOOLEAN: if (g_strcmp0(value, "on") == 0) { form_set_value(current->form, tag, "1"); - ui_current_print_line("%s set to %s", tag, value); + ui_show_form_field(current, current->form, tag); } else if (g_strcmp0(value, "off") == 0) { form_set_value(current->form, tag, "0"); - ui_current_print_line("%s set to %s", tag, value); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Value %s not valid for boolean field: %s", value, tag); } @@ -1875,7 +1875,7 @@ cmd_form(gchar **args, struct cmd_help_t help) valid = form_field_contains_option(current->form, tag, value); if (valid == TRUE) { form_set_value(current->form, tag, value); - ui_current_print_line("%s set to %s", tag, value); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Value %s not a valid option for field: %s", value, tag); } @@ -1916,7 +1916,7 @@ cmd_form(gchar **args, struct cmd_help_t help) if (valid) { added = form_add_unique_value(current->form, tag, value); if (added) { - ui_current_print_line("Added %s to %s", value, tag); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Value %s already selected for %s", value, tag); } @@ -1926,12 +1926,12 @@ cmd_form(gchar **args, struct cmd_help_t help) break; case FIELD_TEXT_MULTI: form_add_value(current->form, tag, value); - ui_current_print_line("Added %s to %s", value, tag); + ui_show_form_field(current, current->form, tag); break; case FIELD_JID_MULTI: added = form_add_unique_value(current->form, tag, value); if (added) { - ui_current_print_line("Added %s to %s", value, tag); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("JID %s already exists in %s", value, tag); } @@ -1972,7 +1972,7 @@ cmd_form(gchar **args, struct cmd_help_t help) if (valid == TRUE) { removed = form_remove_value(current->form, tag, value); if (removed) { - ui_current_print_line("Removed %s from %s", value, tag); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Value %s is not currently set for %s", value, tag); } @@ -1998,7 +1998,7 @@ cmd_form(gchar **args, struct cmd_help_t help) removed = form_remove_text_multi_value(current->form, tag, index); if (removed) { - ui_current_print_line("Removed %s from %s", value, tag); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Could not remove %s from %s", value, tag); } @@ -2006,7 +2006,7 @@ cmd_form(gchar **args, struct cmd_help_t help) case FIELD_JID_MULTI: removed = form_remove_value(current->form, tag, value); if (removed) { - ui_current_print_line("Removed %s from %s", value, tag); + ui_show_form_field(current, current->form, tag); } else { ui_current_print_line("Field %s does not contain %s", tag, value); } -- cgit 1.4.1-2-gfad0