* wtools.c (create_listbox_window): Don't repaint the dialog
before it's run.
Этот коммит содержится в:
родитель
058e91c2f5
Коммит
9190dcbfa8
@ -1,5 +1,8 @@
|
||||
2003-09-03 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* wtools.c (create_listbox_window): Don't repaint the dialog
|
||||
before it's run.
|
||||
|
||||
* learn.c: Don't track button hotkeys.
|
||||
(learn_check_key): Consume all alphanumeric keys, regardless of
|
||||
button hotkeys.
|
||||
|
16
src/wtools.c
16
src/wtools.c
@ -50,7 +50,8 @@
|
||||
|
||||
/* {{{ Listbox utility functions */
|
||||
|
||||
Listbox *create_listbox_window (int cols, int lines, char *title, char *help)
|
||||
Listbox *
|
||||
create_listbox_window (int cols, int lines, char *title, char *help)
|
||||
{
|
||||
int xpos, ypos, len;
|
||||
Listbox *listbox = g_new (Listbox, 1);
|
||||
@ -67,22 +68,21 @@ Listbox *create_listbox_window (int cols, int lines, char *title, char *help)
|
||||
cols = len;
|
||||
|
||||
cols = cols > COLS - 6 ? COLS - 6 : cols;
|
||||
|
||||
/* I'm not sure if this -2 is safe, should test it */
|
||||
xpos = (COLS - cols) / 2;
|
||||
ypos = (LINES - lines) / 2 - 2;
|
||||
|
||||
/* Create components */
|
||||
listbox->dlg = create_dlg (ypos, xpos, lines+6, cols+4, dialog_colors,
|
||||
NULL, help, title, DLG_CENTER);
|
||||
listbox->dlg =
|
||||
create_dlg (ypos, xpos, lines + 6, cols + 4, dialog_colors, NULL,
|
||||
help, title, DLG_CENTER);
|
||||
|
||||
listbox->list = listbox_new (2, 2, cols, lines, 0);
|
||||
|
||||
add_widget (listbox->dlg,
|
||||
button_new (lines+3, (cols/2 + 2) - len/2,
|
||||
B_CANCEL, NORMAL_BUTTON, cancel_string, 0));
|
||||
button_new (lines + 3, (cols / 2 + 2) - len / 2, B_CANCEL,
|
||||
NORMAL_BUTTON, cancel_string, 0));
|
||||
add_widget (listbox->dlg, listbox->list);
|
||||
common_dialog_repaint (listbox->dlg);
|
||||
|
||||
return listbox;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user