X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FContactDataObject.cpp;h=0668659beb9d3fbba3ca8f81beb1a1b21cbb83ae;hb=8d05e6ce4e40e8ddc04535a06c4d7d7ea0a1c58b;hp=ac80f158f61e9de931355466f4f2099fc107b2b3;hpb=761f457eb9757276b88bc324e9ee7d964d628734;p=xestiaab%2F.git diff --git a/source/contacteditor/ContactDataObject.cpp b/source/contacteditor/ContactDataObject.cpp index ac80f15..0668659 100644 --- a/source/contacteditor/ContactDataObject.cpp +++ b/source/contacteditor/ContactDataObject.cpp @@ -2180,6 +2180,7 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, wxString PropertyValue; wxString PropertyTokens; bool FirstToken = TRUE; + bool PropertyMatched = FALSE; for (std::map::iterator intiter = SplitPoints.begin(); intiter != SplitPoints.end(); ++intiter){ @@ -2196,41 +2197,30 @@ void ContactDataObject::ProcessIM(wxString PropertySeg1, wxString PropertySeg2, 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); }