mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Reflow the control flow in push_hierbox_delete_button
This commit is contained in:
parent
6683f14bc1
commit
e9799a2265
@ -790,7 +790,6 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
|
|||||||
struct listbox_ops *ops = box->ops;
|
struct listbox_ops *ops = box->ops;
|
||||||
struct listbox_item *item = box->sel;
|
struct listbox_item *item = box->sel;
|
||||||
struct listbox_context *context;
|
struct listbox_context *context;
|
||||||
widget_handler_status_T status;
|
|
||||||
|
|
||||||
if (!item) return EVENT_PROCESSED;
|
if (!item) return EVENT_PROCESSED;
|
||||||
|
|
||||||
@ -801,16 +800,8 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
|
|||||||
|
|
||||||
context->widget_data = dlg_data->widgets_data;
|
context->widget_data = dlg_data->widgets_data;
|
||||||
|
|
||||||
if (!context->item) {
|
if (context->item) {
|
||||||
msg_box(term, getml(context, NULL), 0,
|
widget_handler_status_T status;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
status = query_delete_selected_item(context);
|
status = query_delete_selected_item(context);
|
||||||
mem_free(context);
|
mem_free(context);
|
||||||
@ -818,6 +809,16 @@ push_hierbox_delete_button(struct dialog_data *dlg_data,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Clear action */
|
/* Clear action */
|
||||||
|
Loading…
Reference in New Issue
Block a user