mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(dlg_close): rename from dlg_stop().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
8455ff8dfd
commit
e6cb6591b3
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user