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
This commit is contained in:
Michael Vetter
2019-11-05 20:39:33 +01:00
parent 5490d148b9
commit fc6f2755c1
6 changed files with 50 additions and 59 deletions

View File

@@ -1130,12 +1130,20 @@ cons_wrap_setting(void)
}
void
cons_encwarn_setting(void)
cons_titlebar_setting(void)
{
if (prefs_get_boolean(PREF_ENC_WARN)) {
cons_show("Warn unencrypted (/encwarn) : ON");
cons_winpos_setting();
if (prefs_get_boolean(PREF_TLS_SHOW)) {
cons_show("TLS show (/titlebar) : ON");
} else {
cons_show("Warn unencrypted (/encwarn) : OFF");
cons_show("TLS show (/titlebar) : OFF");
}
if (prefs_get_boolean(PREF_ENC_WARN)) {
cons_show("Warn unencrypted (/titlebar) : ON");
} else {
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();

View File

@@ -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);