1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Inlined _title_bar_draw_title and _title_bar_draw_presence

This commit is contained in:
James Booth 2014-01-16 19:06:32 +00:00
parent 4792ac8df6
commit 754ad86e3d

View File

@ -35,9 +35,6 @@ static GTimer *typing_elapsed;
static contact_presence_t current_presence;
static void _title_bar_draw_title(void);
static void _title_bar_draw_presence(void);
static void
_create_title_bar(void)
{
@ -165,15 +162,15 @@ static void
_title_bar_draw(void)
{
werase(win);
_title_bar_draw_title();
_title_bar_draw_presence();
wrefresh(win);
inp_put_back();
}
static void
_title_bar_draw_presence(void)
{
// show title
wmove(win, 0, 0);
int i;
for (i = 0; i < 45; i++)
waddch(win, ' ');
mvwprintw(win, 0, 0, " %s", current_title);
// show presence
int cols = getmaxx(stdscr);
wattron(win, COLOUR_TITLE_BRACKET);
@ -210,19 +207,6 @@ _title_bar_draw_presence(void)
inp_put_back();
}
static void
_title_bar_draw_title(void)
{
wmove(win, 0, 0);
int i;
for (i = 0; i < 45; i++)
waddch(win, ' ');
mvwprintw(win, 0, 0, " %s", current_title);
wrefresh(win);
inp_put_back();
}
void
titlebar_init_module(void)
{