+}
+
+
+gint
+ExportVideoDialog::audio_progress_display ()
+{
+ std::string status_text;
+ double progress = 0.0;
+ if (status->normalizing) {
+ pbar.set_text (_("Normalizing audio"));
+ progress = ((float) status->current_normalize_cycle) / status->total_normalize_cycles;
+ progress = progress / (twopass ? 4.0 : 3.0) + (twopass ? .25 : 1.0/3.0);
+ } else {
+ pbar.set_text (_("Exporting audio"));
+ progress = ((float) status->processed_frames_current_timespan) / status->total_frames_current_timespan;
+ progress = progress / ((twopass ? 2.0 : 1.0) + (normalize ? 2.0 : 1.0));
+ }
+ if (progress < previous_progress) {
+ // Work around gtk bug
+ pbar.hide();
+ pbar.show();
+ }
+ previous_progress = progress;
+ pbar.set_fraction (progress);
+ return TRUE;