1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Reflow the control flow in push_hierbox_delete_button

This commit is contained in:
Miciah Dashiel Butler Masters 2006-02-19 07:13:37 +00:00 committed by Miciah Dashiel Butler Masters
parent 6683f14bc1
commit e9799a2265

View File

@ -790,7 +790,6 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
struct listbox_ops *ops = box->ops;
struct listbox_item *item = box->sel;
struct listbox_context *context;
widget_handler_status_T status;
if (!item) return EVENT_PROCESSED;
@ -801,21 +800,23 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
context->widget_data = dlg_data->widgets_data;
if (!context->item) {
msg_box(term, getml(context, NULL), 0,
listbox_message(delete_marked_items_title),
ALIGN_CENTER,
listbox_message(delete_marked_items),
context, 2,
N_("~Yes"), push_ok_delete_button, B_ENTER,
N_("~No"), done_listbox_context, B_ESC);
return EVENT_PROCESSED;
if (context->item) {
widget_handler_status_T status;
status = query_delete_selected_item(context);
mem_free(context);
return status;
}
status = query_delete_selected_item(context);
mem_free(context);
msg_box(term, getml(context, NULL), 0,
listbox_message(delete_marked_items_title), ALIGN_CENTER,
listbox_message(delete_marked_items),
context, 2,
N_("~Yes"), push_ok_delete_button, B_ENTER,
N_("~No"), done_listbox_context, B_ESC);
return status;
return EVENT_PROCESSED;
}