From 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmailcvt/filter_outlook.cxx | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 kmailcvt/filter_outlook.cxx (limited to 'kmailcvt/filter_outlook.cxx') diff --git a/kmailcvt/filter_outlook.cxx b/kmailcvt/filter_outlook.cxx new file mode 100644 index 00000000..e9c53a82 --- /dev/null +++ b/kmailcvt/filter_outlook.cxx @@ -0,0 +1,62 @@ +/*************************************************************************** + filter_opera.cxx - 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 +#include +#include +#include +#include + +#include "filter_outlook.hxx" + +FilterOutlook::FilterOutlook() : + Filter( i18n("Import Outlook Emails"), + "Danny Kukawka", + i18n("

Outlook email import filter

" + "

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: " + "C:\\Documents and Settings in Windows 2000 or later

" + "

Note: Emails will be imported into a folder named after the " + "account they came from, prefixed with OUTLOOK-

" )) +{} + +FilterOutlook::~FilterOutlook() +{ + endImport(); +} + +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.")); + + QString outlookDir; + outlookDir = KFileDialog::getExistingDirectory(QDir::homeDirPath(), info->parent()); + QDir importDir (outlookDir); + QStringList files = importDir.entryList("*.[pP][sS][tT]", QDir::Files, QDir::Name); + for ( QStringList::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 ) ); + } +} -- cgit v1.2.3