mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 08:06:22 +00:00
Remove contact lookup when showing OTR privacy
This commit is contained in:
@@ -262,70 +262,58 @@ _show_privacy(void)
|
|||||||
{
|
{
|
||||||
int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
|
int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
|
||||||
|
|
||||||
if (current_recipient != NULL) {
|
ProfWin *current = wins_get_current();
|
||||||
char *recipient_jid = NULL;
|
if (current && current->type == WIN_CHAT) {
|
||||||
char *found_contact = roster_contact_autocomplete(current_recipient);
|
if (!current->is_otr) {
|
||||||
if (found_contact != NULL) {
|
if (prefs_get_boolean(PREF_OTR_WARN)) {
|
||||||
recipient_jid = roster_barejid_from_name(current_recipient);
|
int unencrypted_attrs = theme_attrs(THEME_TITLE_UNENCRYPTED);
|
||||||
free(found_contact);
|
wprintw(win, " ");
|
||||||
|
wattron(win, bracket_attrs);
|
||||||
|
wprintw(win, "[");
|
||||||
|
wattroff(win, bracket_attrs);
|
||||||
|
wattron(win, unencrypted_attrs);
|
||||||
|
wprintw(win, "unencrypted");
|
||||||
|
wattroff(win, unencrypted_attrs);
|
||||||
|
wattron(win, bracket_attrs);
|
||||||
|
wprintw(win, "]");
|
||||||
|
wattroff(win, bracket_attrs);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
recipient_jid = current_recipient;
|
int encrypted_attrs = theme_attrs(THEME_TITLE_ENCRYPTED);
|
||||||
}
|
wprintw(win, " ");
|
||||||
ProfWin *current = wins_get_by_recipient(recipient_jid);
|
wattron(win, bracket_attrs);
|
||||||
if (current != NULL) {
|
wprintw(win, "[");
|
||||||
if (current->type == WIN_CHAT) {
|
wattroff(win, bracket_attrs);
|
||||||
if (!current->is_otr) {
|
wattron(win, encrypted_attrs);
|
||||||
if (prefs_get_boolean(PREF_OTR_WARN)) {
|
wprintw(win, "OTR");
|
||||||
int unencrypted_attrs = theme_attrs(THEME_TITLE_UNENCRYPTED);
|
wattroff(win, encrypted_attrs);
|
||||||
wprintw(win, " ");
|
wattron(win, bracket_attrs);
|
||||||
wattron(win, bracket_attrs);
|
wprintw(win, "]");
|
||||||
wprintw(win, "[");
|
wattroff(win, bracket_attrs);
|
||||||
wattroff(win, bracket_attrs);
|
if (current->is_trusted) {
|
||||||
wattron(win, unencrypted_attrs);
|
int trusted_attrs = theme_attrs(THEME_TITLE_TRUSTED);
|
||||||
wprintw(win, "unencrypted");
|
wprintw(win, " ");
|
||||||
wattroff(win, unencrypted_attrs);
|
wattron(win, bracket_attrs);
|
||||||
wattron(win, bracket_attrs);
|
wprintw(win, "[");
|
||||||
wprintw(win, "]");
|
wattroff(win, bracket_attrs);
|
||||||
wattroff(win, bracket_attrs);
|
wattron(win, trusted_attrs);
|
||||||
}
|
wprintw(win, "trusted");
|
||||||
} else {
|
wattroff(win, trusted_attrs);
|
||||||
int encrypted_attrs = theme_attrs(THEME_TITLE_ENCRYPTED);
|
wattron(win, bracket_attrs);
|
||||||
wprintw(win, " ");
|
wprintw(win, "]");
|
||||||
wattron(win, bracket_attrs);
|
wattroff(win, bracket_attrs);
|
||||||
wprintw(win, "[");
|
} else {
|
||||||
wattroff(win, bracket_attrs);
|
int untrusted_attrs = theme_attrs(THEME_TITLE_UNTRUSTED);
|
||||||
wattron(win, encrypted_attrs);
|
wprintw(win, " ");
|
||||||
wprintw(win, "OTR");
|
wattron(win, bracket_attrs);
|
||||||
wattroff(win, encrypted_attrs);
|
wprintw(win, "[");
|
||||||
wattron(win, bracket_attrs);
|
wattroff(win, bracket_attrs);
|
||||||
wprintw(win, "]");
|
wattron(win, untrusted_attrs);
|
||||||
wattroff(win, bracket_attrs);
|
wprintw(win, "untrusted");
|
||||||
if (current->is_trusted) {
|
wattroff(win, untrusted_attrs);
|
||||||
int trusted_attrs = theme_attrs(THEME_TITLE_TRUSTED);
|
wattron(win, bracket_attrs);
|
||||||
wprintw(win, " ");
|
wprintw(win, "]");
|
||||||
wattron(win, bracket_attrs);
|
wattroff(win, bracket_attrs);
|
||||||
wprintw(win, "[");
|
|
||||||
wattroff(win, bracket_attrs);
|
|
||||||
wattron(win, trusted_attrs);
|
|
||||||
wprintw(win, "trusted");
|
|
||||||
wattroff(win, trusted_attrs);
|
|
||||||
wattron(win, bracket_attrs);
|
|
||||||
wprintw(win, "]");
|
|
||||||
wattroff(win, bracket_attrs);
|
|
||||||
} else {
|
|
||||||
int untrusted_attrs = theme_attrs(THEME_TITLE_UNTRUSTED);
|
|
||||||
wprintw(win, " ");
|
|
||||||
wattron(win, bracket_attrs);
|
|
||||||
wprintw(win, "[");
|
|
||||||
wattroff(win, bracket_attrs);
|
|
||||||
wattron(win, untrusted_attrs);
|
|
||||||
wprintw(win, "untrusted");
|
|
||||||
wattroff(win, untrusted_attrs);
|
|
||||||
wattron(win, bracket_attrs);
|
|
||||||
wprintw(win, "]");
|
|
||||||
wattroff(win, bracket_attrs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user