diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-15 11:30:44 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-15 22:26:33 +0900 |
commit | 3a75bdfe83b71ef1dbc2fbf52f2d18b8174e22e5 (patch) | |
tree | ac71fb25d43d090e8073c77891c40697d47877d7 /kmailcvt/filter_outlook.cpp | |
parent | 2df45fd65d407b089967e948fa4a24439ef09458 (diff) | |
download | tdepim-3a75bdfe83b71ef1dbc2fbf52f2d18b8174e22e5.tar.gz tdepim-3a75bdfe83b71ef1dbc2fbf52f2d18b8174e22e5.zip |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kmailcvt/filter_outlook.cpp')
-rw-r--r-- | kmailcvt/filter_outlook.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/kmailcvt/filter_outlook.cpp b/kmailcvt/filter_outlook.cpp new file mode 100644 index 00000000..bb395918 --- /dev/null +++ b/kmailcvt/filter_outlook.cpp @@ -0,0 +1,61 @@ +/*************************************************************************** + filter_opera.cpp - Outlook mail import + ------------------- + begin : February 01 2005 + copyright : (C) 2005 by Danny Kukawka + email : danny.kukawka@web.de + ***************************************************************************/ + +/*************************************************************************** + * * + * This program 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; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include <config.h> +#include <tdelocale.h> +#include <tdefiledialog.h> +#include <tdetempfile.h> +#include <kdebug.h> + +#include "filter_outlook.h" + +FilterOutlook::FilterOutlook() : + Filter( i18n("Import Outlook Emails"), + "Danny Kukawka", + i18n("<p><b>Outlook email import filter</b></p>" + "<p>This filter will import mails from a Outlook pst-file. You will need to locate " + "the folder where the pst-file has been stored by searching for .pst files under: " + "<i>C:\\Documents and Settings</i> in Windows 2000 or later</p>" + "<p><b>Note:</b> Emails will be imported into a folder named after the " + "account they came from, prefixed with OUTLOOK-</p>" )) +{} + +FilterOutlook::~FilterOutlook() +{ +} + +void FilterOutlook::import(FilterInfo *info) +{ + info->alert(i18n("No directory selected.")); + info->addLog(i18n("Counting files...")); + info->addLog(i18n("Counting mail...")); + info->addLog(i18n("Counting directories...")); + info->addLog(i18n("Counting folders...")); + info->addLog(i18n("Importing new mail files...")); + info->addLog(i18n("No files found for import.")); + + TQString outlookDir; + outlookDir = KFileDialog::getExistingDirectory(TQDir::homeDirPath(), info->parent()); + TQDir importDir (outlookDir); + TQStringList files = importDir.entryList("*.[pP][sS][tT]", TQDir::Files, TQDir::Name); + for ( TQStringList::Iterator pstFile = files.begin(); pstFile != files.end(); ++pstFile) { + info->addLog( i18n("Importing emails from %1...").arg( *pstFile ) ); + info->addLog( i18n("1 duplicate message not imported", "%n duplicate messages not imported", count_duplicates)); + info->alert( i18n("Unable to open %1, skipping").arg( *pstFile ) ); + } +} |