mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added [OTR] and (trusted/untrusted) to titlebar for OTR sessions
This commit is contained in:
parent
bf494b1b07
commit
b5469e2e06
@ -2330,6 +2330,8 @@ cmd_otr(gchar **args, struct cmd_help_t help)
|
|||||||
char *recipient = ui_current_recipient();
|
char *recipient = ui_current_recipient();
|
||||||
message_send("?OTR?", recipient);
|
message_send("?OTR?", recipient);
|
||||||
ui_current_set_otr(TRUE);
|
ui_current_set_otr(TRUE);
|
||||||
|
// refresh to show OTR in titlebar
|
||||||
|
ui_switch_win(ui_current_win_index());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -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(basedir, TRUE);
|
||||||
g_string_free(keysfilename, TRUE);
|
g_string_free(keysfilename, TRUE);
|
||||||
g_string_free(fpsfilename, TRUE);
|
g_string_free(fpsfilename, TRUE);
|
||||||
|
@ -516,6 +516,15 @@ _get_recipient_string(ProfWin *window)
|
|||||||
g_string_append(result, window->from);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ win_create(const char * const title, int cols, win_type_t type)
|
|||||||
new_win->history_shown = 0;
|
new_win->history_shown = 0;
|
||||||
new_win->type = type;
|
new_win->type = type;
|
||||||
new_win->is_otr = FALSE;
|
new_win->is_otr = FALSE;
|
||||||
|
new_win->is_trusted = FALSE;
|
||||||
scrollok(new_win->win, TRUE);
|
scrollok(new_win->win, TRUE);
|
||||||
|
|
||||||
return new_win;
|
return new_win;
|
||||||
|
@ -49,6 +49,7 @@ typedef struct prof_win_t {
|
|||||||
WINDOW *win;
|
WINDOW *win;
|
||||||
win_type_t type;
|
win_type_t type;
|
||||||
gboolean is_otr;
|
gboolean is_otr;
|
||||||
|
gboolean is_trusted;
|
||||||
int y_pos;
|
int y_pos;
|
||||||
int paged;
|
int paged;
|
||||||
int unread;
|
int unread;
|
||||||
|
Loading…
Reference in New Issue
Block a user