about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-15 23:28:12 +0100
committerJames Booth <boothj5@gmail.com>2014-09-15 23:28:12 +0100
commitf494faac99958fac8e04834e91f6e8c61984f361 (patch)
treedc90661b07e6092c3a59d73db233ff9b5a4b4ed2 /src/command
parent6b575aa8fced566b6a2dfb5f5a9543363e211390 (diff)
downloadprofani-tty-f494faac99958fac8e04834e91f6e8c61984f361.tar.gz
Show form fields after updating
Diffstat (limited to 'src/command')
-rw-r--r--src/command/commands.c20
1 files changed, 10 insertions, 10 deletions
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);
                 }