GNOME Bugzilla – Bug 537774
[PATCH] fix track editor display of duration of tracks longer than 1 hour
Last modified: 2008-08-15 22:38:34 UTC
In the track editor, the duration of tracks longer than 1 hour is wrong. THe attached patch fixes the problem by borrowing some code from ColumnCellDuration. Since this problem keeps creeping up, it certainly would be better to put the formatting code for durations at some global place.
Created attachment 112538 [details] [review] Patch to fix display of over 1 hour long files in Track Editor Fixes the problem of incorrect display of duration in the Track Editor (by borrowing some code from ColumnCellDuration).
Thank you for your patch. You left out some characters around your format strings (a b c and d). I think this formatting code could go into src/Libraries/Hyena/Hyena/DateTimeUtil.cs, there's already a method that does something similar (or identical ?).
*** Bug 538853 has been marked as a duplicate of this bug. ***
Created attachment 114890 [details] [review] Updated file properties patch. Updated patch as per Bertrand's suggestion.
Alex, would you please rework your patch so that the actual String.Format call is done in a method that accepts int hours, int minutes, int seconds, and that the existing one (that just takes an int) and your new one use? Thanks!
Created attachment 114949 [details] [review] File properties patch, with a bit of cleanup Just building on Alex's work, I'm taking the opportunity to remove manual time calculations, because they give me headaches.
Bah, didn't see Gabriel's comment... Feel free to ignore my patch.
Created attachment 116627 [details] [review] Revised patch to take in Gabriels's suggestions. Updated patch that makes use of the new FormatDuration (int hours, int minutes, int seconds). Also uses TimeSpan.FromSeconds (time) as suggested by Bertrand.
Created attachment 116630 [details] [review] Working patch of above Woops, helps if it compiles, yeah? ;)
(In reply to comment #9) > Woops, helps if it compiles, yeah? ;) Did you forget the TrackEditor.cs changes?
Erk, yes, I did. They're identical to the ones in the previous patch.
But...I can't mark it accepted-commit_now w/o you attaching it again.
Created attachment 116634 [details] [review] Apparently a description is necessary. I would've figured that it included the TrackEditor.cs changes too for it to be considered accepted-commit_now; especially since it's a one/two line change, but anyway - tada! Thanks for taking a look at this, by the way.
Thanks Alex, looks good, please commit.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.