Added [OTR] and (trusted/untrusted) to titlebar for OTR sessions

This commit is contained in:
James Booth
2014-01-11 18:24:44 +00:00
parent bf494b1b07
commit b5469e2e06
5 changed files with 17 additions and 0 deletions

View File

@@ -516,6 +516,15 @@ _get_recipient_string(ProfWin *window)
g_string_append(result, window->from);
}
if (window->is_otr) {
g_string_append(result, " [OTR]");
if (window->is_trusted) {
g_string_append(result, " (trusted)");
} else {
g_string_append(result, " (untrusted)");
}
}
return result;
}

View File

@@ -55,6 +55,7 @@ win_create(const char * const title, int cols, win_type_t type)
new_win->history_shown = 0;
new_win->type = type;
new_win->is_otr = FALSE;
new_win->is_trusted = FALSE;
scrollok(new_win->win, TRUE);
return new_win;

View File

@@ -49,6 +49,7 @@ typedef struct prof_win_t {
WINDOW *win;
win_type_t type;
gboolean is_otr;
gboolean is_trusted;
int y_pos;
int paged;
int unread;