diff --git a/src/ChangeLog b/src/ChangeLog index 0015d0de0..98a809d46 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2001-05-14 Pavel Roskin + * 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. diff --git a/src/screen.c b/src/screen.c index ba62032df..3c82c1e92 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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 */ diff --git a/src/wtools.c b/src/wtools.c index c86296760..2f7a36e1a 100644 --- a/src/wtools.c +++ b/src/wtools.c @@ -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; }