Added "All Supported Formats" to last commit

Originally committed to SVN as r627.
This commit is contained in:
Rodrigo Braz Monteiro 2006-12-26 18:32:25 +00:00
parent a14ab15c94
commit 8e112341de

View file

@ -224,6 +224,8 @@ wxString SubtitleFormat::GetWildcards(int mode) {
wxArrayString cur; wxArrayString cur;
wxString wild; wxString wild;
wxString final; wxString final;
wxString temp1;
wxString temp2;
// For each format // For each format
std::list<SubtitleFormat*>::iterator curIter; std::list<SubtitleFormat*>::iterator curIter;
@ -233,8 +235,8 @@ wxString SubtitleFormat::GetWildcards(int mode) {
format = *curIter; format = *curIter;
if (mode == 0) cur = format->GetReadWildcards(); if (mode == 0) cur = format->GetReadWildcards();
else if (mode == 1) cur = format->GetWriteWildcards(); else if (mode == 1) cur = format->GetWriteWildcards();
wxString temp1; temp1.Clear();
wxString temp2; temp2.Clear();
// Has wildcards // Has wildcards
if (cur.Count()) { if (cur.Count()) {
@ -251,6 +253,15 @@ wxString SubtitleFormat::GetWildcards(int mode) {
} }
} }
// Return final list // Add "all formats" list
return final.Left(final.Length()-1); temp1.Clear();
temp2.Clear();
for (unsigned int i=0;i<all.Count();i++) {
temp1 += all[i] + _T(",");
temp2 += all[i] + _T(";");
}
final = _("All Supported Formats (") + temp1.Left(temp1.Length()-1) + _T(")|") + temp2.Left(temp2.Length()-1) + _T("|") + final.Left(final.Length()-1);
// Return final list
return final;
} }