From 02f5df5b20bc589e277c8772aa836ff2bb5e8651 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 12 Feb 2012 22:38:27 +0000 Subject: [PATCH] Renamed title bar functions --- title_bar.c | 4 ++-- windows.c | 6 +++--- windows.h | 32 +++++++++++++++++--------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/title_bar.c b/title_bar.c index 57235b71..27b2855e 100644 --- a/title_bar.c +++ b/title_bar.c @@ -12,10 +12,10 @@ void create_title_bar(void) title_bar = newwin(1, cols, 0, 0); wbkgd(title_bar, COLOR_PAIR(3)); - win_title_bar_show(title); + title_bar_show(title); } -void win_title_bar_show(char *title) +void title_bar_show(char *title) { wclear(title_bar); mvwprintw(title_bar, 0, 0, " %s", title); diff --git a/windows.c b/windows.c index c4840dd0..55e3ca2a 100644 --- a/windows.c +++ b/windows.c @@ -54,9 +54,9 @@ void win_switch_to(int i) _curr_win = i; if (i == 0) { - win_title_bar_show("Console, type /help for help information"); + title_bar_show("Console, type /help for help information"); } else { - win_title_bar_show(_wins[i].from); + title_bar_show(_wins[i].from); } } @@ -73,7 +73,7 @@ void win_close_win(void) touchwin(_wins[0].win); wrefresh(_wins[0].win); - win_title_bar_show("Console, type /help for help information"); + title_bar_show("Console, type /help for help information"); } int win_in_chat(void) diff --git a/windows.h b/windows.h index b73e04d0..efc55b03 100644 --- a/windows.h +++ b/windows.h @@ -17,6 +17,23 @@ void create_title_bar(void); void create_status_bar(void); void create_input_window(void); +// title bar actions +void title_bar_show(char *title); + +// main window actions +int win_is_active(int i); +void win_switch_to(int i); +void win_close_win(void); +int win_in_chat(void); +void win_get_recipient(char *recipient); +void win_show_incomming_msg(char *from, char *message); +void win_show_outgoing_msg(char *from, char *to, char *message); + +// console window actions +void cons_help(void); +void cons_bad_command(char *cmd); +void cons_show(char *cmd); + // status bar actions void status_bar_refresh(void); void status_bar_clear(void); @@ -34,19 +51,4 @@ void inp_put_back(void); void inp_non_block(void); void inp_get_password(char *passwd); -// main window actions -void win_title_bar_show(char *title); -int win_is_active(int i); -void win_switch_to(int i); -void win_close_win(void); -int win_in_chat(void); -void win_get_recipient(char *recipient); -void win_show_incomming_msg(char *from, char *message); -void win_show_outgoing_msg(char *from, char *to, char *message); - -// console window actions -void cons_help(void); -void cons_bad_command(char *cmd); -void cons_show(char *cmd); - #endif