* 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.
Этот коммит содержится в:
родитель
21d3c2b138
Коммит
a036aa0207
@ -1,5 +1,12 @@
|
|||||||
2001-05-14 Pavel Roskin <proski@gnu.org>
|
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().
|
* fsusage.c: Include stdlib.h for abort().
|
||||||
* tree.c (tree_mkdir_cmd): Disable tree_mkdir_cmd() since it's
|
* tree.c (tree_mkdir_cmd): Disable tree_mkdir_cmd() since it's
|
||||||
not used.
|
not used.
|
||||||
|
@ -788,7 +788,7 @@ show_dir (WPanel *panel)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_TK
|
#ifndef PORT_HAS_PAINT_FRAME
|
||||||
/* To be used only by long_frame and full_frame to adjust top_file */
|
/* To be used only by long_frame and full_frame to adjust top_file */
|
||||||
static void
|
static void
|
||||||
adjust_top_file (WPanel *panel)
|
adjust_top_file (WPanel *panel)
|
||||||
@ -799,14 +799,7 @@ adjust_top_file (WPanel *panel)
|
|||||||
panel->top_file = panel->selected;
|
panel->top_file = panel->selected;
|
||||||
if (old_top - panel->count > llines (panel))
|
if (old_top - panel->count > llines (panel))
|
||||||
panel->top_file = 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
|
#endif
|
||||||
|
|
||||||
/* Repaints the information that changes after a command */
|
/* 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 */
|
/* {{{ Listbox utility functions */
|
||||||
|
|
||||||
|
#ifdef HAVE_X
|
||||||
|
#define listbox_refresh(h)
|
||||||
|
#else
|
||||||
static void
|
static void
|
||||||
listbox_refresh (Dlg_head *h)
|
listbox_refresh (Dlg_head *h)
|
||||||
{
|
{
|
||||||
dialog_repaint (h, COLOR_NORMAL, COLOR_HOT_NORMAL);
|
dialog_repaint (h, COLOR_NORMAL, COLOR_HOT_NORMAL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int listbox_callback (Dlg_head *h, int id, int msg)
|
static int listbox_callback (Dlg_head *h, int id, int msg)
|
||||||
{
|
{
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case DLG_DRAW:
|
case DLG_DRAW:
|
||||||
#ifndef HAVE_X
|
|
||||||
listbox_refresh(h);
|
listbox_refresh(h);
|
||||||
#endif
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
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,
|
button_new (lines+3, (cols/2 + 2) - len/2,
|
||||||
B_CANCEL, NORMAL_BUTTON, cancel_string, 0, 0, "c"));
|
B_CANCEL, NORMAL_BUTTON, cancel_string, 0, 0, "c"));
|
||||||
add_widget (listbox->dlg, listbox->list);
|
add_widget (listbox->dlg, listbox->list);
|
||||||
#ifndef HAVE_X
|
|
||||||
listbox_refresh(listbox->dlg);
|
listbox_refresh(listbox->dlg);
|
||||||
#endif /* !HAVE_X */
|
|
||||||
return listbox;
|
return listbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user