Improved comment. Added TODO

This commit is contained in:
Stefano Ceccherini
2015-08-24 10:03:54 +02:00
parent 7ed2a44376
commit a6fb27a3f6
+5 -2
View File
@@ -91,6 +91,8 @@ MidiSettingsView::MessageReceived(BMessage* message)
void void
MidiSettingsView::_RetrieveSoftSynthList() MidiSettingsView::_RetrieveSoftSynthList()
{ {
// TODO: Duplicated code between here
// and BSoftSynth::SetDefaultInstrumentsFile
BStringList paths; BStringList paths;
status_t status = BPathFinder::FindPaths(B_FIND_PATH_DATA_DIRECTORY, status_t status = BPathFinder::FindPaths(B_FIND_PATH_DATA_DIRECTORY,
"synth", paths); "synth", paths);
@@ -108,9 +110,10 @@ MidiSettingsView::_RetrieveSoftSynthList()
BNode node(&entry); BNode node(&entry);
BNodeInfo nodeInfo(&node); BNodeInfo nodeInfo(&node);
char mimeType[B_MIME_TYPE_LENGTH]; char mimeType[B_MIME_TYPE_LENGTH];
// TODO: For some reason this doesn't work // TODO: For some reason the mimetype check fails.
// maybe because the file hasn't yet been sniffed and recognized?
if (nodeInfo.GetType(mimeType) == B_OK if (nodeInfo.GetType(mimeType) == B_OK
/*&& !strcmp(mimeType, "audio/x-soundfont")*/) { /*&& !strcmp(mimeType, "audio/x-soundfont")*/) {
BPath fullPath = paths.StringAt(i).String(); BPath fullPath = paths.StringAt(i).String();
fullPath.Append(entry.Name()); fullPath.Append(entry.Name());
fListView->AddItem(new BStringItem(fullPath.Path())); fListView->AddItem(new BStringItem(fullPath.Path()));