about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-17 00:49:06 +0100
committerJames Booth <boothj5@gmail.com>2014-09-17 00:49:06 +0100
commit60eedc7c6dcb23e7596e1791843e0ce8cf92269a (patch)
treed1be7e0a9ce8859bb01806e67b0ce1e363257559 /src
parent0de9c1bddaa8d429a8ff1abced19137c8c51a561 (diff)
downloadprofani-tty-60eedc7c6dcb23e7596e1791843e0ce8cf92269a.tar.gz
Added field updated message, show form mofified indicator for /wins
Diffstat (limited to 'src')
-rw-r--r--src/command/commands.c10
-rw-r--r--src/ui/windows.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index fa439955..d80c935a 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1877,14 +1877,17 @@ 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("Field updated...");
                 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("Field updated...");
                     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("Field updated...");
                     ui_show_form_field(current, current->form, tag);
                 } else {
                     ui_current_print_line("Value %s not valid for boolean field: %s", value, tag);
@@ -1894,6 +1897,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("Field updated...");
                     ui_show_form_field(current, current->form, tag);
                 } else {
                     ui_current_print_line("Value %s not a valid option for field: %s", value, tag);
@@ -1935,6 +1939,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("Field updated...");
                         ui_show_form_field(current, current->form, tag);
                     } else {
                         ui_current_print_line("Value %s already selected for %s", value, tag);
@@ -1945,11 +1950,13 @@ 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("Field updated...");
                 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("Field updated...");
                     ui_show_form_field(current, current->form, tag);
                 } else {
                     ui_current_print_line("JID %s already exists in %s", value, tag);
@@ -1991,6 +1998,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("Field updated...");
                         ui_show_form_field(current, current->form, tag);
                     } else {
                         ui_current_print_line("Value %s is not currently set for %s", value, tag);
@@ -2017,6 +2025,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("Field updated...");
                     ui_show_form_field(current, current->form, tag);
                 } else {
                     ui_current_print_line("Could not remove %s from %s", value, tag);
@@ -2025,6 +2034,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("Field updated...");
                     ui_show_form_field(current, current->form, tag);
                 } else {
                     ui_current_print_line("Field %s does not contain %s", tag, value);
diff --git a/src/ui/windows.c b/src/ui/windows.c
index ff7fc3e2..a2d8276a 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -618,6 +618,9 @@ wins_create_summary(void)
             case WIN_MUC_CONFIG:
                 muc_config_string = g_string_new("");
                 g_string_printf(muc_config_string, "%d: %s", ui_index, window->from);
+                if ((window->form != NULL) && (window->form->modified)) {
+                    g_string_append(muc_config_string, " *");
+                }
                 result = g_slist_append(result, strdup(muc_config_string->str));
                 g_string_free(muc_config_string, TRUE);