From fc6f2755c1cb65436df1a1e2a12e6f2de99183a9 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 5 Nov 2019 20:39:33 +0100 Subject: Move /encwarn command into /titlebar Instead of `/encwarn on|off` we now have `/titlebar show|hide encwarn`. Regards https://github.com/profanity-im/profanity/issues/1116 --- src/ui/console.c | 27 ++++++++++++--------------- src/ui/ui.h | 3 +-- 2 files changed, 13 insertions(+), 17 deletions(-) (limited to 'src/ui') diff --git a/src/ui/console.c b/src/ui/console.c index 4045636f..d9dce559 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1130,12 +1130,20 @@ cons_wrap_setting(void) } void -cons_encwarn_setting(void) +cons_titlebar_setting(void) { + cons_winpos_setting(); + + if (prefs_get_boolean(PREF_TLS_SHOW)) { + cons_show("TLS show (/titlebar) : ON"); + } else { + cons_show("TLS show (/titlebar) : OFF"); + } + if (prefs_get_boolean(PREF_ENC_WARN)) { - cons_show("Warn unencrypted (/encwarn) : ON"); + cons_show("Warn unencrypted (/titlebar) : ON"); } else { - cons_show("Warn unencrypted (/encwarn) : OFF"); + cons_show("Warn unencrypted (/titlebar) : OFF"); } } @@ -1155,16 +1163,6 @@ cons_console_setting(void) prefs_free_string(privsetting); } -void -cons_tlsshow_setting(void) -{ - if (prefs_get_boolean(PREF_TLS_SHOW)) { - cons_show("TLS show (/tls) : ON"); - } else { - cons_show("TLS show (/tls) : OFF"); - } -} - void cons_presence_setting(void) { @@ -1556,10 +1554,9 @@ cons_show_ui_prefs(void) cons_roster_setting(); cons_privileges_setting(); cons_wintitle_setting(); - cons_encwarn_setting(); cons_presence_setting(); cons_inpblock_setting(); - cons_tlsshow_setting(); + cons_titlebar_setting(); cons_statusbar_setting(); cons_alert(); diff --git a/src/ui/ui.h b/src/ui/ui.h index f6872938..4118781d 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -289,8 +289,7 @@ void cons_console_setting(void); void cons_flash_setting(void); void cons_tray_setting(void); void cons_splash_setting(void); -void cons_encwarn_setting(void); -void cons_tlsshow_setting(void); +void cons_titlebar_setting(void); void cons_vercheck_setting(void); void cons_occupants_setting(void); void cons_roster_setting(void); -- cgit 1.4.1-2-gfad0