- switch (status->stage) {
- case export_None:
- progress_label.set_text ("");
- break;
- case export_ReadTimespan:
- progress_label.set_text (string_compose (_("Reading timespan %1 of %2"), status->timespan, status->total_timespans));
- break;
- case export_PostProcess:
- progress_label.set_text (string_compose (_("Processing file %2 of %3 (%1) from timespan %4 of %5"),
- file_notebook->get_nth_format_name (status->format),
- status->format, status->total_formats,
- status->timespan, status->total_timespans));
- break;
- case export_Write:
- progress_label.set_text (string_compose (_("Encoding file %2 of %3 (%1) from timespan %4 of %5"),
- file_notebook->get_nth_format_name (status->format),
- status->format, status->total_formats,
- status->timespan, status->total_timespans));
- break;
+ std::string status_text;
+ float progress = 0.0;
+ if (status->normalizing) {
+ status_text = string_compose (_("Normalizing '%3' (timespan %1 of %2)"),
+ status->timespan, status->total_timespans, status->timespan_name);
+ progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
+ } else {
+ status_text = string_compose (_("Exporting '%3' (timespan %1 of %2)"),
+ status->timespan, status->total_timespans, status->timespan_name);
+ progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
+ }
+ progress_bar.set_text (status_text);
+
+ if (progress < previous_progress) {
+ // Work around gtk bug
+ progress_bar.hide();
+ progress_bar.show();