On 04/18/2013 09:12 AM, Jakub Filak wrote:
# check if correct libreport is installed
$ grep EXIT_STOP_EVENT_RUN /usr/include/libreport/internal_libreport.h
#define EXIT_STOP_EVENT_RUN 70
# add testing events
$ cat /etc/libreport/events.d/test_event.conf
EVENT=one_thx
echo "Emitting THANKYOU"
exit 70
EVENT=second_thx
echo "ALERT If you are seeing this message, the stop request wasn't
recognized."
# run report-gtk
$ report-gtk -e one_thx -e second_thx -- .
--- Running one_thx ---
Emitting THANKYOU
--- Running second_thx ---
If you are seeing this message, the stop request wasn't recognized.
On Wednesday 17 of April 2013 15:27:27 Denys Vlasenko wrote:
> Signed-off-by: Denys Vlasenko <dvlasenk(a)redhat.com>
> /* EOF/error */
>
> + if (WIFEXITED(run_state->process_status)
> + && WEXITSTATUS(run_state->process_status) == EXIT_STOP_EVENT_RUN
> + ) {
> + retval = 0;
> + run_state->process_status = 0;
> + stop_requested = true;
terminate_event_chain();
Adding line above helped but the status text is
"Processing finished, please proceed to the next step."
and only Close button is visible.
Yes, this is the correct fix. As to the misleading message:
we are making the decision about message's content too early,
when we start event run, not when it ends.
The fix I just tested is to do it late:
else
- gtk_label_set_text(evd->status_label, evd->success_msg);
+ {
+ gtk_label_set_text(evd->status_label,
+ is_processing_finished() ? _("Processing finished.")
+ : _("Processing finished, please
proceed to the next step.")
+ );
+ }
and delete evd->success_msg member altogether.
Sending updated patch shortly.
--
vda