1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Resize current pad

This commit is contained in:
James Booth 2012-04-22 22:35:54 +01:00
parent 6f69ce267b
commit 9dad7a7ffd

View File

@ -57,6 +57,7 @@ static void _cons_show_incoming_message(const char * const short_from,
const int win_index);
static void _win_handle_switch(const int * const ch);
static void _win_handle_page(const int * const ch);
static void _win_resize_all(void);
void gui_init(void)
{
@ -110,7 +111,7 @@ void gui_resize(const int ch, const char * const input, const int size)
{
title_bar_resize();
status_bar_resize();
_current_window_refresh();
_win_resize_all();
inp_win_resize(input, size);
dirty = TRUE;
}
@ -474,7 +475,7 @@ static void _win_show_message(WINDOW *win, const char * const message)
wattron(win, A_BOLD);
}
static void _current_window_refresh()
static void _current_window_refresh(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
@ -483,6 +484,16 @@ static void _current_window_refresh()
prefresh(current, _wins[_curr_prof_win].y_pos, 0, 1, 0, rows-3, cols-1);
}
void _win_resize_all(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
WINDOW *current = _wins[_curr_prof_win].win;
wresize(current, PAD_SIZE, cols);
prefresh(current, _wins[_curr_prof_win].y_pos, 0, 1, 0, rows-3, cols-1);
}
static void _show_status_string(WINDOW *win, const char * const from,
const char * const show, const char * const status, const char * const pre,
const char * const default_show)