Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly contacteditor/frmContactEditor-Load.cpp
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 13 Mar 2016 12:24:12 +0000 (12:24 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 13 Mar 2016 12:24:12 +0000 (12:24 +0000)
source/contacteditor/frmContactEditor-Load.cpp

index 5f10c46..296427f 100644 (file)
@@ -1748,102 +1748,106 @@ void frmContactEditor::LoadMember(std::map<int,wxString> *GroupList){
                            vCardFilename.Right(5) == wxT(".vcard") || 
                            vCardFilename.Right(5) == wxT(".VCARD")){
 
-                           vCard Person;
+                               vCard Person;
 
-                           vCardFilenameFull.Append(AccountDirFinal);
-                           vCardFilenameFull.Append(wxT("/"));
-                           vCardFilenameFull.Append(vCardFilename);
+                               vCardFilenameFull.Append(AccountDirFinal);
+                               vCardFilenameFull.Append(wxT("/"));
+                               vCardFilenameFull.Append(vCardFilename);
 
-                           Person.LoadFile(vCardFilenameFull);
+                               Person.LoadFile(vCardFilenameFull);
 
-                           if (MemberData.Left(9) == wxT("urn:uuid:")){
+                               if (MemberData.Left(9) == wxT("urn:uuid:")){
 
-                               wxString NewPropValue;
-                               NewPropValue = MemberData.Mid(9, wxString::npos);
-                               MemberData = NewPropValue;
+                                       wxString NewPropValue;
+                                       NewPropValue = MemberData.Mid(9, wxString::npos);
+                                       MemberData = NewPropValue;
 
-                           }
+                               }
 
-                           if (Person.MeetBaseSpecification()){
+                               if (Person.MeetBaseSpecification()){
 
-                               wxString KindStatus = Person.Get(wxT("KIND"));
+                                       wxString KindStatus = Person.Get(wxT("KIND"));
 
-                               if (KindStatus == wxT("group")){
+                                       if (KindStatus == wxT("group")){
 
-                                       vCardFilename.Clear();
-                                       vCardFilenameFull.Clear();
-                                       vCardDataString.Clear();
-                                       ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-                                       continue;
+                                               vCardFilename.Clear();
+                                               vCardFilenameFull.Clear();
+                                               vCardDataString.Clear();
+                                               ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+                                               continue;
 
-                               }
+                                       }
 
-                               wxString PersonName = Person.Get(wxT("N"));
-                               wxString PersonUID = Person.Get(wxT("UID"));
-                               wxString PersonFilename = vCardFilenameFull;
-                       
-                               if (PersonUID != MemberData){
+                                       wxString PersonName = Person.Get(wxT("N"));
+                                       wxString PersonUID = Person.Get(wxT("UID"));
+                                       wxString PersonFilename = vCardFilenameFull;
+                               
+                                       if (PersonUID != MemberData){
                        
-                                       vCardFilename.Clear();
-                                       vCardFilenameFull.Clear();
-                                       vCardDataString.Clear();
-                                       ProcFiles = vcardaccdir.GetNext(&vCardFilename);
-                                       continue;
+                                               vCardFilename.Clear();
+                                               vCardFilenameFull.Clear();
+                                               vCardDataString.Clear();
+                                               ProcFiles = vcardaccdir.GetNext(&vCardFilename);
+                                               continue;
                        
-                               } else {
-                                       FoundContact = TRUE;
-                               }
+                                       } else {
+                                               
+                                               FoundContact = TRUE;
+                                               
+                                       }
 
-                               //ContactsNames.insert(std::make_pair(PersonName, ContactIndex));
-                               //ContactsUIDs.insert(std::make_pair(ContactIndex, PersonUID));
+                                       //ContactsNames.insert(std::make_pair(PersonName, ContactIndex));
+                                       //ContactsUIDs.insert(std::make_pair(ContactIndex, PersonUID));
 
-                               if (XVMData.SortMode == 1){
+                                       if (XVMData.SortMode == 1){
 
-                                   // Split the name into sections.
+                                               // Split the name into sections.
        
-                                   vCardDataString = Person.Get(wxT("N"));
+                                               vCardDataString = Person.Get(wxT("N"));
 
-                                   vCardName NameData = Person.GetName();
+                                               vCardName NameData = Person.GetName();
     
-                                   vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
+                                               vCardDataString = NameData.Forename + wxT(" ") + NameData.Surname;
     
-                               } else if (XVMData.SortMode == 2){
+                                       } else if (XVMData.SortMode == 2){
     
-                                   // Split the name into sections.
+                                               // Split the name into sections.
     
-                                   vCardName NameData = Person.GetName();    
+                                               vCardName NameData = Person.GetName();    
     
-                                   vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
+                                               vCardDataString = NameData.Surname + wxT(", ") + NameData.Forename;
     
-                               } else if (XVMData.SortMode == 3){
+                                       } else if (XVMData.SortMode == 3){
     
-                                   // Check and make sure that the top most nickname is used.
+                                               // Check and make sure that the top most nickname is used.
     
-                                   vCardDataString = Person.Get(wxT("NICKNAME"));
+                                               vCardDataString = Person.Get(wxT("NICKNAME"));
     
-                                   if (vCardDataString.IsEmpty()){
+                                               if (vCardDataString.IsEmpty()){
        
-                                       vCardDataString = wxT("(no nickname)");
+                                                       vCardDataString = wxT("(no nickname)");
        
-                                   }
+                                               }
     
-                               } else if (XVMData.SortMode == 4){
+                                       } else if (XVMData.SortMode == 4){
     
-                                   vCardDataString = Person.Get(wxT("FN"));
+                                               vCardDataString = Person.Get(wxT("FN"));
     
-                               }
+                                       }
+
+                                       if (XVMData.AscendingMode == TRUE){
+                                               
+                                               vCardNamesAsc.insert(std::make_pair(vCardDataString, PersonUID));
+                                               
+                                       } else {
+                                               
+                                               vCardNamesDsc.insert(std::make_pair(vCardDataString, PersonUID));
+                                               
+                                       }
 
-                               if (XVMData.AscendingMode == TRUE){
-                                   vCardNamesAsc.insert(std::make_pair(vCardDataString, PersonUID));
                                } else {
-                                   vCardNamesDsc.insert(std::make_pair(vCardDataString, PersonUID));
-                               }
-
-                           } else {
-
-                           }
-
 
+                               }
 
                        }
 
@@ -1852,44 +1856,48 @@ void frmContactEditor::LoadMember(std::map<int,wxString> *GroupList){
                        vCardDataString.Clear();
                        ProcFiles = vcardaccdir.GetNext(&vCardFilename);
 
-                   }
+               }
                    
