There is only one small user-visible change in this patch: "...You can try another operation if available" part of "Processing failed" message is gone. This addition was shown only in expert mode. I feel it is not needed since GUI workflow makes it obvious anyway that another event can be selected and run.
Signed-off-by: Denys Vlasenko dvlasenk@redhat.com --- src/gui-wizard-gtk/wizard.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index b4fff7e..de9ba63 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -1349,7 +1349,6 @@ struct analyze_event_data const char *event_name; GList *env_list; const char *success_msg; - const char *error_msg; GIOChannel *channel; struct strbuf *event_log; int event_log_state; @@ -1836,7 +1835,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g cancel_processing(/* default message */ NULL); else { - cancel_processing(evd->error_msg); + cancel_processing(_("Processing failed.")); on_failed_event(evd->event_name); } } @@ -1877,7 +1876,6 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g }
static void start_event_run(const char *event_name, - const char *error_msg, const char *success_msg ) { /* Start event asynchronously on the dump dir @@ -1899,15 +1897,9 @@ static void start_event_run(const char *event_name, free_run_event_state(state); //TODO: better msg? char *msg = xasprintf(_("No processing for event '%s' is defined"), event_name); - if (g_expert_mode) - gtk_label_set_text(g_lbl_event_log, msg); - else - { - gtk_label_set_text(g_lbl_event_log, error_msg); - append_to_textview(g_tv_event_log, msg); - terminate_event_chain(); - } + append_to_textview(g_tv_event_log, msg); free(msg); + cancel_processing(_("Processing failed.")); return; }
@@ -1918,9 +1910,7 @@ static void start_event_run(const char *event_name, free_run_event_state(state); if (!g_expert_mode) { - char *msg = xasprintf(_("Processing interrupted: can't continue without writable directory.")); - cancel_processing(msg); - free(msg); + cancel_processing(_("Processing interrupted: can't continue without writable directory.")); } return; /* user refused to steal, or write error, etc... */ } @@ -1942,7 +1932,6 @@ static void start_event_run(const char *event_name, evd->run_state = state; evd->event_name = event_name; evd->env_list = env_list; - evd->error_msg = error_msg; evd->success_msg = success_msg; evd->event_log = strbuf_new(); evd->fd = state->command_out_fd; @@ -2281,8 +2270,6 @@ static gint select_next_page_no(gint current_page_no, gpointer data); static void setup_and_start_event_run(const char *event_name) { start_event_run(event_name, - g_expert_mode ? _("Processing failed. You can try another operation if available.") - : _("Processing failed."), /* this event is the last event from the chain */ is_processing_finished() ? _("Processing finished.") : _("Processing finished, please proceed to the next step.")