From e6cb6591b3dbc542fe3bdab99120e4bd16bc74a2 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 15 Apr 2023 10:17:41 +0300 Subject: [PATCH] (dlg_close): rename from dlg_stop(). Signed-off-by: Andrew Borodin --- lib/widget/button.c | 2 +- lib/widget/dialog.c | 8 ++++---- lib/widget/dialog.h | 2 +- lib/widget/history.c | 2 +- lib/widget/input_complete.c | 10 +++++----- lib/widget/listbox.c | 2 +- src/diffviewer/ydiff.c | 6 +++--- src/editor/editcmd.c | 2 +- src/editor/editwidget.c | 6 +++--- src/filemanager/achown.c | 2 +- src/filemanager/filemanager.c | 4 ++-- src/filemanager/hotlist.c | 8 ++++---- src/filemanager/tree.c | 4 ++-- src/help.c | 2 +- src/learn.c | 2 +- src/viewer/actions_cmd.c | 4 ++-- src/viewer/mcviewer.c | 2 +- 17 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/widget/button.c b/lib/widget/button.c index d6a36a8b0..9f0bfa520 100644 --- a/lib/widget/button.c +++ b/lib/widget/button.c @@ -100,7 +100,7 @@ button_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm h->ret_value = b->action; if (b->callback == NULL || b->callback (b, b->action) != 0) - dlg_stop (h); + dlg_close (h); return MSG_HANDLED; diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c index d756fa87b..c2d1f7f51 100644 --- a/lib/widget/dialog.c +++ b/lib/widget/dialog.c @@ -143,11 +143,11 @@ dlg_execute_cmd (WDialog * h, long command) { case CK_Ok: h->ret_value = B_ENTER; - dlg_stop (h); + dlg_close (h); break; case CK_Cancel: h->ret_value = B_CANCEL; - dlg_stop (h); + dlg_close (h); break; case CK_Up: @@ -383,7 +383,7 @@ dlg_default_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event) if (event->y < 0 || event->y >= w->rect.lines || event->x < 0 || event->x >= w->rect.cols) { DIALOG (w)->ret_value = B_CANCEL; - dlg_stop (DIALOG (w)); + dlg_close (DIALOG (w)); } break; @@ -505,7 +505,7 @@ do_refresh (void) /* --------------------------------------------------------------------------------------------- */ void -dlg_stop (WDialog * h) +dlg_close (WDialog * h) { widget_set_state (WIDGET (h), WST_CLOSED, TRUE); } diff --git a/lib/widget/dialog.h b/lib/widget/dialog.h index 8367905db..0cba91d17 100644 --- a/lib/widget/dialog.h +++ b/lib/widget/dialog.h @@ -123,7 +123,7 @@ char *dlg_get_title (const WDialog * h, size_t len); cb_ret_t dlg_default_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data); void dlg_default_mouse_callback (Widget * w, mouse_msg_t msg, mouse_event_t * event); -void dlg_stop (WDialog * h); +void dlg_close (WDialog * h); /* Redraw all dialogs */ void do_refresh (void); diff --git a/lib/widget/history.c b/lib/widget/history.c index 7013017d0..41d191bcb 100644 --- a/lib/widget/history.c +++ b/lib/widget/history.c @@ -142,7 +142,7 @@ history_dlg_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, v return MSG_NOT_HANDLED; } - dlg_stop (d); + dlg_close (d); return MSG_HANDLED; } diff --git a/lib/widget/input_complete.c b/lib/widget/input_complete.c index 734837277..9468f0351 100644 --- a/lib/widget/input_complete.c +++ b/lib/widget/input_complete.c @@ -1044,7 +1044,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void case KEY_RIGHT: bl = 0; h->ret_value = 0; - dlg_stop (h); + dlg_close (h); return MSG_HANDLED; case KEY_BACKSPACE: @@ -1053,7 +1053,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void if (end == 0) { h->ret_value = 0; - dlg_stop (h); + dlg_close (h); } /* Refill the list box and start again */ else if (end == min_end) @@ -1061,7 +1061,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void end = str_get_prev_char (input->buffer->str + end) - input->buffer->str; input_handle_char (input, parm); h->ret_value = B_USER; - dlg_stop (h); + dlg_close (h); } else { @@ -1100,7 +1100,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void /* This means we want to refill the list box and start again */ h->ret_value = B_USER; - dlg_stop (h); + dlg_close (h); } else { @@ -1192,7 +1192,7 @@ complete_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void else if (need_redraw == 1) { h->ret_value = B_ENTER; - dlg_stop (h); + dlg_close (h); } bl = 0; } diff --git a/lib/widget/listbox.c b/lib/widget/listbox.c index c1b01497b..f18769302 100644 --- a/lib/widget/listbox.c +++ b/lib/widget/listbox.c @@ -426,7 +426,7 @@ listbox_do_action (WListbox * l) WDialog *h = DIALOG (WIDGET (l)->owner); h->ret_value = B_ENTER; - dlg_stop (h); + dlg_close (h); } } diff --git a/src/diffviewer/ydiff.c b/src/diffviewer/ydiff.c index 6cf36cab0..ea33841d4 100644 --- a/src/diffviewer/ydiff.c +++ b/src/diffviewer/ydiff.c @@ -3321,7 +3321,7 @@ dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d case MSG_KEY: i = dview_handle_key (dview, parm); if (dview->view_quit) - dlg_stop (h); + dlg_close (h); else dview_update (dview); return i; @@ -3329,7 +3329,7 @@ dview_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *d case MSG_ACTION: i = dview_execute_cmd (dview, parm); if (dview->view_quit) - dlg_stop (h); + dlg_close (h); else dview_update (dview); return i; @@ -3398,7 +3398,7 @@ dview_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, /* don't stop the dialog before final decision */ widget_set_state (w, WST_ACTIVE, TRUE); if (dview_ok_to_exit (dview)) - dlg_stop (h); + dlg_close (h); return MSG_HANDLED; default: diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 655d53397..be940b611 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -750,7 +750,7 @@ editcmd_dialog_raw_key_query_cb (Widget * w, Widget * sender, widget_msg_t msg, { case MSG_KEY: h->ret_value = parm; - dlg_stop (h); + dlg_close (h); return MSG_HANDLED; default: return dlg_default_callback (w, sender, msg, parm, data); diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 2149a70be..05f03e83f 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -423,7 +423,7 @@ edit_dialog_command_execute (WDialog * h, long command) /* if there are no opened files anymore, close MC editor */ if (edit_widget_is_editor (CONST_WIDGET (g->current->data)) && edit_close_cmd (EDIT (g->current->data)) && edit_find_editor (h) == NULL) - dlg_stop (h); + dlg_close (h); break; case CK_Help: edit_help (); @@ -441,7 +441,7 @@ edit_dialog_command_execute (WDialog * h, long command) if (edit_widget_is_editor (w) && EDIT (w)->drag_state != MCEDIT_DRAG_NONE) edit_restore_size (EDIT (w)); else if (command == CK_Quit) - dlg_stop (h); + dlg_close (h); } break; case CK_About: @@ -662,7 +662,7 @@ edit_quit (WDialog * h) /* if all files were checked, quit editor */ if (me == NULL) - dlg_stop (h); + dlg_close (h); g_slist_free (m); } diff --git a/src/filemanager/achown.c b/src/filemanager/achown.c index d45d66352..d39b35f8f 100644 --- a/src/filemanager/achown.c +++ b/src/filemanager/achown.c @@ -492,7 +492,7 @@ chl_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *dat WDialog *h = DIALOG (w); h->ret_value = parm; - dlg_stop (h); + dlg_close (h); } break; default: diff --git a/src/filemanager/filemanager.c b/src/filemanager/filemanager.c index 1dd35e483..951bd8690 100644 --- a/src/filemanager/filemanager.c +++ b/src/filemanager/filemanager.c @@ -139,10 +139,10 @@ static menu_t *left_menu, *right_menu; static void stop_dialogs (void) { - dlg_stop (filemanager); + dlg_close (filemanager); if (top_dlg != NULL) - dlg_stop (DIALOG (top_dlg->data)); + dlg_close (DIALOG (top_dlg->data)); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/filemanager/hotlist.c b/src/filemanager/hotlist.c index 3e24f4c1a..e458a878d 100644 --- a/src/filemanager/hotlist.c +++ b/src/filemanager/hotlist.c @@ -507,7 +507,7 @@ hotlist_handle_key (WDialog * h, int key) if (hotlist_button_callback (NULL, B_ENTER) != 0) { h->ret_value = B_ENTER; - dlg_stop (h); + dlg_close (h); } return MSG_HANDLED; @@ -550,7 +550,7 @@ hotlist_handle_key (WDialog * h, int key) input_insert (cmdline, tmp, FALSE); g_free (tmp); h->ret_value = B_CANCEL; - dlg_stop (h); + dlg_close (h); } } } @@ -644,7 +644,7 @@ hotlist_listbox_callback (WListbox * list) if (hlp->type == HL_TYPE_ENTRY) { dlg->ret_value = B_ENTER; - dlg_stop (dlg); + dlg_close (dlg); return LISTBOX_DONE; } else @@ -657,7 +657,7 @@ hotlist_listbox_callback (WListbox * list) else { dlg->ret_value = B_ENTER; - dlg_stop (dlg); + dlg_close (dlg); return LISTBOX_DONE; } } diff --git a/src/filemanager/tree.c b/src/filemanager/tree.c index 96909c5bf..1a0196ea9 100644 --- a/src/filemanager/tree.c +++ b/src/filemanager/tree.c @@ -605,7 +605,7 @@ tree_chdir_sel (WTree * tree) WDialog *h = DIALOG (WIDGET (tree)->owner); h->ret_value = B_ENTER; - dlg_stop (h); + dlg_close (h); } } @@ -1048,7 +1048,7 @@ tree_execute_cmd (WTree * tree, long command) break; case CK_Quit: if (!tree->is_panel) - dlg_stop (DIALOG (WIDGET (tree)->owner)); + dlg_close (DIALOG (WIDGET (tree)->owner)); return res; default: res = MSG_NOT_HANDLED; diff --git a/src/help.c b/src/help.c index 732aee8de..a14744a0c 100644 --- a/src/help.c +++ b/src/help.c @@ -835,7 +835,7 @@ help_execute_cmd (long command) help_prev_node (); break; case CK_Quit: - dlg_stop (whelp); + dlg_close (whelp); break; default: ret = MSG_NOT_HANDLED; diff --git a/src/learn.c b/src/learn.c index 5fed64314..c704ce113 100644 --- a/src/learn.c +++ b/src/learn.c @@ -202,7 +202,7 @@ learn_check_key (int c) ("Great! You have a complete terminal database!\n" "All your keys work well.")); } - dlg_stop (learn_dlg); + dlg_close (learn_dlg); } return TRUE; } diff --git a/src/viewer/actions_cmd.c b/src/viewer/actions_cmd.c index 750987a04..c729c1a0c 100644 --- a/src/viewer/actions_cmd.c +++ b/src/viewer/actions_cmd.c @@ -561,7 +561,7 @@ mcview_execute_cmd (WView * view, long command) break; case CK_Quit: if (!mcview_is_in_panel (view)) - dlg_stop (DIALOG (WIDGET (view)->owner)); + dlg_close (DIALOG (WIDGET (view)->owner)); break; case CK_Cancel: /* don't close viewer due to SIGINT */ @@ -778,7 +778,7 @@ mcview_dialog_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, /* don't stop the dialog before final decision */ widget_set_state (w, WST_ACTIVE, TRUE); if (mcview_ok_to_quit (view)) - dlg_stop (h); + dlg_close (h); else mcview_update (view); return MSG_HANDLED; diff --git a/src/viewer/mcviewer.c b/src/viewer/mcviewer.c index 2430c0fe8..36d31c0d5 100644 --- a/src/viewer/mcviewer.c +++ b/src/viewer/mcviewer.c @@ -267,7 +267,7 @@ mcview_viewer (const char *command, const vfs_path_t * file_vpath, int start_lin if (succeeded) dlg_run (view_dlg); else - dlg_stop (view_dlg); + dlg_close (view_dlg); if (widget_get_state (vw, WST_CLOSED)) widget_destroy (vw);