diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-10 14:52:42 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-10 14:52:42 +0100 |
commit | dd8086772d274542a28b7af045572933f0b6ac7d (patch) | |
tree | c9a8d895967ab68731ad01ac68e334ce1fc96c65 /src/ui | |
parent | c2d70a071fb107a98f9b057eab4e5021f0eb7187 (diff) | |
download | profani-tty-dd8086772d274542a28b7af045572933f0b6ac7d.tar.gz |
xep-0308: create setting to toggle lmc
and print settings if only `/correction` is run.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 9 | ||||
-rw-r--r-- | src/ui/window.c | 6 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 57a04290..f7fa448d 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -2024,7 +2024,14 @@ cons_os_setting(void) void cons_correction_setting(void) { - cons_show("TODO"); + if (prefs_get_boolean(PREF_CORRECTION_ALLOW)) { + cons_show("Last Message Correction (XEP-0308) (/correction) : ON"); + } else { + cons_show("Last Message Correction (XEP-0308) (/correction) : OFF"); + } + + char cc = prefs_get_correction_char(); + cons_show("LMC indication char (/correction char) : %c", cc); } void diff --git a/src/ui/window.c b/src/ui/window.c index b031ac22..339f4456 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1065,7 +1065,7 @@ win_correct_incoming(ProfWin *window, const char *const message, const char *con return; } - /* + /*TODO: set date? if (entry->date) { if (entry->date->timestamp) { g_date_time_unref(entry->date->timestamp); @@ -1076,9 +1076,7 @@ win_correct_incoming(ProfWin *window, const char *const message, const char *con entry->date = buffer_date_new_now(); */ - // TODO: setting - //entry->show_char = prefs_get_correction_char(); - entry->show_char = '+'; + entry->show_char = prefs_get_correction_char(); if (entry->message) { free(entry->message); |