mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
* screen.c (adjust_top_file): Enable only if it's used, i.e.
when PORT_HAS_PAINT_FRAME in undefined. * wtools.c (listbox_refresh): Disable for HAVE_X, define to an empty macro instead. (listbox_callback): Call listbox_refresh() regardless of HAVE_X. (create_listbox_window): Likewise.
This commit is contained in:
parent
21d3c2b138
commit
a036aa0207
@ -1,5 +1,12 @@
|
||||
2001-05-14 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* screen.c (adjust_top_file): Enable only if it's used, i.e.
|
||||
when PORT_HAS_PAINT_FRAME in undefined.
|
||||
* wtools.c (listbox_refresh): Disable for HAVE_X, define to
|
||||
an empty macro instead.
|
||||
(listbox_callback): Call listbox_refresh() regardless of HAVE_X.
|
||||
(create_listbox_window): Likewise.
|
||||
|
||||
* fsusage.c: Include stdlib.h for abort().
|
||||
* tree.c (tree_mkdir_cmd): Disable tree_mkdir_cmd() since it's
|
||||
not used.
|
||||
|
@ -788,7 +788,7 @@ show_dir (WPanel *panel)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TK
|
||||
#ifndef PORT_HAS_PAINT_FRAME
|
||||
/* To be used only by long_frame and full_frame to adjust top_file */
|
||||
static void
|
||||
adjust_top_file (WPanel *panel)
|
||||
@ -799,14 +799,7 @@ adjust_top_file (WPanel *panel)
|
||||
panel->top_file = panel->selected;
|
||||
if (old_top - panel->count > llines (panel))
|
||||
panel->top_file = panel->count - llines (panel);
|
||||
|
||||
#ifdef HAVE_TK
|
||||
if (old_top != panel->top_file)
|
||||
x_adjust_top_file (panel);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define adjust_top_file(p)
|
||||
#endif
|
||||
|
||||
/* Repaints the information that changes after a command */
|
||||
|
@ -86,19 +86,21 @@ common_dialog_callback (struct Dlg_head *h, int id, int msg)
|
||||
/* }}} */
|
||||
/* {{{ Listbox utility functions */
|
||||
|
||||
#ifdef HAVE_X
|
||||
#define listbox_refresh(h)
|
||||
#else
|
||||
static void
|
||||
listbox_refresh (Dlg_head *h)
|
||||
{
|
||||
dialog_repaint (h, COLOR_NORMAL, COLOR_HOT_NORMAL);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int listbox_callback (Dlg_head *h, int id, int msg)
|
||||
{
|
||||
switch (msg) {
|
||||
case DLG_DRAW:
|
||||
#ifndef HAVE_X
|
||||
listbox_refresh(h);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -137,9 +139,7 @@ Listbox *create_listbox_window (int cols, int lines, char *title, char *help)
|
||||
button_new (lines+3, (cols/2 + 2) - len/2,
|
||||
B_CANCEL, NORMAL_BUTTON, cancel_string, 0, 0, "c"));
|
||||
add_widget (listbox->dlg, listbox->list);
|
||||
#ifndef HAVE_X
|
||||
listbox_refresh(listbox->dlg);
|
||||
#endif /* !HAVE_X */
|
||||
return listbox;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user