wxString PropertyValue;
wxString PropertyTokens;
bool FirstToken = TRUE;
+ bool PropertyMatched = FALSE;
for (std::map<int, int>::iterator intiter = SplitPoints.begin();
intiter != SplitPoints.end(); ++intiter){
CaptureString(&PropertyValue, FALSE);
+ ProcessStringValue(&PropertyName, "ALTID", IMListAltID, &PropertyValue, IMCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "PID", IMListPID, &PropertyValue, IMCount, &PropertyMatched);
+ ProcessStringValue(&PropertyName, "MEDIATYPE", IMListMediatype, &PropertyValue, IMCount, &PropertyMatched);
+ ProcessIntegerValue(&PropertyName, "PREF", IMListPref, &PropertyValue, IMCount, &PropertyMatched);
+
// Process properties.
- if (PropertyName == wxT("ALTID")){
-
- IMListAltID->erase(*IMCount);
- IMListAltID->insert(std::make_pair(*IMCount, PropertyValue));
+ if (PropertyMatched == TRUE){
+
+ PropertyMatched = FALSE;
+ continue;
- } else if (PropertyName == wxT("PID")){
-
- IMListPID->erase(*IMCount);
- IMListPID->insert(std::make_pair(*IMCount, PropertyValue));
+ }
- } else if (PropertyName == wxT("MEDIATYPE")){
-
- IMListMediatype->erase(*IMCount);
- IMListMediatype->insert(std::make_pair(*IMCount, PropertyValue));
+ if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
- } else if (PropertyName == wxT("PREF")){
+ if (FirstToken == TRUE){
- ProcessIntegerValue(IMListPref, &PropertyValue, IMCount);
-
- } else {
-
- if (!PropertyName.IsEmpty() && !PropertyValue.IsEmpty() && PropertyName != wxT("TYPE")){
+ PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
+ FirstToken = FALSE;
- if (FirstToken == TRUE){
-
- PropertyTokens.Append(PropertyName + wxT("=") + PropertyValue);
- FirstToken = FALSE;
-
- } else {
-
- PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
-
- }
+ } else {
+
+ PropertyTokens.Append(wxT(";") + PropertyName + wxT("=") + PropertyValue);
}