Use the iso639_2 to store the language in MP42Track.
This commit is contained in:
1 parent
4ea4fa3d19
commit
d503c045fb
5 files changed
+14
-10
No files matched your search
@@ -571,7 +571,7 @@ static NSDictionary *_detailMonospacedAttr;
|
||||
}
|
||||
else if ([tableColumn.identifier isEqualToString:@"trackLanguage"]) {
|
||||
SBComboBoxCellView *comboCell = [tableView makeViewWithIdentifier:@"ComboCell" owner:self];
|
||||
comboCell.comboBox.stringValue = track.language;
|
||||
comboCell.comboBox.stringValue = [MP42Languages langForISO_639_2Code:track.language];
|
||||
cell = comboCell;
|
||||
}
|
||||
}
|
||||
@@ -633,7 +633,7 @@ static NSDictionary *_detailMonospacedAttr;
|
||||
MP42Track *track = [self trackAtAtTableRow:row];
|
||||
|
||||
if (track && ![sender.stringValue isEqualToString:track.name]) {
|
||||
track.language = sender.stringValue;
|
||||
track.language = [MP42Languages ISO_639_2CodeForLang:sender.stringValue];
|
||||
[self updateChangeCount:NSChangeDone];
|
||||
}
|
||||
}
|
||||
@@ -648,9 +648,9 @@ static NSDictionary *_detailMonospacedAttr;
|
||||
return row - 1;
|
||||
}
|
||||
|
||||
- (MP42Track *)trackAtAtTableRow:(NSUInteger)row
|
||||
- (MP42Track *)trackAtAtTableRow:(NSInteger)row
|
||||
{
|
||||
if (row == 0) {
|
||||
if (row <= 0) {
|
||||
return nil;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in new issue
Block a user