1
1

* editcmd.c: Recheck and fix all calls to create_dlg().

* editwidget.c: Likewise.
Этот коммит содержится в:
Pavel Roskin 2002-09-03 19:37:40 +00:00
родитель dce476e552
Коммит 31e34e93b8
3 изменённых файлов: 14 добавлений и 29 удалений

Просмотреть файл

@ -1,3 +1,8 @@
2002-09-03 Pavel Roskin <proski@gnu.org>
* editcmd.c: Recheck and fix all calls to create_dlg().
* editwidget.c: Likewise.
2002-09-02 Pavel Roskin <proski@gnu.org> 2002-09-02 Pavel Roskin <proski@gnu.org>
* editcmd.c (edit_raw_key_query): Eliminate * editcmd.c (edit_raw_key_query): Eliminate

Просмотреть файл

@ -463,19 +463,16 @@ int edit_save_as_cmd (WEdit * edit)
/* {{{ Macro stuff starts here */ /* {{{ Macro stuff starts here */
int raw_callback (struct Dlg_head *h, int key, int Msg) int
raw_callback (struct Dlg_head *h, int key, int Msg)
{ {
switch (Msg) { switch (Msg) {
case DLG_DRAW:
common_dialog_repaint (h);
break;
case DLG_KEY: case DLG_KEY:
h->running = 0; h->running = 0;
h->ret_value = key; h->ret_value = key;
return 1; return MSG_HANDLED;
} }
return 0; return default_dlg_callback (h, key, Msg);;
} }
/* gets a raw key from the keyboard. Passing cancel = 1 draws /* gets a raw key from the keyboard. Passing cancel = 1 draws
@ -488,7 +485,7 @@ edit_raw_key_query (char *heading, char *query, int cancel)
int w = strlen (query) + 7; int w = strlen (query) + 7;
struct Dlg_head *raw_dlg = struct Dlg_head *raw_dlg =
create_dlg (0, 0, 7, w, dialog_colors, raw_callback, create_dlg (0, 0, 7, w, dialog_colors, raw_callback,
"[Raw Key Query]", heading, NULL, heading,
DLG_CENTER | DLG_TRYUP | DLG_WANT_TAB); DLG_CENTER | DLG_TRYUP | DLG_WANT_TAB);
if (cancel) if (cancel)
add_widget (raw_dlg, add_widget (raw_dlg,
@ -2491,18 +2488,6 @@ static int edit_collect_completions (WEdit *edit, long start,
} }
/* completion dialog callback */
static int compl_callback (Dlg_head *h, int key, int Msg)
{
switch (Msg) {
case DLG_DRAW:
common_dialog_repaint (h);
break;
}
return 0;
}
static int compllist_callback (void *data) static int compllist_callback (void *data)
{ {
return 0; return 0;
@ -2542,8 +2527,8 @@ void edit_completion_dialog (WEdit *edit, int max_len, int word_len,
/* create the dialog */ /* create the dialog */
compl_dlg = create_dlg (start_y, start_x, compl_dlg_h, compl_dlg_w, compl_dlg = create_dlg (start_y, start_x, compl_dlg_h, compl_dlg_w,
dialog_colors, compl_callback, "[Word Completion]", "complete_word", dialog_colors, NULL, "[Completion]", NULL,
DLG_COMPACT); DLG_COMPACT);
/* create the listbox */ /* create the listbox */
compl_list = listbox_new (1, 1, compl_dlg_w - 2, compl_dlg_h - 2, 0, compl_list = listbox_new (1, 1, compl_dlg_w - 2, compl_dlg_h - 2, 0,

Просмотреть файл

@ -31,11 +31,6 @@ int column_highlighting = 0;
static int edit_callback (Dlg_head * h, WEdit * edit, int msg, int par); static int edit_callback (Dlg_head * h, WEdit * edit, int msg, int par);
static int edit_mode_callback (struct Dlg_head *h, int id, int msg)
{
return 0;
}
int edit_event (WEdit * edit, Gpm_Event * event, int *result) int edit_event (WEdit * edit, Gpm_Event * event, int *result)
{ {
*result = MOU_NORMAL; *result = MOU_NORMAL;
@ -123,8 +118,8 @@ edit (const char *_file, int line)
/* Create a new dialog and add it widgets to it */ /* Create a new dialog and add it widgets to it */
edit_dlg = edit_dlg =
create_dlg (0, 0, LINES, COLS, NULL, edit_mode_callback, create_dlg (0, 0, LINES, COLS, NULL, NULL,
"[Internal File Editor]", "edit", DLG_WANT_TAB); "[Internal File Editor]", NULL, DLG_WANT_TAB);
init_widget (&(wedit->widget), 0, 0, LINES - 1, COLS, init_widget (&(wedit->widget), 0, 0, LINES - 1, COLS,
(callback_fn) edit_callback, (destroy_fn) edit_clean, (callback_fn) edit_callback, (destroy_fn) edit_clean,