From e9799a2265faf065823ac2f667bb82a55336d063 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sun, 19 Feb 2006 07:13:37 +0000 Subject: [PATCH] Reflow the control flow in push_hierbox_delete_button --- src/bfu/hierbox.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/bfu/hierbox.c b/src/bfu/hierbox.c index bcd47e69..297002df 100644 --- a/src/bfu/hierbox.c +++ b/src/bfu/hierbox.c @@ -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; }