mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Rename sub win sub_y_pos -> display_start
This commit is contained in:
parent
0aef5e8b73
commit
b65785d6b1
@ -120,7 +120,7 @@ typedef struct prof_layout_simple_t {
|
|||||||
typedef struct prof_layout_split_t {
|
typedef struct prof_layout_split_t {
|
||||||
ProfLayout base;
|
ProfLayout base;
|
||||||
WINDOW *subwin;
|
WINDOW *subwin;
|
||||||
int sub_y_pos;
|
int display_start;
|
||||||
unsigned long memcheck;
|
unsigned long memcheck;
|
||||||
} ProfLayoutSplit;
|
} ProfLayoutSplit;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ _win_create_split_layout(void)
|
|||||||
layout->base.scroll = TRUE;
|
layout->base.scroll = TRUE;
|
||||||
scrollok(layout->base.win, TRUE);
|
scrollok(layout->base.win, TRUE);
|
||||||
layout->subwin = NULL;
|
layout->subwin = NULL;
|
||||||
layout->sub_y_pos = 0;
|
layout->display_start = 0;
|
||||||
layout->memcheck = LAYOUT_SPLIT_MEMCHECK;
|
layout->memcheck = LAYOUT_SPLIT_MEMCHECK;
|
||||||
|
|
||||||
return &layout->base;
|
return &layout->base;
|
||||||
@ -172,7 +172,7 @@ win_create_muc(const char *const roomjid)
|
|||||||
wbkgd(layout->base.win, theme_attrs(THEME_TEXT));
|
wbkgd(layout->base.win, theme_attrs(THEME_TEXT));
|
||||||
layout->subwin = NULL;
|
layout->subwin = NULL;
|
||||||
}
|
}
|
||||||
layout->sub_y_pos = 0;
|
layout->display_start = 0;
|
||||||
layout->memcheck = LAYOUT_SPLIT_MEMCHECK;
|
layout->memcheck = LAYOUT_SPLIT_MEMCHECK;
|
||||||
layout->base.buffer = buffer_create();
|
layout->base.buffer = buffer_create();
|
||||||
layout->base.display_start = 0;
|
layout->base.display_start = 0;
|
||||||
@ -372,7 +372,7 @@ win_hide_subwin(ProfWin *window)
|
|||||||
delwin(layout->subwin);
|
delwin(layout->subwin);
|
||||||
}
|
}
|
||||||
layout->subwin = NULL;
|
layout->subwin = NULL;
|
||||||
layout->sub_y_pos = 0;
|
layout->display_start = 0;
|
||||||
int cols = getmaxx(stdscr);
|
int cols = getmaxx(stdscr);
|
||||||
wresize(layout->base.win, PAD_SIZE, cols);
|
wresize(layout->base.win, PAD_SIZE, cols);
|
||||||
win_redraw(window);
|
win_redraw(window);
|
||||||
@ -585,7 +585,7 @@ win_sub_page_down(ProfWin *window)
|
|||||||
int page_space = rows - 4;
|
int page_space = rows - 4;
|
||||||
ProfLayoutSplit *split_layout = (ProfLayoutSplit*)window->layout;
|
ProfLayoutSplit *split_layout = (ProfLayoutSplit*)window->layout;
|
||||||
int sub_y = getcury(split_layout->subwin);
|
int sub_y = getcury(split_layout->subwin);
|
||||||
int *sub_y_pos = &(split_layout->sub_y_pos);
|
int *sub_y_pos = &(split_layout->display_start);
|
||||||
|
|
||||||
*sub_y_pos += page_space;
|
*sub_y_pos += page_space;
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ win_sub_page_up(ProfWin *window)
|
|||||||
int rows = getmaxy(stdscr);
|
int rows = getmaxy(stdscr);
|
||||||
int page_space = rows - 4;
|
int page_space = rows - 4;
|
||||||
ProfLayoutSplit *split_layout = (ProfLayoutSplit*)window->layout;
|
ProfLayoutSplit *split_layout = (ProfLayoutSplit*)window->layout;
|
||||||
int *sub_y_pos = &(split_layout->sub_y_pos);
|
int *sub_y_pos = &(split_layout->display_start);
|
||||||
|
|
||||||
*sub_y_pos -= page_space;
|
*sub_y_pos -= page_space;
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ win_update_virtual(ProfWin *window)
|
|||||||
subwin_cols = win_roster_cols();
|
subwin_cols = win_roster_cols();
|
||||||
}
|
}
|
||||||
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
||||||
pnoutrefresh(layout->subwin, layout->sub_y_pos, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
pnoutrefresh(layout->subwin, layout->display_start, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
||||||
} else {
|
} else {
|
||||||
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, cols-1);
|
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, cols-1);
|
||||||
}
|
}
|
||||||
@ -716,12 +716,12 @@ win_refresh_with_subwin(ProfWin *window)
|
|||||||
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
|
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
|
||||||
subwin_cols = win_occpuants_cols();
|
subwin_cols = win_occpuants_cols();
|
||||||
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
||||||
pnoutrefresh(layout->subwin, layout->sub_y_pos, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
pnoutrefresh(layout->subwin, layout->display_start, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
||||||
} else if (window->type == WIN_CONSOLE) {
|
} else if (window->type == WIN_CONSOLE) {
|
||||||
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
|
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
|
||||||
subwin_cols = win_roster_cols();
|
subwin_cols = win_roster_cols();
|
||||||
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
pnoutrefresh(layout->base.win, layout->base.display_start, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
|
||||||
pnoutrefresh(layout->subwin, layout->sub_y_pos, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
pnoutrefresh(layout->subwin, layout->display_start, 0, row_start, (cols-subwin_cols), row_end, cols-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user