Merge branch 'master' into winbuffers

Conflicts:
	src/ui/core.c
This commit is contained in:
James Booth
2014-06-27 00:52:52 +01:00
10 changed files with 51 additions and 23 deletions

View File

@@ -135,6 +135,9 @@ _ui_get_idle_time(void)
XFree(info);
return result;
}
if (info != NULL) {
XFree(info);
}
// if no libxss or xss idle time failed, use profanity idle time
#endif
gdouble seconds_elapsed = g_timer_elapsed(ui_idle_time, NULL);
@@ -2054,13 +2057,13 @@ _win_show_history(WINDOW *win, int win_index, const char * const contact)
{
ProfWin *window = wins_get_by_num(win_index);
if (!window->history_shown) {
GSList *history = NULL;
Jid *jid = jid_create(jabber_get_fulljid());
history = chat_log_get_previous(jid->barejid, contact, history);
GSList *history = chat_log_get_previous(jid->barejid, contact);
jid_destroy(jid);
while (history != NULL) {
win_save_print(window, '-', NULL, NO_DATE, 0, "", history->data);
history = g_slist_next(history);
GSList *curr = history;
while (curr != NULL) {
win_save_print(window, '-', NULL, NO_DATE, 0, "", curr->data);
curr = g_slist_next(curr);
}
window->history_shown = 1;

View File

@@ -166,8 +166,10 @@ _title_bar_draw(void)
// show privacy
if (current_recipient != NULL) {
char *recipient_jid = NULL;
if (roster_find_contact(current_recipient) != NULL) {
char *found_contact = roster_find_contact(current_recipient);
if (found_contact != NULL) {
recipient_jid = roster_barejid_from_name(current_recipient);
free(found_contact);
} else {
recipient_jid = current_recipient;
}