about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-02-19 00:23:45 +0000
committerJames Booth <boothj5@gmail.com>2012-02-19 00:23:45 +0000
commit355f2a68fd7431a9ec5667c1aa6a04d566a21a1c (patch)
treee9b55287c09f0d5c367d7d8c7091a5dba8be0a44
parent9f6356a8f75c8796dd3ec0d66ee5b01e45cccce6 (diff)
downloadprofani-tty-355f2a68fd7431a9ec5667c1aa6a04d566a21a1c.tar.gz
Tidy up titlebar title
-rw-r--r--title_bar.c8
-rw-r--r--windows.c4
-rw-r--r--windows.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/title_bar.c b/title_bar.c
index e26e2cd8..aaa053f1 100644
--- a/title_bar.c
+++ b/title_bar.c
@@ -5,13 +5,17 @@ static WINDOW *title_bar;
 
 void create_title_bar(void)
 {
-    char *title = "Profanity. Type /help for help information.";
-
     int rows, cols;
     getmaxyx(stdscr, rows, cols);
 
     title_bar = newwin(1, cols, 0, 0);
     wbkgd(title_bar, COLOR_PAIR(3));
+    title_bar_title();
+}
+
+void title_bar_title()
+{
+    char *title = "Profanity. Type /help for help information.";
     title_bar_show(title);
 }
 
diff --git a/windows.c b/windows.c
index 46544f80..61ffd1db 100644
--- a/windows.c
+++ b/windows.c
@@ -60,7 +60,7 @@ void win_switch_to(int i)
     _curr_win = i;
 
     if (i == 0) {
-        title_bar_show("Profanity. Type /help for help information.");
+        title_bar_title();
     } else {
         title_bar_show(_wins[i].from);
     }
@@ -77,7 +77,7 @@ void win_close_win(void)
     
     // go back to console window
     _curr_win = 0;
-    title_bar_show("Profanity. Type /help for help information.");
+    title_bar_title();
 }
 
 int win_in_chat(void)
diff --git a/windows.h b/windows.h
index ee40c94e..46e26ec8 100644
--- a/windows.h
+++ b/windows.h
@@ -21,6 +21,7 @@ void create_input_window(void);
 // title bar actions
 void title_bar_refresh(void);
 void title_bar_show(char *title);
+void title_bar_title(void);
 void title_bar_connected(void);
 void title_bar_disconnected(void);