mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 21:56:20 +00:00
Tidy up titlebar title
This commit is contained in:
@@ -5,13 +5,17 @@ static WINDOW *title_bar;
|
|||||||
|
|
||||||
void create_title_bar(void)
|
void create_title_bar(void)
|
||||||
{
|
{
|
||||||
char *title = "Profanity. Type /help for help information.";
|
|
||||||
|
|
||||||
int rows, cols;
|
int rows, cols;
|
||||||
getmaxyx(stdscr, rows, cols);
|
getmaxyx(stdscr, rows, cols);
|
||||||
|
|
||||||
title_bar = newwin(1, cols, 0, 0);
|
title_bar = newwin(1, cols, 0, 0);
|
||||||
wbkgd(title_bar, COLOR_PAIR(3));
|
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);
|
title_bar_show(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ void win_switch_to(int i)
|
|||||||
_curr_win = i;
|
_curr_win = i;
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
title_bar_show("Profanity. Type /help for help information.");
|
title_bar_title();
|
||||||
} else {
|
} else {
|
||||||
title_bar_show(_wins[i].from);
|
title_bar_show(_wins[i].from);
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ void win_close_win(void)
|
|||||||
|
|
||||||
// go back to console window
|
// go back to console window
|
||||||
_curr_win = 0;
|
_curr_win = 0;
|
||||||
title_bar_show("Profanity. Type /help for help information.");
|
title_bar_title();
|
||||||
}
|
}
|
||||||
|
|
||||||
int win_in_chat(void)
|
int win_in_chat(void)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ void create_input_window(void);
|
|||||||
// title bar actions
|
// title bar actions
|
||||||
void title_bar_refresh(void);
|
void title_bar_refresh(void);
|
||||||
void title_bar_show(char *title);
|
void title_bar_show(char *title);
|
||||||
|
void title_bar_title(void);
|
||||||
void title_bar_connected(void);
|
void title_bar_connected(void);
|
||||||
void title_bar_disconnected(void);
|
void title_bar_disconnected(void);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user