Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Introduced simplified LoadKind.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 28 Dec 2015 19:43:17 +0000 (19:43 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Mon, 28 Dec 2015 19:43:17 +0000 (19:43 +0000)
source/contacteditor/frmContactEditor-Load.cpp
source/contacteditor/frmContactEditor-LoadGroup.cpp
source/contacteditor/frmContactEditor.h

index 8449f61..a0f67ea 100644 (file)
@@ -136,6 +136,10 @@ bool frmContactEditor::LoadContact(wxString Filename){
        int XTokenCount = 0;
        //int intValueSeek = 1;
 
+       // Process the contact type (KIND) (frmContactEditor-LoadGroup.cpp)
+
+       LoadKind(&ContactEditorData.ContactKind);
+
        // Process the Birthday (BDAY) (frmContactEditor-LoadBADays.cpp)
        
        LoadBirthday(&ContactEditorData.Birthday, &ContactEditorData.BirthdayText);
@@ -249,13 +253,13 @@ bool frmContactEditor::LoadContact(wxString Filename){
                        
                        VersionProcessed = TRUE;
                
-               } if (wxSProperty == wxT("KIND") && KindProcessed == FALSE){
+               }/* if (wxSProperty == wxT("KIND") && KindProcessed == FALSE){
                
                        // See frmContactEditor-LoadGroup.cpp
                
                        LoadKind(wxSPropertySeg2);
                
-               } else if (wxSProperty == wxT("MEMBER")){
+               }*/ else if (wxSProperty == wxT("MEMBER")){
 
                        // See frmContactEditor-LoadGroup.cpp
 
index 2ba020c..516b1cc 100644 (file)
 #include "../common/dirs.h"
 #include <wx/dir.h>
 
+void frmContactEditor::LoadKind(ContactKindType *KindType){
+
+       std::cerr << *KindType << std::endl;
+
+       switch (*KindType){
+               case CONTACTKIND_INDIVIDUAL:
+                       cmbType->SetSelection(1);
+                       break;
+               case CONTACTKIND_GROUP:
+                       cmbType->SetSelection(2);
+                       break;
+               case CONTACTKIND_ORGANISATION:
+                       cmbType->SetSelection(3);
+                       break;
+               case CONTACTKIND_LOCATION:
+                       cmbType->SetSelection(4);
+                       break;
+               case CONTACTKIND_NONE:
+                       cmbType->SetSelection(0);
+                       break;
+       }
+                       
+       wxCommandEvent nullevent;
+                       
+       UpdateMembersTab(nullevent);
+
+}
+
 void frmContactEditor::LoadKind(wxString KindType){
 
        if (KindType == wxT("individual")){
index 8b872b3..7ea6461 100644 (file)
@@ -642,6 +642,7 @@ class frmContactEditor : public frmContactEditorADT
                void LoadGender(wxString *GenderComponent, wxString *GenderIdentity);
                void LoadBirthday(wxString *BirthdayData, bool *BirthdayText);
                void LoadAnniversary(wxString *AnniversaryData, bool *AnniversaryText);
+               void LoadKind(ContactKindType *KindType);
        
                int intValueSeek = 1;
                bool IsGroup = FALSE;
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