mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 06:56:21 +00:00
Show contacts handle as window title in chat
This commit is contained in:
@@ -569,7 +569,16 @@ ui_switch_win(const int i)
|
||||
title_bar_title();
|
||||
status_bar_active(0);
|
||||
} else {
|
||||
title_bar_set_recipient(current->from);
|
||||
PContact contact = roster_get_contact(current->from);
|
||||
if (contact != NULL) {
|
||||
if (p_contact_name(contact) != NULL) {
|
||||
title_bar_set_recipient(p_contact_name(contact));
|
||||
} else {
|
||||
title_bar_set_recipient(current->from);
|
||||
}
|
||||
} else {
|
||||
title_bar_set_recipient(current->from);
|
||||
}
|
||||
title_bar_draw();;
|
||||
status_bar_active(i);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
static WINDOW *title_bar;
|
||||
static char *current_title = NULL;
|
||||
static char *recipient = NULL;
|
||||
static const char *recipient = NULL;
|
||||
static GTimer *typing_elapsed;
|
||||
static int dirty;
|
||||
static contact_presence_t current_status;
|
||||
@@ -126,7 +126,7 @@ title_bar_set_status(contact_presence_t status)
|
||||
}
|
||||
|
||||
void
|
||||
title_bar_set_recipient(char *from)
|
||||
title_bar_set_recipient(const char * const from)
|
||||
{
|
||||
if (typing_elapsed != NULL) {
|
||||
g_timer_destroy(typing_elapsed);
|
||||
|
||||
@@ -138,7 +138,7 @@ void title_bar_resize(void);
|
||||
void title_bar_show(const char * const title);
|
||||
void title_bar_title(void);
|
||||
void title_bar_set_status(contact_presence_t status);
|
||||
void title_bar_set_recipient(char *from);
|
||||
void title_bar_set_recipient(const char * const from);
|
||||
void title_bar_set_typing(gboolean is_typing);
|
||||
void title_bar_draw(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user