Skip to content

Commit

Permalink
Change export windows title at the end of the export
Browse files Browse the repository at this point in the history
  • Loading branch information
eisneinechse committed Jun 4, 2020
1 parent 55ede55 commit c7f0beb
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/windows/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,10 @@ def accept(self):
if ((( frame - start_frame_export ) != 0) & (( end_time_export - start_time_export ) != 0)):
seconds_left = round(( start_time_export - end_time_export )*( frame - end_frame_export )/( frame - start_frame_export ))
fps_encode = ((frame - start_frame_export)/(end_time_export-start_time_export))
title_message = _("%(hours)d:%(minutes)02d:%(seconds)02d Remaining (%(fps)5.2f FPS)") % {
if frame == end_frame_export:
title_message = _("FINALIZING please wait")
else:
title_message = _("%(hours)d:%(minutes)02d:%(seconds)02d Remaining (%(fps)5.2f FPS)") % {
'hours': seconds_left / 3600,
'minutes': (seconds_left / 60) % 60,
'seconds': seconds_left % 60,
Expand Down Expand Up @@ -1008,6 +1011,16 @@ def accept(self):
# Reveal done button
self.close_button.setVisible(True)

# Restore windows title to show elapsed time
title_message = _("%(hours)d:%(minutes)02d:%(seconds)02d Elapsed (%(fps)5.2f FPS)") % {
'hours': seconds_run / 3600,
'minutes': (seconds_run / 60) % 60,
'seconds': seconds_run % 60,
'fps': fps_encode}

get_app().window.ExportFrame.emit(title_message, video_settings.get("start_frame"),
video_settings.get("end_frame"), frame)

# Make progress bar green (to indicate we are done)
from PyQt5.QtGui import QPalette
p = QPalette()
Expand Down

0 comments on commit c7f0beb

Please sign in to comment.