X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2FfrmSearch.cpp;h=73ca64df9aecc1b524815027aa412b776a165682;hb=c31cb9c171e80cfb02d26b6753576c4066edab90;hp=f3ae077862917479d4639a4013291d05fcdf444b;hpb=8f9ee6da0f290bb201962732d7567257e6f6f072;p=xestiaab%2F.git diff --git a/source/frmSearch.cpp b/source/frmSearch.cpp index f3ae077..73ca64d 100644 --- a/source/frmSearch.cpp +++ b/source/frmSearch.cpp @@ -23,6 +23,9 @@ DEFINE_EVENT_TYPE(SE_SBUPDATE); DEFINE_EVENT_TYPE(SE_SEARCHFINISHED); DEFINE_EVENT_TYPE(SE_UPDATERESULT); DEFINE_EVENT_TYPE(SE_DELETERESULT); +DEFINE_EVENT_TYPE(SE_OPENCONTACT); +DEFINE_EVENT_TYPE(SE_EDITCONTACT); +DEFINE_EVENT_TYPE(SE_REVEALCONTACT); BEGIN_EVENT_TABLE(frmSearch, wxFrame) EVT_COMMAND(wxID_ANY, SE_ADDSEARCHSETTING, frmSearch::AddSearchSetting) @@ -33,6 +36,9 @@ BEGIN_EVENT_TABLE(frmSearch, wxFrame) EVT_COMMAND(wxID_ANY, SE_SEARCHFINISHED, frmSearch::SearchFinished) EVT_COMMAND(wxID_ANY, SE_UPDATERESULT, frmSearch::UpdateResult) EVT_COMMAND(wxID_ANY, SE_DELETERESULT, frmSearch::DeleteResult) + EVT_COMMAND(wxID_ANY, SE_OPENCONTACT, frmSearch::OpenContact) + EVT_COMMAND(wxID_ANY, SE_EDITCONTACT, frmSearch::EditContact) + EVT_COMMAND(wxID_ANY, SE_REVEALCONTACT, frmSearch::RevealContact) END_EVENT_TABLE() //namespace boostfs = boost::filesystem; @@ -215,43 +221,9 @@ void frmSearch::SearchContactsThread(){ vCardFilenameFull.Append(AccountDir); vCardFilenameFull.Append(vCardFilename); - Person.LoadFile(vCardFilenameFull); - - /*if (boostfs::path(vcarddir_iter->path()).extension() == ".vcf" || - boostfs::path(vcarddir_iter->path()).extension() == ".VCF" || - boostfs::path(vcarddir_iter->path()).extension() == ".vcard" || - boostfs::path(vcarddir_iter->path()).extension() == ".VCARD"){*/ vcardfilenamewxs = vCardFilenameFull; - - /*vCard Person; - std::fstream vcardfile; - - vcardfilename = boostfs::path(vcarddir_iter->path()).filename(); - vcardfilenamewxs.Append(AccountDir); - vcardfilenamewxs.Append(wxString::FromUTF8(vcardfilename.c_str())); - - // Open the vCard file up and get the setting names and values from the - // file. - - vcardfile.open(vcardfilenamewxs.mb_str(), std::ios::in); - - while(getline(vcardfile, l)){ - - lwxs.Clear(); - setname.Clear(); - setvalue.Clear(); - lwxs.Append(wxString::FromUTF8(l.c_str())); - vcardfileline.SetString(lwxs, wxT(":")); - setname = vcardfileline.GetNextToken(); - setvalue = vcardfileline.GetString(); - - Person.Add(setname, setvalue, TRUE); - - } - - vcardfile.close();*/ // Check if file has version 4.0, first name (FN) // begin and end vCard portions. @@ -1740,4 +1712,12 @@ void frmSearch::SetSearchMode(bool SearchModeIn){ } +} + +void frmSearch::ShowContactMenu( wxMouseEvent& event ){ + + ContactMenu->SetupPointers(this, lstResults); + + PopupMenu(ContactMenu->MenuPointer(), wxDefaultPosition); + } \ No newline at end of file