1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Renamed title bar status -> presence

This commit is contained in:
James Booth 2014-01-16 18:22:50 +00:00
parent 9f6d6d44cc
commit 16bf753ad0
2 changed files with 11 additions and 11 deletions

View File

@ -33,10 +33,10 @@ static char *recipient = NULL;
static GTimer *typing_elapsed; static GTimer *typing_elapsed;
static contact_presence_t current_status; static contact_presence_t current_presence;
static void _title_bar_draw_title(void); static void _title_bar_draw_title(void);
static void _title_bar_draw_status(void); static void _title_bar_draw_presence(void);
static void static void
_create_title_bar(void) _create_title_bar(void)
@ -58,7 +58,7 @@ _title_bar_console(void)
recipient = NULL; recipient = NULL;
typing_elapsed = NULL; typing_elapsed = NULL;
title_bar_show("Profanity. Type /help for help information."); title_bar_show("Profanity. Type /help for help information.");
_title_bar_draw_status(); _title_bar_draw_presence();
wrefresh(win); wrefresh(win);
inp_put_back(); inp_put_back();
} }
@ -72,7 +72,7 @@ _title_bar_resize(void)
wbkgd(win, COLOUR_TITLE_TEXT); wbkgd(win, COLOUR_TITLE_TEXT);
werase(win); werase(win);
_title_bar_draw_title(); _title_bar_draw_title();
_title_bar_draw_status(); _title_bar_draw_presence();
wrefresh(win); wrefresh(win);
inp_put_back(); inp_put_back();
} }
@ -118,10 +118,10 @@ _title_bar_show(const char * const title)
} }
static void static void
_title_bar_set_presence(contact_presence_t status) _title_bar_set_presence(contact_presence_t presence)
{ {
current_status = status; current_presence = presence;
_title_bar_draw_status(); _title_bar_draw_presence();
} }
static void static void
@ -176,12 +176,12 @@ static void
_title_bar_draw(void) _title_bar_draw(void)
{ {
werase(win); werase(win);
_title_bar_draw_status(); _title_bar_draw_presence();
_title_bar_draw_title(); _title_bar_draw_title();
} }
static void static void
_title_bar_draw_status(void) _title_bar_draw_presence(void)
{ {
int cols = getmaxx(stdscr); int cols = getmaxx(stdscr);
@ -189,7 +189,7 @@ _title_bar_draw_status(void)
mvwaddch(win, 0, cols - 14, '['); mvwaddch(win, 0, cols - 14, '[');
wattroff(win, COLOUR_TITLE_BRACKET); wattroff(win, COLOUR_TITLE_BRACKET);
switch (current_status) switch (current_presence)
{ {
case CONTACT_ONLINE: case CONTACT_ONLINE:
mvwprintw(win, 0, cols - 13, " ...online "); mvwprintw(win, 0, cols - 13, " ...online ");

View File

@ -156,7 +156,7 @@ void (*title_bar_refresh)(void);
void (*title_bar_resize)(void); void (*title_bar_resize)(void);
void (*title_bar_show)(const char * const title); void (*title_bar_show)(const char * const title);
void (*title_bar_console)(void); void (*title_bar_console)(void);
void (*title_bar_set_presence)(contact_presence_t status); void (*title_bar_set_presence)(contact_presence_t presence);
void (*title_bar_set_recipient)(const char * const from); void (*title_bar_set_recipient)(const char * const from);
void (*title_bar_set_typing)(gboolean is_typing); void (*title_bar_set_typing)(gboolean is_typing);
void (*title_bar_draw)(void); void (*title_bar_draw)(void);