Add /inputwin top|bottom command

closes #853
This commit is contained in:
James Booth
2016-09-19 23:40:45 +01:00
parent c4d3f19d94
commit 0aa758cbfb
22 changed files with 162 additions and 18 deletions

View File

@@ -67,7 +67,13 @@ create_title_bar(void)
{
int cols = getmaxx(stdscr);
win = newwin(1, cols, 0, 0);
char *pos = prefs_get_string(PREF_INPUTWIN);
if (g_strcmp0(pos, "top") == 0) {
win = newwin(1, cols, 1, 0);
} else {
win = newwin(1, cols, 0, 0);
}
prefs_free_string(pos);
wbkgd(win, theme_attrs(THEME_TITLE_TEXT));
title_bar_console();
title_bar_set_presence(CONTACT_OFFLINE);
@@ -101,6 +107,16 @@ title_bar_resize(void)
{
int cols = getmaxx(stdscr);
werase(win);
char *pos = prefs_get_string(PREF_INPUTWIN);
if (g_strcmp0(pos, "top") == 0) {
mvwin(win, 1, 0);
} else {
mvwin(win, 0, 0);
}
prefs_free_string(pos);
wresize(win, 1, cols);
wbkgd(win, theme_attrs(THEME_TITLE_TEXT));