about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-01-16 18:43:06 +0000
committerJames Booth <boothj5@gmail.com>2014-01-16 18:43:06 +0000
commitfa8801798c637ef8d03324b13740c4d8984a0fab (patch)
tree307489e02565292b9d946dc1bdae7883daae1d28 /src/ui
parentc32caa62e012dd449a65688b2e7c1bf786fe4b75 (diff)
downloadprofani-tty-fa8801798c637ef8d03324b13740c4d8984a0fab.tar.gz
Removed _title_bar_show
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/titlebar.c19
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;