This also makes setup_and_start_event_run() wrapper unnecessary, since start_event_run() now has only one parameter.
Signed-off-by: Denys Vlasenko dvlasenk@redhat.com --- src/gui-wizard-gtk/wizard.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index ff35aab..96cc53e 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -113,7 +113,7 @@ static GtkWidget *g_top_most_window;
static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback func); static void set_auto_event_chain(GtkButton *button, gpointer user_data); -static void setup_and_start_event_run(const char *event_name); +static void start_event_run(const char *event_name);
typedef struct { @@ -1348,7 +1348,6 @@ struct analyze_event_data struct run_event_state *run_state; const char *event_name; GList *env_list; - const char *success_msg; GIOChannel *channel; struct strbuf *event_log; int event_log_state; @@ -1677,7 +1676,7 @@ static void on_btn_failed_cb(GtkButton *button)
clear_warnings(); update_ls_details_checkboxes(EMERGENCY_ANALYSIS_EVENT_NAME); - setup_and_start_event_run(EMERGENCY_ANALYSIS_EVENT_NAME); + start_event_run(EMERGENCY_ANALYSIS_EVENT_NAME);
/* single shot button -> hide after click */ gtk_widget_hide(GTK_WIDGET(button)); @@ -1825,7 +1824,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g { /* 256 means NOT_REPORTABLE */ if (retval == 256) - cancel_processing(g_lbl_event_log, evd->success_msg); + cancel_processing(g_lbl_event_log, _("Processing finished.")); else { /* We use SIGTERM to stop event processing on user's request. @@ -1841,7 +1840,12 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g } } else - gtk_label_set_text(g_lbl_event_log, evd->success_msg); + { + gtk_label_set_text(g_lbl_event_log, + is_processing_finished() ? _("Processing finished.") + : _("Processing finished, please proceed to the next step.") + ); + }
/*g_source_remove(evd->event_source_id);*/ close(evd->fd); @@ -1875,9 +1879,8 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g return TRUE; /* "please don't remove this event (yet)" */ }
-static void start_event_run(const char *event_name, - const char *success_msg -) { +static void start_event_run(const char *event_name) +{ /* Start event asynchronously on the dump dir * (synchronous run would freeze GUI until completion) */ @@ -1932,7 +1935,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->success_msg = success_msg; evd->event_log = strbuf_new(); evd->fd = state->command_out_fd;
@@ -2267,15 +2269,6 @@ static void highlight_forbidden(void)
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, - /* this event is the last event from the chain */ - is_processing_finished() ? _("Processing finished.") - : _("Processing finished, please proceed to the next step.") - ); -} - static char *get_next_processed_event(GList **events_list) { if (!events_list || !*events_list) @@ -2450,7 +2443,7 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us && g_event_selected[0] ) { clear_warnings(); - setup_and_start_event_run(g_event_selected); + start_event_run(g_event_selected); } }