Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added source code, headers and unit testing for the KEY vCard property for ContactDat...
[xestiaab/.git] / source / frmMain.cpp
index 0500383..150e7f9 100644 (file)
@@ -43,7 +43,7 @@
 #include "frmContact.h"
 #include "frmConflictResolution.h"
 #include "frmInvalidSSLCertificate.h"
-#include "frmSearch.h"
+#include "search/frmSearch.h"
 #include "frmSSLCertificate.h"
 #include "frmUpdate.h"
 #include "import/frmImportResults.h"
@@ -226,29 +226,6 @@ frmMainADT( parent )
     AccCtrl->SetPopupMaxHeight(175);
     AccCtrl->SetPopupMinWidth(250);
     treAccounts->AssignImageList(AccImgList);
-    //bmpIcon->Hide();
-    
-    /*wxStaticBitmap* BeepBoop = new wxStaticBitmap(AccCtrl, wxID_ANY, wxNullBitmap, wxPoint(AccTextCtrlSize.GetX() + 3, AccTextCtrlSize.GetY() + 2), wxDefaultSize, 0);
-     
-     icons_accgroup_png.SetMask(new wxMask(icons_accgroup_png, wxSystemSettings::GetColour(wxSYS_COLOUR_BACKGROUND)));
-     
-     BeepBoop->SetBackgroundColour(AccCtrl->GetBackgroundColour());
-     BeepBoop->SetBitmap(icons_accgroup_png);*/
-    
-    //szrContactList->Insert(0, XABV2, 1, wxEXPAND | wxALL, 0);
-    
-    /*AccControl->UseAltPopupWindow();
-     AccControl->SetPopupControl(treAccounts);
-     AccControl->SetPopupMaxHeight(175);
-     
-     treAccounts->AssignImageList(AccImgList);
-     szrContactList->Insert(0, AccControl, 1, wxEXPAND|wxALL, 0);
-     szrAccList->Add(AccIcon, 0, wxLEFT|wxTOP|wxEXPAND, 3);
-     
-     */
-    
-    //szrContactList->Layout();
-    //szrContactList->RecalcSizes();
     
     wxListItem ColumnData;
     ColumnData.SetId(0);
@@ -256,14 +233,6 @@ frmMainADT( parent )
     ColumnData.SetWidth(320);
     lstContacts->InsertColumn(0, ColumnData);
     
-    //Connect(wxID_ANY, ContactConflictCmdEnv,
-    // ContactConflictEventHandler(frmMain::ConflictResolution), NULL, this);
-    
-    //Connect(wxID_ANY, MyFooCommandEvent,
-    // MyFooEventHandler(frmMain::DoSomething), NULL, this);
-    
-    //Bind(ContactConflictCmdEnv, ContactConflictEventHandler(frmMain::ConflictResolution), this, wxID_ANY);
-    
     treAccounts->Connect(wxEVT_LEFT_DCLICK, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
     treAccounts->Connect(wxEVT_TREE_SEL_CHANGED, wxTreeEventHandler(frmMain::LoadContactList), NULL, this);
     
@@ -643,14 +612,12 @@ void frmMain::LoadContactList( wxTreeEvent& event )
     
     ContactsFileIndex.Clear();
     
-    //wxString vcardfilenamewxs;
     wxString vCardFilename;
     wxString vCardFilenameFull;
     wxString vCardDataString;
     wxStringTokenizer vcardfileline;
     wxString lwxs;
     wxString setname, setvalue;
-    //vCardNames = new std::map<wxString, wxString, std::greater<wxString>>;
     std::multimap<wxString, wxString, std::greater<wxString>> vCardNamesAsc;
     std::multimap<wxString, wxString, std::less<wxString>> vCardNamesDsc;
     long ContactIndex = 1;
@@ -670,8 +637,7 @@ void frmMain::LoadContactList( wxTreeEvent& event )
         
         std::multimap<wxTreeItemId, int>::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId);
         std::multimap<int, wxString>::iterator AGFiter = AccountGroupFilename.find(AGTiter->second);
-        //std::multimap<wxTreeItemId, int>::iterator AGFiter = AccountGroupTreeId.find(ActiveItemId);
-        
+       
         Group.LoadFile(AGFiter->second);
         
         ArrayvCardOutData vCardMember = Group.GetByPartial(wxT("MEMBER"));
@@ -909,8 +875,6 @@ void frmMain::ShowContactInfo( wxListEvent& event )
     long intSelected = -1;
     long ContactSeekNum = -1;
     
-    //    intSelected = lstContacts->GetSelection();
-    
     // Check if several contacts have been selected.
     
     int ContactTotal = 0;
@@ -1032,8 +996,6 @@ void frmMain::ShowContactInfo( wxListEvent& event )
             if (wxSPropertyNextLine.Mid(0, 1) == wxT(" ") || wxSPropertyNextLine.Mid(0, 1) == wxT("\t")){
                 
                 wxSPropertyNextLine.Remove(0, 1);
-                //wxSPropertyNextLine.Trim(FALSE);
-                //ContactLine.Trim();
                 ContactLine.Append(wxSPropertyNextLine);
                 
             } else {
@@ -1180,9 +1142,7 @@ void frmMain::ShowContactEditorEdit( wxCommandEvent& event )
     
     long intSelected = -1;
     long intContactSeekNum = -1;
-    
-    //    intSelected = lstContacts->GetSelection();
-    
+        
     intSelected = lstContacts->GetNextItem(intSelected,
                                            wxLIST_NEXT_ALL,
                                            wxLIST_STATE_SELECTED);
@@ -1349,7 +1309,6 @@ void frmMain::OpenContactInfo( wxCommandEvent& event )
     wxString setname, setvalue;
     vCard Person;
     wxString nextchar;
-    //std::fstream vcardfile;
     
     Person.LoadFile(uc->ContactFilename);
     
@@ -1429,12 +1388,6 @@ void frmMain::LoadPreferences(){
     
     AccountSyncTimers.clear();
     
-    /*
-     for (int i = (preferences.accounts.GetCount() - 1); i > 0; --i){
-     treAccounts->AppendItem(RootNode, preferences.accounts.GetAccountName(i));
-     }
-     */
-    
     wxString AccDir;
     wxString AccDirFull;
     wxString AccDirFullSfx;
@@ -1478,7 +1431,7 @@ void frmMain::LoadPreferences(){
         if (preferences.accounts.GetAccountType(i) == wxT("CardDAV") ||
             preferences.accounts.GetAccountType(i) == wxT("carddav")){
             
-            // Check if the directory exists before doing anything.
+            // TODO: Check if the directory exists before doing anything.
             
             
             
@@ -1514,8 +1467,7 @@ void frmMain::LoadPreferences(){
         wxString vCardFilename;
         wxString vCardDataString;
         wxString vCardFilenameFull;
-        //bool ProcFiles = FALSE;
-        
+
         bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
         while(ProcFiles){
             
@@ -1586,11 +1538,7 @@ void frmMain::ConflictResolution(wxCommandEvent& event){
     vCardConflictObj *vCardConfObj = (vCardConflictObj*)event.GetClientData();
     vCard *ClientDataPtr = vCardConfObj->vCardLocalData;
     vCard *ServerDataPtr = vCardConfObj->vCardServerData;
-    //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
-    //wxString Moo = ClientDataPtr->WriteString();
-    //vCard *ServerDataPtr = vCardConfObj->vCardServerData;
     frameCR->LoadData(ClientDataPtr, ServerDataPtr, &MemoryFileList);
-    //frameCR->LoadData(vCardConfObj->vCardLocalData, vCardConfObj->vCardServerData, &MemoryFileList);
     frameCR->ShowModal();
     
     int FinalConflictResult = frameCR->GetResult();
@@ -1842,7 +1790,6 @@ void frmMain::OpenFindContactsWindow(wxCommandEvent& event){
 
 void frmMain::RemoveContactsWindowPointer(wxCommandEvent& event){
     
-    //frmSearch *frameSCH = static_cast<frmSearch*>(ActMgrPtr);
     void *frameSCH = (void*)event.GetClientData();
     
     SearchWindowList.erase(frameSCH);
@@ -1861,20 +1808,6 @@ void frmMain::RemoveContactEditorWindowPointer(wxCommandEvent& event){
     
 }
 
-void frmMain::UpdateWindowList(wxCommandEvent& event){
-    
-    // Update the Window List.
-    
-    // Delete the existing items in the window menu.
-    
-    // Get the list of contacts.
-    
-    // Insert a separator.
-    
-    // Get the list of search windows.
-    
-}
-
 void frmMain::RevealContact(wxCommandEvent& event){
     
     UCNotif *uc = (UCNotif*)event.GetClientData();
@@ -2387,15 +2320,7 @@ void frmMain::WindowEdit( wxCommandEvent &event ){
         std::map<int, wxMenuItem*>::iterator MenuIter = WindowListPointersMenu.find(WData->WindowID);
         
         MenuIter->second->SetItemLabel(WindowTitle);
-        
-        //mnuWindow->FindChildItem(intID, &pos);
-        //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-        //mnuNewItem->SetId(WData->WindowID);
-        //ContactWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-        //ContactWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-        //mnuWindow->Insert((pos + 1), mnuNewItem);
-        //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactWindow));
-        
+                
     } else if (WData->DataType == 1){
         
         // Get the window title and use that.
@@ -2416,14 +2341,6 @@ void frmMain::WindowEdit( wxCommandEvent &event ){
             
         }
         
-        //mnuWindow->FindChildItem(intID, &pos);
-        //wxMenuItem *mnuNewItem = new wxMenuItem(NULL, WData->WindowID, WindowTitle, WData->WindowID), wxEmptyString, wxITEM_NORMAL, NULL);
-        //mnuNewItem->SetId(WData->WindowID);
-        //ContactEditorWindowListPointersMenu.insert(std::make_pair(WData->WindowID, mnuNewItem));
-        //ContactEditorWindowListPointers.insert(std::make_pair(WData->WindowID, WData->WindowPointer));
-        //mnuWindow->Insert((pos + 1), mnuNewItem);
-        //this->Connect(mnuNewItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(frmMain::ShowContactEditorWindow));
-        
     }
     
     delete WData;
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