-rw-r--r-- | kaddressbook/kabcore.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 7e3fc7c..f4263c4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -109,8 +109,13 @@ | |||
109 | #include "extensionmanager.h" | 109 | #include "extensionmanager.h" |
110 | #include "addresseeconfig.h" | 110 | #include "addresseeconfig.h" |
111 | #include <kcmultidialog.h> | 111 | #include <kcmultidialog.h> |
112 | 112 | ||
113 | #ifdef _WIN32_ | ||
114 | |||
115 | #include "kaimportoldialog.h" | ||
116 | #endif | ||
117 | |||
113 | 118 | ||
114 | #ifdef KAB_EMBEDDED | 119 | #ifdef KAB_EMBEDDED |
115 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) | 120 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) |
116 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), | 121 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), |
@@ -161,8 +166,10 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
161 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, | 166 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, |
162 | "X-Gender", "KADDRESSBOOK" ); | 167 | "X-Gender", "KADDRESSBOOK" ); |
163 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, | 168 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, |
164 | "X-Children", "KADDRESSBOOK" ); | 169 | "X-Children", "KADDRESSBOOK" ); |
170 | mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, | ||
171 | "X-FreeBusyUrl", "KADDRESSBOOK" ); | ||
165 | 172 | ||
166 | initGUI(); | 173 | initGUI(); |
167 | 174 | ||
168 | mIncSearchWidget->setFocus(); | 175 | mIncSearchWidget->setFocus(); |
@@ -840,8 +847,19 @@ void KABCore::addEmail( QString aStr ) | |||
840 | void KABCore::importVCard( const KURL &url, bool showPreview ) | 847 | void KABCore::importVCard( const KURL &url, bool showPreview ) |
841 | { | 848 | { |
842 | mXXPortManager->importVCard( url, showPreview ); | 849 | mXXPortManager->importVCard( url, showPreview ); |
843 | } | 850 | } |
851 | void KABCore::importFromOL() | ||
852 | { | ||
853 | #ifdef _WIN32_ | ||
854 | KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); | ||
855 | idgl->exec(); | ||
856 | KABC::Addressee::List list = idgl->getAddressList(); | ||
857 | if ( list.count() > 0 ) | ||
858 | pasteContacts( list ); | ||
859 | delete idgl; | ||
860 | #endif | ||
861 | } | ||
844 | 862 | ||
845 | void KABCore::importVCard( const QString &vCard, bool showPreview ) | 863 | void KABCore::importVCard( const QString &vCard, bool showPreview ) |
846 | { | 864 | { |
847 | mXXPortManager->importVCard( vCard, showPreview ); | 865 | mXXPortManager->importVCard( vCard, showPreview ); |
@@ -1396,8 +1414,11 @@ void KABCore::initActions() | |||
1396 | 1414 | ||
1397 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 1415 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
1398 | SLOT( removeVoice() ), actionCollection(), | 1416 | SLOT( removeVoice() ), actionCollection(), |
1399 | "remove_voice" ); | 1417 | "remove_voice" ); |
1418 | mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this, | ||
1419 | SLOT( importFromOL() ), actionCollection(), | ||
1420 | "import_OL" ); | ||
1400 | #ifdef KAB_EMBEDDED | 1421 | #ifdef KAB_EMBEDDED |
1401 | 1422 | ||
1402 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 1423 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
1403 | this, SLOT( createAboutData() ), actionCollection(), | 1424 | this, SLOT( createAboutData() ), actionCollection(), |
@@ -1476,10 +1497,11 @@ void KABCore::addActionsManually() | |||
1476 | fileMenu->insertSeparator(); | 1497 | fileMenu->insertSeparator(); |
1477 | mActionMailVCard->plug( fileMenu ); | 1498 | mActionMailVCard->plug( fileMenu ); |
1478 | fileMenu->insertSeparator(); | 1499 | fileMenu->insertSeparator(); |
1479 | mActionQuit->plug( fileMenu ); | 1500 | mActionQuit->plug( fileMenu ); |
1480 | 1501 | #ifdef _WIN32_ | |
1481 | 1502 | mActionImportOL->plug( ImportMenu ); | |
1503 | #endif | ||
1482 | // edit menu | 1504 | // edit menu |
1483 | mActionUndo->plug( editMenu ); | 1505 | mActionUndo->plug( editMenu ); |
1484 | mActionRedo->plug( editMenu ); | 1506 | mActionRedo->plug( editMenu ); |
1485 | editMenu->insertSeparator(); | 1507 | editMenu->insertSeparator(); |