+// frmSearch.cpp - Search form.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
+
#include "frmSearch.h"
#include "frmMain.h"
#include "frmContact.h"
#include <thread>
#include <wx/fs_mem.h>
-/*#include <boost/filesystem.hpp>
-#include <boost/filesystem/fstream.hpp>
-#include <boost/filesystem/path.hpp>*/
#include <wx/tokenzr.h>
#include <wx/dir.h>
EVT_COMMAND(wxID_ANY, SE_REVEALCONTACT, frmSearch::RevealContact)
END_EVENT_TABLE()
-//namespace boostfs = boost::filesystem;
-
frmSearch::frmSearch( wxWindow* parent )
:
frmSearchADT( parent )
// Get the list of contact files and process each
// one of them.
- wxString AccountDir = GetAccountDir(SAPiter->second, FALSE);
-
- //boostfs::path vcarddir(AccountDir.c_str());
- //boostfs::directory_iterator dir_end;
+ wxString AccountDir = GetAccountDir(SAPiter->second, FALSE);
- //boostfs::path vcardfilename;
wxString vcardfilenamewxs;
wxStringTokenizer vcardfileline;
//std::string l;
wxString vCardFilename;
wxString vCardFilenameFull;
- //if (boostfs::exists(vcarddir)){
if (wxDirExists(AccountDir)){
wxDir vcardaccdir(AccountDir);
bool ProcFiles = vcardaccdir.GetFirst(&vCardFilename, wxEmptyString, wxDIR_FILES);
while(ProcFiles){
- //for (boostfs::directory_iterator vcarddir_iter(vcarddir);
- // vcarddir_iter != dir_end ; ++vcarddir_iter){
if (StopMode == FALSE){
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.