diff --git a/edit/ChangeLog b/edit/ChangeLog index 3213f5afb..9b7e02593 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,3 +1,8 @@ +2002-09-03 Pavel Roskin + + * editcmd.c: Recheck and fix all calls to create_dlg(). + * editwidget.c: Likewise. + 2002-09-02 Pavel Roskin * editcmd.c (edit_raw_key_query): Eliminate diff --git a/edit/editcmd.c b/edit/editcmd.c index 52668b003..f3c10dc4d 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -463,19 +463,16 @@ int edit_save_as_cmd (WEdit * edit) /* {{{ 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) { - case DLG_DRAW: - common_dialog_repaint (h); - break; - case DLG_KEY: h->running = 0; 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 @@ -488,7 +485,7 @@ edit_raw_key_query (char *heading, char *query, int cancel) int w = strlen (query) + 7; struct Dlg_head *raw_dlg = create_dlg (0, 0, 7, w, dialog_colors, raw_callback, - "[Raw Key Query]", heading, + NULL, heading, DLG_CENTER | DLG_TRYUP | DLG_WANT_TAB); if (cancel) 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) { return 0; @@ -2542,8 +2527,8 @@ void edit_completion_dialog (WEdit *edit, int max_len, int word_len, /* create the dialog */ compl_dlg = create_dlg (start_y, start_x, compl_dlg_h, compl_dlg_w, - dialog_colors, compl_callback, "[Word Completion]", "complete_word", - DLG_COMPACT); + dialog_colors, NULL, "[Completion]", NULL, + DLG_COMPACT); /* create the listbox */ compl_list = listbox_new (1, 1, compl_dlg_w - 2, compl_dlg_h - 2, 0, diff --git a/edit/editwidget.c b/edit/editwidget.c index 40a508276..7d86d275d 100644 --- a/edit/editwidget.c +++ b/edit/editwidget.c @@ -31,11 +31,6 @@ int column_highlighting = 0; 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) { *result = MOU_NORMAL; @@ -123,8 +118,8 @@ edit (const char *_file, int line) /* Create a new dialog and add it widgets to it */ edit_dlg = - create_dlg (0, 0, LINES, COLS, NULL, edit_mode_callback, - "[Internal File Editor]", "edit", DLG_WANT_TAB); + create_dlg (0, 0, LINES, COLS, NULL, NULL, + "[Internal File Editor]", NULL, DLG_WANT_TAB); init_widget (&(wedit->widget), 0, 0, LINES - 1, COLS, (callback_fn) edit_callback, (destroy_fn) edit_clean,