mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
* view.c: Move call to view_update_bytes_per_line() from
view_init(), where the number of columns is unknown yet, to view_callback() where it's already known. (view_adjust_size): Make static.
This commit is contained in:
parent
a67eb057ec
commit
a7dd92996c
@ -1,3 +1,10 @@
|
||||
2002-10-07 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* view.c: Move call to view_update_bytes_per_line() from
|
||||
view_init(), where the number of columns is unknown yet, to
|
||||
view_callback() where it's already known.
|
||||
(view_adjust_size): Make static.
|
||||
|
||||
2002-10-07 Miven Dooligan <dooligan@intergate.ca>
|
||||
|
||||
* view.c (view_update_bytes_per_line): Don't use vertical bars
|
||||
|
17
src/view.c
17
src/view.c
@ -662,8 +662,6 @@ view_update_bytes_per_line (WView *view)
|
||||
int
|
||||
view_init (WView *view, char *_command, const char *_file, int start_line)
|
||||
{
|
||||
view_update_bytes_per_line(view);
|
||||
|
||||
if (!view->view_active || strcmp (_file, view->filename) || altered_magic_flag)
|
||||
return do_view_init (view, _command, _file, start_line);
|
||||
else
|
||||
@ -2392,7 +2390,7 @@ real_view_event (Gpm_Event *event, void *x)
|
||||
/* }}} */
|
||||
/* {{{ Window creation, destruction and a driver stub for real view */
|
||||
|
||||
void
|
||||
static void
|
||||
view_adjust_size (Dlg_head *h)
|
||||
{
|
||||
WView *view;
|
||||
@ -2490,15 +2488,16 @@ static int
|
||||
view_callback (Dlg_head *h, WView *view, int msg, int par)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (msg){
|
||||
|
||||
switch (msg) {
|
||||
case WIDGET_INIT:
|
||||
view_update_bytes_per_line (view);
|
||||
if (view->have_frame)
|
||||
add_hook (&select_file_hook, view_hook, view);
|
||||
else
|
||||
view_labels (view);
|
||||
break;
|
||||
|
||||
|
||||
case WIDGET_DRAW:
|
||||
display (view);
|
||||
view_status (view, TRUE);
|
||||
@ -2510,7 +2509,7 @@ view_callback (Dlg_head *h, WView *view, int msg, int par)
|
||||
break;
|
||||
|
||||
case WIDGET_KEY:
|
||||
i = view_handle_key ((WView *)view, par);
|
||||
i = view_handle_key ((WView *) view, par);
|
||||
if (view->view_quit)
|
||||
dlg_stop (h);
|
||||
else {
|
||||
@ -2526,11 +2525,11 @@ view_callback (Dlg_head *h, WView *view, int msg, int par)
|
||||
view_status (view, TRUE);
|
||||
sleep (1);
|
||||
return 1;
|
||||
|
||||
|
||||
case WIDGET_FOCUS:
|
||||
view_labels (view);
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
return default_proc (h, msg, par);
|
||||
}
|
||||
|
@ -115,8 +115,6 @@ extern int altered_magic_flag;
|
||||
extern int altered_nroff_flag;
|
||||
extern Dlg_head *view_dlg;
|
||||
|
||||
void view_adjust_size (Dlg_head *);
|
||||
|
||||
/* A node for building a change list on change_list */
|
||||
struct hexedit_change_node {
|
||||
struct hexedit_change_node *next;
|
||||
|
Loading…
Reference in New Issue
Block a user