window: Toggle end timestamp between duration and time remaining
Addresses one part of #70 (closed), specifically #70 (comment 2189600):
Some people prefer seeing the total length of the video, while some prefer seeing the time left—and that can even be different depending on the length or use case of the video. A common convention in other players is that clicking/tapping the end timestamp cycles between showing the total length and the time remaining.
Screencast_from_2024-08-07_13-17-53
Changes:
- A new GSetting,
end-timestamp-type
, to store the user preference -
duration_label
changed toend_timestamp_button
while keeping the same layout -
end_timestamp_button
's label is correctly updated based on the GSetting when loading a video, seeking, etc.
Adding the wall-clock-time when the video will complete could be handled in a separate MR; I considered that use case in the design of this MR, anyway (i.e. by making the GSetting an enum that can be expanded).
I have a question about string handling of the end timestamp, namely: is there a better way to handle that e.g. to ensure right-to-left languages are handled properly? I'm less familiar with Python especially around localization. :) Input welcome!