X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fimport%2Fimport.cpp;h=aee7f58fd2f4b9ae26c3434dab307d35e15d72e7;hb=d5e5a52dfa7ba94138977833034789f794740134;hp=3c825d1c63dfb07ae2a8dfa4eb93d5c2b6a99c96;hpb=0a167aa1ccf46ab317dec717c91bd3b1fe048706;p=xestiaab%2F.git diff --git a/source/import/import.cpp b/source/import/import.cpp index 3c825d1..aee7f58 100644 --- a/source/import/import.cpp +++ b/source/import/import.cpp @@ -1,3 +1,21 @@ +// import.cpp - Import subroutines. +// +// (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 #include #include @@ -23,10 +41,9 @@ void ImportRun(frmMain *frmMainPtrInc){ wxString FileTypes; - long ContactsExported = 0; + long ContactsImported = 0; long ContactsCollected = 0; - int ExportType = 0; - int ExportCount = 0; + int ImportType = 0; wxString FinalFilename; wxArrayString SelectedFileList; wxString SelectedFileDirectory; @@ -41,12 +58,12 @@ void ImportRun(frmMain *frmMainPtrInc){ FileTypes.Append(wxT("vCard 3.0 Contact(s) (*.vcf)")); FileTypes.Append(wxT("|*.vcf")); - // Open up the dialog to export file data. + // Open up the dialog to import file data. - wxFileDialog ExportDlg(frmMainPtrInc, wxT("Import Contacts"), wxT(""), wxT(""), + wxFileDialog ImportDlg(frmMainPtrInc, wxT("Import Contacts"), wxT(""), wxT(""), FileTypes, wxFD_OPEN|wxFD_MULTIPLE); - if (ExportDlg.ShowModal() == wxID_CANCEL){ + if (ImportDlg.ShowModal() == wxID_CANCEL){ frmMainPtrInc->ResumeAllTimers(); return; @@ -55,23 +72,23 @@ void ImportRun(frmMain *frmMainPtrInc){ // Get the list of filenames. - ExportDlg.GetPaths(SelectedFileList); + ImportDlg.GetPaths(SelectedFileList); // Find which data type is being used. - ExportType = ExportDlg.GetFilterIndex(); + ImportType = ImportDlg.GetFilterIndex(); std::map ContactData; - if (ExportType == 0){ + if (ImportType == 0){ ContactData = ImportVCard4(&SelectedFileList); } - // vCard 3.0 export + // vCard 3.0 import - if (ExportType == 1){ + if (ImportType == 1){ ContactData = ImportVCard3(&SelectedFileList); @@ -115,7 +132,7 @@ void ImportRun(frmMain *frmMainPtrInc){ delete frmIC; frmIC = NULL; - // Import the contacts into the selected account. + // Import the contacts into the selected account. int ImportCount = 0; int ImportSeek = 0;