From d21e05ae9633b30eaf8813675e94e7c833cb504a Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 28 Nov 2015 10:53:46 +0000 Subject: [PATCH] References to boost properly removed from frmSearch --- source/frmSearch.cpp | 54 +++++++++++--------------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/source/frmSearch.cpp b/source/frmSearch.cpp index 0a1e4ca..73ca64d 100644 --- a/source/frmSearch.cpp +++ b/source/frmSearch.cpp @@ -1,21 +1,3 @@ -// 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 - #include "frmSearch.h" #include "frmMain.h" #include "frmContact.h" @@ -27,6 +9,9 @@ #include #include +/*#include +#include +#include */ #include #include @@ -56,6 +41,8 @@ BEGIN_EVENT_TABLE(frmSearch, wxFrame) EVT_COMMAND(wxID_ANY, SE_REVEALCONTACT, frmSearch::RevealContact) END_EVENT_TABLE() +//namespace boostfs = boost::filesystem; + frmSearch::frmSearch( wxWindow* parent ) : frmSearchADT( parent ) @@ -186,8 +173,12 @@ void frmSearch::SearchContactsThread(){ // Get the list of contact files and process each // one of them. - wxString AccountDir = GetAccountDir(SAPiter->second, FALSE); + wxString AccountDir = GetAccountDir(SAPiter->second, FALSE); + + //boostfs::path vcarddir(AccountDir.c_str()); + //boostfs::directory_iterator dir_end; + //boostfs::path vcardfilename; wxString vcardfilenamewxs; wxStringTokenizer vcardfileline; //std::string l; @@ -198,12 +189,15 @@ void frmSearch::SearchContactsThread(){ 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){ @@ -227,31 +221,9 @@ void frmSearch::SearchContactsThread(){ vCardFilenameFull.Append(AccountDir); vCardFilenameFull.Append(vCardFilename); - Person.LoadFile(vCardFilenameFull); vcardfilenamewxs = vCardFilenameFull; - - // 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. -- 2.39.5