parent
ce723fd44e
commit
323bc8f0df
|
@ -381,46 +381,45 @@ static void *playlistControllerContext = &playlistControllerContext;
|
||||||
daysAndHours = ldiv(hoursAndMinutes.quot, 24);
|
daysAndHours = ldiv(hoursAndMinutes.quot, 24);
|
||||||
if(daysAndHours.quot >= 7) {
|
if(daysAndHours.quot >= 7) {
|
||||||
weeksAndDays = ldiv(daysAndHours.quot, 7);
|
weeksAndDays = ldiv(daysAndHours.quot, 7);
|
||||||
|
|
||||||
NSString *weekCount = [NSString localizedStringWithFormat:week, weeksAndDays.quot];
|
NSString *weekCount = [NSString localizedStringWithFormat:week, weeksAndDays.quot];
|
||||||
NSString *dayCount = [NSString localizedStringWithFormat:day, weeksAndDays.rem];
|
NSString *dayCount = [NSString localizedStringWithFormat:day, weeksAndDays.rem];
|
||||||
NSString *hourCount = [NSString localizedStringWithFormat:hour, daysAndHours.rem];
|
NSString *hourCount = [NSString localizedStringWithFormat:hour, daysAndHours.rem];
|
||||||
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
||||||
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
||||||
|
|
||||||
[self setTotalTime:[NSString stringWithFormat:
|
[self setTotalTime:[NSString stringWithFormat:
|
||||||
NSLocalizedString(@"wdhms", "weeks, days, hours, minutes and seconds"),
|
NSLocalizedString(@"wdhms", "weeks, days, hours, minutes and seconds"),
|
||||||
weekCount, dayCount, hourCount, minuteCount, secCount]];
|
weekCount, dayCount, hourCount, minuteCount, secCount]];
|
||||||
} else {
|
} else {
|
||||||
|
NSString *dayCount = [NSString localizedStringWithFormat:day, daysAndHours.quot];
|
||||||
NSString *dayCount = [NSString localizedStringWithFormat:day, daysAndHours.quot];
|
NSString *hourCount = [NSString localizedStringWithFormat:hour, daysAndHours.rem];
|
||||||
NSString *hourCount = [NSString localizedStringWithFormat:hour, daysAndHours.rem];
|
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
||||||
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
||||||
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
|
||||||
|
[self setTotalTime:[NSString stringWithFormat:
|
||||||
[self setTotalTime:[NSString stringWithFormat:
|
NSLocalizedString(@"dhms", "days, hours, minutes and seconds"),
|
||||||
NSLocalizedString(@"dhms", "days, hours, minutes and seconds"),
|
dayCount, hourCount, minuteCount, secCount]];
|
||||||
dayCount, hourCount, minuteCount, secCount]];
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(hoursAndMinutes.quot > 0) {
|
if(hoursAndMinutes.quot > 0) {
|
||||||
NSString *hourCount = [NSString localizedStringWithFormat:hour, hoursAndMinutes.quot];
|
NSString *hourCount = [NSString localizedStringWithFormat:hour, hoursAndMinutes.quot];
|
||||||
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
||||||
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
||||||
|
|
||||||
[self setTotalTime:[NSString stringWithFormat:
|
[self setTotalTime:[NSString stringWithFormat:
|
||||||
NSLocalizedString(@"hms", "hours, minutes and seconds"),
|
NSLocalizedString(@"hms", "hours, minutes and seconds"),
|
||||||
hourCount, minuteCount, secCount]];
|
hourCount, minuteCount, secCount]];
|
||||||
} else {
|
} else {
|
||||||
if(hoursAndMinutes.rem > 0) {
|
if(hoursAndMinutes.rem > 0) {
|
||||||
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
NSString *minuteCount = [NSString localizedStringWithFormat:min, hoursAndMinutes.rem];
|
||||||
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
NSString *secCount = [NSString localizedStringWithFormat:second, sec % 60];
|
||||||
|
|
||||||
[self setTotalTime:[NSString stringWithFormat:
|
[self setTotalTime:[NSString stringWithFormat:
|
||||||
NSLocalizedString(@"ms", "minutes and seconds"),
|
NSLocalizedString(@"ms", "minutes and seconds"),
|
||||||
minuteCount, secCount]];
|
minuteCount, secCount]];
|
||||||
} else {
|
} else {
|
||||||
NSString *secCount = [NSString localizedStringWithFormat:second, sec];
|
NSString *secCount = [NSString localizedStringWithFormat:second, sec];
|
||||||
|
|
||||||
[self setTotalTime:secCount];
|
[self setTotalTime:secCount];
|
||||||
}
|
}
|
||||||
|
@ -1595,12 +1594,12 @@ static void *playlistControllerContext = &playlistControllerContext;
|
||||||
- (IBAction)showTagEditor:(id)sender
|
- (IBAction)showTagEditor:(id)sender
|
||||||
{
|
{
|
||||||
// call the editor & pass the url
|
// call the editor & pass the url
|
||||||
if ([self selectionIndex] < 0)
|
if ([self selectionIndex] < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NSURL *url = [[[self selectedObjects] objectAtIndex:0] URL];
|
NSURL *url = [[[self selectedObjects] objectAtIndex:0] URL];
|
||||||
if ([url isFileURL])
|
if ([url isFileURL])
|
||||||
[TagEditorController openTagEditor:url sender:sender];
|
[TagEditorController openTagEditor:url sender:sender];
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue