X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2FfrmMain.cpp;h=25cb191ef0f199760ce5c74400dfa0ba008ee914;hb=77b9956953d1e3abb804d6c266c2c64e7b50d9d2;hp=35b3d7227cbcef1f39d2e6b9176f6b9c93ab8f3f;hpb=3ee149974e5bf642259e0541016216e21ab892b7;p=xestiaab%2F.git diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 35b3d72..25cb191 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -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); @@ -495,9 +464,10 @@ void frmMain::OpenPreferences( wxCommandEvent& event) if (ReloadAccounts == TRUE){ // Reload the accounts as a change has been made within - // the application. + // the application and clear the current contact information. this->LoadPreferences(); + this->ResetContactInfo(); } @@ -519,14 +489,14 @@ void frmMain::OpenNewABDialog( wxCommandEvent& event) frameNewAccount->ShowModal(); delete frameNewAccount; frameNewAccount = NULL; - + if (ReloadAccounts == TRUE){ - + // Reload the accounts as a change has been made within // the application. this->LoadPreferences(); - + } } @@ -643,14 +613,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>; std::multimap> vCardNamesAsc; std::multimap> vCardNamesDsc; long ContactIndex = 1; @@ -670,8 +638,7 @@ void frmMain::LoadContactList( wxTreeEvent& event ) std::multimap::iterator AGTiter = AccountGroupTreeId.find(ActiveItemId); std::multimap::iterator AGFiter = AccountGroupFilename.find(AGTiter->second); - //std::multimap::iterator AGFiter = AccountGroupTreeId.find(ActiveItemId); - + Group.LoadFile(AGFiter->second); ArrayvCardOutData vCardMember = Group.GetByPartial(wxT("MEMBER")); @@ -2854,4 +2821,12 @@ void frmMain::ShowContactMenu( wxMouseEvent& event ){ this->PopupMenu(ContactMenu->MenuPointer(), wxDefaultPosition); +} + +void frmMain::ResetContactInfo(){ + + wxString EmptyPage = wxT(""); + htmContactData->SetPage(EmptyPage); + AccCtrl->SetValue(""); + } \ No newline at end of file