Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added copyright and license header to the C++ source and header files in the tests...
[xestiaab/.git] / source / frmSearch.cpp
index f3ae077..73ca64d 100644 (file)
@@ -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
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