-                   if (FoundContact == FALSE){
+               if (FoundContact == FALSE){
+                               
                        if (XVMData.AscendingMode == TRUE){
-                           vCardNamesAsc.insert(std::make_pair(MemberIter->second, MemberIter->second));
+                                       
+                               vCardNamesAsc.insert(std::make_pair(MemberIter->second, MemberIter->second));
+                                       
                        } else {
-                           vCardNamesDsc.insert(std::make_pair(MemberIter->second, MemberIter->second));
+                               
+                       vCardNamesDsc.insert(std::make_pair(MemberIter->second, MemberIter->second));
+                               
                        }
-                   }
 
-                   if (XVMData.AscendingMode == TRUE){
+               }
+
+               if (XVMData.AscendingMode == TRUE){
 
                        for (std::map<wxString,wxString>::iterator iter = vCardNamesAsc.begin(); 
-                       iter != vCardNamesAsc.end(); ++iter){
+                               iter != vCardNamesAsc.end(); ++iter){
 
                                wxListItem ItemData;
                        
                                ItemData.SetId(0);
                                ItemData.SetText(iter->first);
-       
                                lboGroups->InsertItem(ItemData);
 
                        }
 
-
-                   } else {
+               } else {
 
                        for (std::map<wxString,wxString>::iterator iter = vCardNamesDsc.begin(); 
-                       iter != vCardNamesDsc.end(); ++iter){
+                               iter != vCardNamesDsc.end(); ++iter){
 
                                wxListItem ItemData;
                        
                                ItemData.SetId(0);
                                ItemData.SetText(iter->first);
-       
+
                                lboGroups->InsertItem(ItemData);
 
-                   }
+                       }
 
                }
        
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy