diff --git a/src/command/commands.c b/src/command/commands.c index e9e70063..525b188c 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2330,6 +2330,8 @@ cmd_otr(gchar **args, struct cmd_help_t help) char *recipient = ui_current_recipient(); message_send("?OTR?", recipient); ui_current_set_otr(TRUE); + // refresh to show OTR in titlebar + ui_switch_win(ui_current_win_index()); } } return TRUE; diff --git a/src/otr.c b/src/otr.c index dabf944e..42a02e96 100644 --- a/src/otr.c +++ b/src/otr.c @@ -228,6 +228,10 @@ otr_on_connect(ProfAccount *account) } } + if (data_loaded) { + cons_show("Loaded OTR private key for %s", jid); + } + g_string_free(basedir, TRUE); g_string_free(keysfilename, TRUE); g_string_free(fpsfilename, TRUE); diff --git a/src/ui/core.c b/src/ui/core.c index 622261b6..41fd31e8 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -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; } diff --git a/src/ui/window.c b/src/ui/window.c index c144dc06..6d6df429 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -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; diff --git a/src/ui/window.h b/src/ui/window.h index 4a65488e..fabf8ae6 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -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;