diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/titlebar.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 6c40f45a..d72ec796 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -35,7 +35,6 @@ static GTimer *typing_elapsed; static contact_presence_t current_presence; -static void _title_bar_show(const char * const title); static void _title_bar_draw_title(void); static void _title_bar_draw_presence(void); @@ -58,7 +57,12 @@ _title_bar_console(void) werase(win); recipient = NULL; typing_elapsed = NULL; - _title_bar_show("Profanity. Type /help for help information."); + + if (current_title != NULL) + free(current_title); + current_title = strdup("Profanity. Type /help for help information."); + + _title_bar_draw_title(); _title_bar_draw_presence(); wrefresh(win); inp_put_back(); @@ -108,17 +112,6 @@ _title_bar_refresh(void) } static void -_title_bar_show(const char * const title) -{ - if (current_title != NULL) - free(current_title); - - current_title = (char *) malloc(strlen(title) + 1); - strcpy(current_title, title); - _title_bar_draw_title(); -} - -static void _title_bar_set_presence(contact_presence_t presence) { current_presence = presence; |