about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-10 00:25:44 +0100
committerJames Booth <boothj5@gmail.com>2014-09-10 00:25:44 +0100
commitf49a6a65d92acdb2a52c53b176b4f1487157ddd3 (patch)
tree2f03763deeb4bc3eee022fd407f0f336286e2acb /src
parent0897cd7d170e31a590234fbb53f9b530ad2544c0 (diff)
downloadprofani-tty-f49a6a65d92acdb2a52c53b176b4f1487157ddd3.tar.gz
Implemented text-multi, jid-single and fixed display for room config forms
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index f5a75cfd..1c19e4f7 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1935,6 +1935,14 @@ TODO add command to get help for a field
                 }
                 win_save_newline(window);
             }
+            if (g_strcmp0(field->type, "text-multi") == 0) {
+                win_save_newline(window);
+                while (curr_value != NULL) {
+                    char *value = curr_value->data;
+                    win_save_vprint(window, '-', NULL, 0, COLOUR_ONLINE, "", "  %s", value);
+                    curr_value = g_slist_next(curr_value);
+                }
+            }
             if (g_strcmp0(field->type, "boolean") == 0) {
                 if (curr_value == NULL) {
                     win_save_print(window, '-', NULL, NO_DATE, COLOUR_OFFLINE, "", "FALSE");
@@ -1984,6 +1992,15 @@ TODO add command to get help for a field
                     }
                 }
             }
+            if (g_strcmp0(field->type, "jid-single") == 0) {
+                if (curr_value != NULL) {
+                    char *value = curr_value->data;
+                    if (value != NULL) {
+                        win_save_print(window, '-', NULL, NO_DATE | NO_EOL, COLOUR_ONLINE, "", value);
+                    }
+                }
+                win_save_newline(window);
+            }
             if (g_strcmp0(field->type, "jid-multi") == 0) {
                 win_save_newline(window);
                 while (curr_value != NULL) {
@@ -1992,6 +2009,15 @@ TODO add command to get help for a field
                     curr_value = g_slist_next(curr_value);
                 }
             }
+            if (g_strcmp0(field->type, "fixed") == 0) {
+                if (curr_value != NULL) {
+                    char *value = curr_value->data;
+                    if (value != NULL) {
+                        win_save_print(window, '-', NULL, NO_DATE | NO_EOL, 0, "", value);
+                    }
+                }
+                win_save_newline(window);
+            }
         }
 
         curr_field = g_slist_next(curr_field);