-rw-r--r-- | kaddressbook/details/look_html.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kaddressbookE.pro | 6 | ||||
-rw-r--r-- | kaddressbook/xxportmanager.cpp | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp index 2a70273..63364a7 100644 --- a/kaddressbook/details/look_html.cpp +++ b/kaddressbook/details/look_html.cpp | |||
@@ -1,45 +1,45 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressBook. | 2 | This file is part of KAddressBook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <libkdepim/addresseeview.h> | 24 | #include <addresseeview.h> |
25 | 25 | ||
26 | #include "look_html.h" | 26 | #include "look_html.h" |
27 | #include <qscrollview.h> | 27 | #include <qscrollview.h> |
28 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) | 28 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) |
29 | : KABBasicLook( parent, name ) | 29 | : KABBasicLook( parent, name ) |
30 | { | 30 | { |
31 | mView = new KPIM::AddresseeView( this ); | 31 | mView = new KPIM::AddresseeView( this ); |
32 | } | 32 | } |
33 | 33 | ||
34 | KABHtmlView::~KABHtmlView() | 34 | KABHtmlView::~KABHtmlView() |
35 | { | 35 | { |
36 | } | 36 | } |
37 | 37 | ||
38 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) | 38 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) |
39 | { | 39 | { |
40 | mView->setAddressee( addr ); | 40 | mView->setAddressee( addr ); |
41 | } | 41 | } |
42 | 42 | ||
43 | #ifndef KAB_EMBEDDED | 43 | #ifndef KAB_EMBEDDED |
44 | #include "look_html.moc" | 44 | #include "look_html.moc" |
45 | #endif //KAB_EMBEDDED | 45 | #endif //KAB_EMBEDDED |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index f21507a..32dd43a 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1,207 +1,207 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressbook. | 2 | This file is part of KAddressbook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "kabcore.h" | 31 | #include "kabcore.h" |
32 | 32 | ||
33 | #include <stdaddressbook.h> | 33 | #include <stdaddressbook.h> |
34 | #include <klocale.h> | 34 | #include <klocale.h> |
35 | 35 | ||
36 | #ifndef KAB_EMBEDDED | 36 | #ifndef KAB_EMBEDDED |
37 | #include <qclipboard.h> | 37 | #include <qclipboard.h> |
38 | #include <qdir.h> | 38 | #include <qdir.h> |
39 | #include <qfile.h> | 39 | #include <qfile.h> |
40 | #include <qapplicaton.h> | 40 | #include <qapplicaton.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qregexp.h> | 42 | #include <qregexp.h> |
43 | #include <qvbox.h> | 43 | #include <qvbox.h> |
44 | #include <kabc/addresseelist.h> | 44 | #include <kabc/addresseelist.h> |
45 | #include <kabc/errorhandler.h> | 45 | #include <kabc/errorhandler.h> |
46 | #include <kabc/resource.h> | 46 | #include <kabc/resource.h> |
47 | #include <kabc/vcardconverter.h> | 47 | #include <kabc/vcardconverter.h> |
48 | #include <kapplication.h> | 48 | #include <kapplication.h> |
49 | #include <kactionclasses.h> | 49 | #include <kactionclasses.h> |
50 | #include <kcmultidialog.h> | 50 | #include <kcmultidialog.h> |
51 | #include <kdebug.h> | 51 | #include <kdebug.h> |
52 | #include <kdeversion.h> | 52 | #include <kdeversion.h> |
53 | #include <kkeydialog.h> | 53 | #include <kkeydialog.h> |
54 | #include <kmessagebox.h> | 54 | #include <kmessagebox.h> |
55 | #include <kprinter.h> | 55 | #include <kprinter.h> |
56 | #include <kprotocolinfo.h> | 56 | #include <kprotocolinfo.h> |
57 | #include <kresources/selectdialog.h> | 57 | #include <kresources/selectdialog.h> |
58 | #include <kstandarddirs.h> | 58 | #include <kstandarddirs.h> |
59 | #include <ktempfile.h> | 59 | #include <ktempfile.h> |
60 | #include <kxmlguiclient.h> | 60 | #include <kxmlguiclient.h> |
61 | #include <kaboutdata.h> | 61 | #include <kaboutdata.h> |
62 | #include <libkdepim/categoryselectdialog.h> | 62 | #include <libkdepim/categoryselectdialog.h> |
63 | 63 | ||
64 | #include "addresseeutil.h" | 64 | #include "addresseeutil.h" |
65 | #include "addresseeeditordialog.h" | 65 | #include "addresseeeditordialog.h" |
66 | #include "extensionmanager.h" | 66 | #include "extensionmanager.h" |
67 | #include "kstdaction.h" | 67 | #include "kstdaction.h" |
68 | #include "kaddressbookservice.h" | 68 | #include "kaddressbookservice.h" |
69 | #include "ldapsearchdialog.h" | 69 | #include "ldapsearchdialog.h" |
70 | #include "printing/printingwizard.h" | 70 | #include "printing/printingwizard.h" |
71 | #else // KAB_EMBEDDED | 71 | #else // KAB_EMBEDDED |
72 | 72 | ||
73 | #include <kapplication.h> | 73 | #include <kapplication.h> |
74 | #include "KDGanttMinimizeSplitter.h" | 74 | #include "KDGanttMinimizeSplitter.h" |
75 | #include "kaddressbookmain.h" | 75 | #include "kaddressbookmain.h" |
76 | #include "kactioncollection.h" | 76 | #include "kactioncollection.h" |
77 | #include "addresseedialog.h" | 77 | #include "addresseedialog.h" |
78 | //US | 78 | //US |
79 | #include <libkdepim/addresseeview.h> | 79 | #include <addresseeview.h> |
80 | 80 | ||
81 | #include <qapp.h> | 81 | #include <qapp.h> |
82 | #include <qmenubar.h> | 82 | #include <qmenubar.h> |
83 | //#include <qtoolbar.h> | 83 | //#include <qtoolbar.h> |
84 | #include <qmessagebox.h> | 84 | #include <qmessagebox.h> |
85 | #include <kdebug.h> | 85 | #include <kdebug.h> |
86 | #include <kiconloader.h> // needed for SmallIcon | 86 | #include <kiconloader.h> // needed for SmallIcon |
87 | #include <kresources/kcmkresources.h> | 87 | #include <kresources/kcmkresources.h> |
88 | #include <ktoolbar.h> | 88 | #include <ktoolbar.h> |
89 | 89 | ||
90 | 90 | ||
91 | //#include <qlabel.h> | 91 | //#include <qlabel.h> |
92 | 92 | ||
93 | 93 | ||
94 | #ifndef DESKTOP_VERSION | 94 | #ifndef DESKTOP_VERSION |
95 | #include <qpe/ir.h> | 95 | #include <qpe/ir.h> |
96 | #include <qpe/qpemenubar.h> | 96 | #include <qpe/qpemenubar.h> |
97 | #include <qtopia/qcopenvelope_qws.h> | 97 | #include <qtopia/qcopenvelope_qws.h> |
98 | #else | 98 | #else |
99 | 99 | ||
100 | #include <qmenubar.h> | 100 | #include <qmenubar.h> |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | #endif // KAB_EMBEDDED | 103 | #endif // KAB_EMBEDDED |
104 | #include "kcmconfigs/kcmkabconfig.h" | 104 | #include "kcmconfigs/kcmkabconfig.h" |
105 | #include "kcmconfigs/kcmkdepimconfig.h" | 105 | #include "kcmconfigs/kcmkdepimconfig.h" |
106 | #include "kpimglobalprefs.h" | 106 | #include "kpimglobalprefs.h" |
107 | #include "externalapphandler.h" | 107 | #include "externalapphandler.h" |
108 | 108 | ||
109 | 109 | ||
110 | #include <kresources/selectdialog.h> | 110 | #include <kresources/selectdialog.h> |
111 | #include <kmessagebox.h> | 111 | #include <kmessagebox.h> |
112 | 112 | ||
113 | #include <picture.h> | 113 | #include <picture.h> |
114 | #include <resource.h> | 114 | #include <resource.h> |
115 | 115 | ||
116 | //US#include <qsplitter.h> | 116 | //US#include <qsplitter.h> |
117 | #include <qmap.h> | 117 | #include <qmap.h> |
118 | #include <qdir.h> | 118 | #include <qdir.h> |
119 | #include <qfile.h> | 119 | #include <qfile.h> |
120 | #include <qvbox.h> | 120 | #include <qvbox.h> |
121 | #include <qlayout.h> | 121 | #include <qlayout.h> |
122 | #include <qclipboard.h> | 122 | #include <qclipboard.h> |
123 | #include <qtextstream.h> | 123 | #include <qtextstream.h> |
124 | 124 | ||
125 | #include <libkdepim/categoryselectdialog.h> | 125 | #include <libkdepim/categoryselectdialog.h> |
126 | #include <kabc/vcardconverter.h> | 126 | #include <kabc/vcardconverter.h> |
127 | 127 | ||
128 | 128 | ||
129 | #include "addresseeutil.h" | 129 | #include "addresseeutil.h" |
130 | #include "undocmds.h" | 130 | #include "undocmds.h" |
131 | #include "addresseeeditordialog.h" | 131 | #include "addresseeeditordialog.h" |
132 | #include "viewmanager.h" | 132 | #include "viewmanager.h" |
133 | #include "details/detailsviewcontainer.h" | 133 | #include "details/detailsviewcontainer.h" |
134 | #include "kabprefs.h" | 134 | #include "kabprefs.h" |
135 | #include "xxportmanager.h" | 135 | #include "xxportmanager.h" |
136 | #include "incsearchwidget.h" | 136 | #include "incsearchwidget.h" |
137 | #include "jumpbuttonbar.h" | 137 | #include "jumpbuttonbar.h" |
138 | #include "extensionmanager.h" | 138 | #include "extensionmanager.h" |
139 | #include "addresseeconfig.h" | 139 | #include "addresseeconfig.h" |
140 | #include <kcmultidialog.h> | 140 | #include <kcmultidialog.h> |
141 | 141 | ||
142 | #ifdef _WIN32_ | 142 | #ifdef _WIN32_ |
143 | 143 | ||
144 | #include "kaimportoldialog.h" | 144 | #include "kaimportoldialog.h" |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | bool pasteWithNewUid = true; | 147 | bool pasteWithNewUid = true; |
148 | 148 | ||
149 | #ifdef KAB_EMBEDDED | 149 | #ifdef KAB_EMBEDDED |
150 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) | 150 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) |
151 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), | 151 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), |
152 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ | 152 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ |
153 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) | 153 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) |
154 | #else //KAB_EMBEDDED | 154 | #else //KAB_EMBEDDED |
155 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) | 155 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) |
156 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), | 156 | : QWidget( parent, name ), mGUIClient( client ), mViewManager( 0 ), |
157 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), | 157 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), |
158 | mReadWrite( readWrite ), mModified( false ) | 158 | mReadWrite( readWrite ), mModified( false ) |
159 | #endif //KAB_EMBEDDED | 159 | #endif //KAB_EMBEDDED |
160 | { | 160 | { |
161 | 161 | ||
162 | mExtensionBarSplitter = 0; | 162 | mExtensionBarSplitter = 0; |
163 | mIsPart = !parent->inherits( "KAddressBookMain" ); | 163 | mIsPart = !parent->inherits( "KAddressBookMain" ); |
164 | 164 | ||
165 | mAddressBook = KABC::StdAddressBook::self(); | 165 | mAddressBook = KABC::StdAddressBook::self(); |
166 | KABC::StdAddressBook::setAutomaticSave( false ); | 166 | KABC::StdAddressBook::setAutomaticSave( false ); |
167 | 167 | ||
168 | #ifndef KAB_EMBEDDED | 168 | #ifndef KAB_EMBEDDED |
169 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); | 169 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); |
170 | #endif //KAB_EMBEDDED | 170 | #endif //KAB_EMBEDDED |
171 | 171 | ||
172 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), | 172 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), |
173 | SLOT( addressBookChanged() ) ); | 173 | SLOT( addressBookChanged() ) ); |
174 | 174 | ||
175 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, | 175 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, |
176 | "X-Department", "KADDRESSBOOK" ); | 176 | "X-Department", "KADDRESSBOOK" ); |
177 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, | 177 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, |
178 | "X-Profession", "KADDRESSBOOK" ); | 178 | "X-Profession", "KADDRESSBOOK" ); |
179 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, | 179 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, |
180 | "X-AssistantsName", "KADDRESSBOOK" ); | 180 | "X-AssistantsName", "KADDRESSBOOK" ); |
181 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, | 181 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, |
182 | "X-ManagersName", "KADDRESSBOOK" ); | 182 | "X-ManagersName", "KADDRESSBOOK" ); |
183 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, | 183 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, |
184 | "X-SpousesName", "KADDRESSBOOK" ); | 184 | "X-SpousesName", "KADDRESSBOOK" ); |
185 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, | 185 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, |
186 | "X-Office", "KADDRESSBOOK" ); | 186 | "X-Office", "KADDRESSBOOK" ); |
187 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, | 187 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, |
188 | "X-IMAddress", "KADDRESSBOOK" ); | 188 | "X-IMAddress", "KADDRESSBOOK" ); |
189 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, | 189 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, |
190 | "X-Anniversary", "KADDRESSBOOK" ); | 190 | "X-Anniversary", "KADDRESSBOOK" ); |
191 | 191 | ||
192 | //US added this field to become compatible with Opie/qtopia addressbook | 192 | //US added this field to become compatible with Opie/qtopia addressbook |
193 | // values can be "female" or "male" or "". An empty field represents undefined. | 193 | // values can be "female" or "male" or "". An empty field represents undefined. |
194 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, | 194 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, |
195 | "X-Gender", "KADDRESSBOOK" ); | 195 | "X-Gender", "KADDRESSBOOK" ); |
196 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, | 196 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, |
197 | "X-Children", "KADDRESSBOOK" ); | 197 | "X-Children", "KADDRESSBOOK" ); |
198 | mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, | 198 | mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, |
199 | "X-FreeBusyUrl", "KADDRESSBOOK" ); | 199 | "X-FreeBusyUrl", "KADDRESSBOOK" ); |
200 | 200 | ||
201 | initGUI(); | 201 | initGUI(); |
202 | 202 | ||
203 | mIncSearchWidget->setFocus(); | 203 | mIncSearchWidget->setFocus(); |
204 | 204 | ||
205 | 205 | ||
206 | connect( mViewManager, SIGNAL( selected( const QString& ) ), | 206 | connect( mViewManager, SIGNAL( selected( const QString& ) ), |
207 | SLOT( setContactSelected( const QString& ) ) ); | 207 | SLOT( setContactSelected( const QString& ) ) ); |
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro index 1c9eeef..c027895 100644 --- a/kaddressbook/kaddressbookE.pro +++ b/kaddressbook/kaddressbookE.pro | |||
@@ -1,152 +1,154 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG += qt warn_on | 2 | CONFIG += qt warn_on |
3 | 3 | ||
4 | 4 | ||
5 | TARGET = kapi | 5 | TARGET = kapi |
6 | OBJECTS_DIR = obj/$(PLATFORM) | 6 | OBJECTS_DIR = obj/$(PLATFORM) |
7 | MOC_DIR = moc/$(PLATFORM) | 7 | MOC_DIR = moc/$(PLATFORM) |
8 | DESTDIR=$(QPEDIR)/bin | 8 | DESTDIR=$(QPEDIR)/bin |
9 | 9 | ||
10 | INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../qtcompat ../ interfaces $(QPEDIR)/include | 10 | INCLUDEPATH += . ./details ./features ./xxport ../libkdepim ../microkde ../microkde/kdecore ../microkde/kutils ../microkde/kio/kfile ../microkde/kio/kio ../microkde/kdeui ../microkde/kresources ../kabc ../qtcompat ../ interfaces $(QPEDIR)/include |
11 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER | 11 | DEFINES += KAB_EMBEDDED KAB_NOSPLITTER |
12 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL | 12 | #DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL |
13 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER | 13 | #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER |
14 | #DEFINES += KORG_NOLVALTERNATION | 14 | #DEFINES += KORG_NOLVALTERNATION |
15 | LIBS += -lmicrokdepim | 15 | #LIBS += -lmicrokdepim |
16 | LIBS += -lmicrokcal | 16 | #LIBS += -lmicrokcal |
17 | LIBS += -lmicrokde | 17 | LIBS += -lmicrokde |
18 | LIBS += -lmicroqtcompat | 18 | LIBS += -lmicroqtcompat |
19 | LIBS += -lmicrokabc | 19 | LIBS += -lmicrokabc |
20 | LIBS += -lqpe | 20 | LIBS += -lqpe |
21 | LIBS += -ljpeg | 21 | LIBS += -ljpeg |
22 | LIBS += $(QTOPIALIB) | 22 | LIBS += $(QTOPIALIB) |
23 | LIBS += -L$(QPEDIR)/lib | 23 | LIBS += -L$(QPEDIR)/lib |
24 | LIBS += -Wl,-export-dynamic | 24 | LIBS += -Wl,-export-dynamic |
25 | LIBS += $(GCC3EXTRALIB1) | ||
26 | LIBS += $(GCC3EXTRALIB2) | ||
25 | 27 | ||
26 | INTERFACES = \ | 28 | INTERFACES = \ |
27 | # filteredit_base.ui \ | 29 | # filteredit_base.ui \ |
28 | # kofilterview_base.ui \ | 30 | # kofilterview_base.ui \ |
29 | 31 | ||
30 | HEADERS = \ | 32 | HEADERS = \ |
31 | features/mergewidget.h \ | 33 | features/mergewidget.h \ |
32 | features/distributionlistwidget.h \ | 34 | features/distributionlistwidget.h \ |
33 | kcmconfigs/addresseewidget.h \ | 35 | kcmconfigs/addresseewidget.h \ |
34 | kcmconfigs/extensionconfigdialog.h \ | 36 | kcmconfigs/extensionconfigdialog.h \ |
35 | kcmconfigs/kcmkabconfig.h \ | 37 | kcmconfigs/kcmkabconfig.h \ |
36 | kcmconfigs/kabconfigwidget.h \ | 38 | kcmconfigs/kabconfigwidget.h \ |
37 | addresseeeditordialog.h \ | 39 | addresseeeditordialog.h \ |
38 | addresseeeditorwidget.h \ | 40 | addresseeeditorwidget.h \ |
39 | addresseditwidget.h \ | 41 | addresseditwidget.h \ |
40 | addresseeconfig.h \ | 42 | addresseeconfig.h \ |
41 | addresseeutil.h \ | 43 | addresseeutil.h \ |
42 | emaileditwidget.h \ | 44 | emaileditwidget.h \ |
43 | filtereditdialog.h \ | 45 | filtereditdialog.h \ |
44 | kaddressbookmain.h \ | 46 | kaddressbookmain.h \ |
45 | kabprefs.h \ | 47 | kabprefs.h \ |
46 | kabcore.h \ | 48 | kabcore.h \ |
47 | viewmanager.h \ | 49 | viewmanager.h \ |
48 | extensionmanager.h \ | 50 | extensionmanager.h \ |
49 | extensionwidget.h \ | 51 | extensionwidget.h \ |
50 | kaddressbookview.h \ | 52 | kaddressbookview.h \ |
51 | geowidget.h \ | 53 | geowidget.h \ |
52 | imagewidget.h \ | 54 | imagewidget.h \ |
53 | incsearchwidget.h \ | 55 | incsearchwidget.h \ |
54 | jumpbuttonbar.h \ | 56 | jumpbuttonbar.h \ |
55 | phoneeditwidget.h \ | 57 | phoneeditwidget.h \ |
56 | secrecywidget.h \ | 58 | secrecywidget.h \ |
57 | keywidget.h \ | 59 | keywidget.h \ |
58 | nameeditdialog.h \ | 60 | nameeditdialog.h \ |
59 | filter.h \ | 61 | filter.h \ |
60 | addviewdialog.h \ | 62 | addviewdialog.h \ |
61 | configurewidget.h \ | 63 | configurewidget.h \ |
62 | viewconfigurewidget.h \ | 64 | viewconfigurewidget.h \ |
63 | viewconfigurefieldspage.h \ | 65 | viewconfigurefieldspage.h \ |
64 | viewconfigurefilterpage.h \ | 66 | viewconfigurefilterpage.h \ |
65 | typecombo.h \ | 67 | typecombo.h \ |
66 | undo.h \ | 68 | undo.h \ |
67 | undocmds.h \ | 69 | undocmds.h \ |
68 | xxportmanager.h \ | 70 | xxportmanager.h \ |
69 | xxportobject.h \ | 71 | xxportobject.h \ |
70 | xxportselectdialog.h \ | 72 | xxportselectdialog.h \ |
71 | details/detailsviewcontainer.h \ | 73 | details/detailsviewcontainer.h \ |
72 | details/look_basic.h \ | 74 | details/look_basic.h \ |
73 | details/look_html.h \ | 75 | details/look_html.h \ |
74 | views/kaddressbookiconview.h \ | 76 | views/kaddressbookiconview.h \ |
75 | views/kaddressbooktableview.h \ | 77 | views/kaddressbooktableview.h \ |
76 | views/kaddressbookcardview.h \ | 78 | views/kaddressbookcardview.h \ |
77 | views/configuretableviewdialog.h \ | 79 | views/configuretableviewdialog.h \ |
78 | views/configurecardviewdialog.h \ | 80 | views/configurecardviewdialog.h \ |
79 | views/cardview.h \ | 81 | views/cardview.h \ |
80 | views/colorlistbox.h \ | 82 | views/colorlistbox.h \ |
81 | views/contactlistview.h \ | 83 | views/contactlistview.h \ |
82 | xxport/vcard_xxport.h \ | 84 | xxport/vcard_xxport.h \ |
83 | xxport/kde2_xxport.h \ | 85 | xxport/kde2_xxport.h \ |
84 | xxport/csv_xxport.h \ | 86 | xxport/csv_xxport.h \ |
85 | xxport/csvimportdialog.h \ | 87 | xxport/csvimportdialog.h \ |
86 | xxport/opie_xxport.h \ | 88 | xxport/opie_xxport.h \ |
87 | xxport/qtopia_xxport.h \ | 89 | xxport/qtopia_xxport.h \ |
88 | xxport/sharpdtm_xxport.h \ | 90 | xxport/sharpdtm_xxport.h \ |
89 | #details/look_details.h \ | 91 | #details/look_details.h \ |
90 | #mainwindoiw.h \ | 92 | #mainwindoiw.h \ |
91 | # alarmclient.h \ | 93 | # alarmclient.h \ |
92 | # calendarview.h \ | 94 | # calendarview.h \ |
93 | # customlistviewitem.h \ | 95 | # customlistviewitem.h \ |
94 | # datenavigator.h | 96 | # datenavigator.h |
95 | 97 | ||
96 | SOURCES = \ | 98 | SOURCES = \ |
97 | addresseeeditordialog.cpp \ | 99 | addresseeeditordialog.cpp \ |
98 | addresseeeditorwidget.cpp \ | 100 | addresseeeditorwidget.cpp \ |
99 | addresseditwidget.cpp \ | 101 | addresseditwidget.cpp \ |
100 | addresseeconfig.cpp \ | 102 | addresseeconfig.cpp \ |
101 | addresseeutil.cpp \ | 103 | addresseeutil.cpp \ |
102 | extensionmanager.cpp \ | 104 | extensionmanager.cpp \ |
103 | features/mergewidget.cpp \ | 105 | features/mergewidget.cpp \ |
104 | features/distributionlistwidget.cpp \ | 106 | features/distributionlistwidget.cpp \ |
105 | kcmconfigs/addresseewidget.cpp \ | 107 | kcmconfigs/addresseewidget.cpp \ |
106 | kcmconfigs/extensionconfigdialog.cpp \ | 108 | kcmconfigs/extensionconfigdialog.cpp \ |
107 | kcmconfigs/kcmkabconfig.cpp \ | 109 | kcmconfigs/kcmkabconfig.cpp \ |
108 | kcmconfigs/kabconfigwidget.cpp \ | 110 | kcmconfigs/kabconfigwidget.cpp \ |
109 | emaileditwidget.cpp \ | 111 | emaileditwidget.cpp \ |
110 | filtereditdialog.cpp \ | 112 | filtereditdialog.cpp \ |
111 | mainembedded.cpp \ | 113 | mainembedded.cpp \ |
112 | kaddressbookmain.cpp \ | 114 | kaddressbookmain.cpp \ |
113 | kabcore.cpp \ | 115 | kabcore.cpp \ |
114 | kabprefs.cpp \ | 116 | kabprefs.cpp \ |
115 | viewmanager.cpp \ | 117 | viewmanager.cpp \ |
116 | kaddressbookview.cpp \ | 118 | kaddressbookview.cpp \ |
117 | extensionwidget.cpp \ | 119 | extensionwidget.cpp \ |
118 | geowidget.cpp \ | 120 | geowidget.cpp \ |
119 | imagewidget.cpp \ | 121 | imagewidget.cpp \ |
120 | incsearchwidget.cpp \ | 122 | incsearchwidget.cpp \ |
121 | jumpbuttonbar.cpp \ | 123 | jumpbuttonbar.cpp \ |
122 | phoneeditwidget.cpp \ | 124 | phoneeditwidget.cpp \ |
123 | secrecywidget.cpp \ | 125 | secrecywidget.cpp \ |
124 | keywidget.cpp \ | 126 | keywidget.cpp \ |
125 | nameeditdialog.cpp \ | 127 | nameeditdialog.cpp \ |
126 | filter.cpp \ | 128 | filter.cpp \ |
127 | addviewdialog.cpp \ | 129 | addviewdialog.cpp \ |
128 | configurewidget.cpp \ | 130 | configurewidget.cpp \ |
129 | viewconfigurewidget.cpp \ | 131 | viewconfigurewidget.cpp \ |
130 | viewconfigurefieldspage.cpp \ | 132 | viewconfigurefieldspage.cpp \ |
131 | viewconfigurefilterpage.cpp \ | 133 | viewconfigurefilterpage.cpp \ |
132 | undo.cpp \ | 134 | undo.cpp \ |
133 | undocmds.cpp \ | 135 | undocmds.cpp \ |
134 | xxportmanager.cpp \ | 136 | xxportmanager.cpp \ |
135 | xxportobject.cpp \ | 137 | xxportobject.cpp \ |
136 | xxportselectdialog.cpp \ | 138 | xxportselectdialog.cpp \ |
137 | details/detailsviewcontainer.cpp \ | 139 | details/detailsviewcontainer.cpp \ |
138 | details/look_basic.cpp \ | 140 | details/look_basic.cpp \ |
139 | details/look_html.cpp \ | 141 | details/look_html.cpp \ |
140 | views/kaddressbookiconview.cpp \ | 142 | views/kaddressbookiconview.cpp \ |
141 | views/kaddressbooktableview.cpp \ | 143 | views/kaddressbooktableview.cpp \ |
142 | views/kaddressbookcardview.cpp \ | 144 | views/kaddressbookcardview.cpp \ |
143 | views/configuretableviewdialog.cpp \ | 145 | views/configuretableviewdialog.cpp \ |
144 | views/configurecardviewdialog.cpp \ | 146 | views/configurecardviewdialog.cpp \ |
145 | views/cardview.cpp \ | 147 | views/cardview.cpp \ |
146 | views/contactlistview.cpp \ | 148 | views/contactlistview.cpp \ |
147 | views/colorlistbox.cpp \ | 149 | views/colorlistbox.cpp \ |
148 | xxport/vcard_xxport.cpp \ | 150 | xxport/vcard_xxport.cpp \ |
149 | xxport/kde2_xxport.cpp \ | 151 | xxport/kde2_xxport.cpp \ |
150 | xxport/csv_xxport.cpp \ | 152 | xxport/csv_xxport.cpp \ |
151 | xxport/csvimportdialog.cpp \ | 153 | xxport/csvimportdialog.cpp \ |
152 | xxport/opie_xxport.cpp \ | 154 | xxport/opie_xxport.cpp \ |
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 713b0fc..810c3e2 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp | |||
@@ -1,183 +1,183 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressbook. | 2 | This file is part of KAddressbook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qlist.h> | 32 | #include <qlist.h> |
33 | 33 | ||
34 | #include <kabc/addressbook.h> | 34 | #include <kabc/addressbook.h> |
35 | #include <kabc/resource.h> | 35 | #include <kabc/resource.h> |
36 | #include <kdebug.h> | 36 | #include <kdebug.h> |
37 | #include <kdialogbase.h> | 37 | #include <kdialogbase.h> |
38 | #include <klocale.h> | 38 | #include <klocale.h> |
39 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> |
40 | 40 | ||
41 | #ifndef KAB_EMBEDDED | 41 | #ifndef KAB_EMBEDDED |
42 | #include <ktrader.h> | 42 | #include <ktrader.h> |
43 | #else //KAB_EMBEDDED | 43 | #else //KAB_EMBEDDED |
44 | extern "C" | 44 | extern "C" |
45 | { | 45 | { |
46 | void* init_microkaddrbk_csv_xxport(); | 46 | void* init_microkaddrbk_csv_xxport(); |
47 | void* init_microkaddrbk_kde2_xxport(); | 47 | void* init_microkaddrbk_kde2_xxport(); |
48 | void* init_microkaddrbk_vcard_xxport(); | 48 | void* init_microkaddrbk_vcard_xxport(); |
49 | void* init_microkaddrbk_opie_xxport(); | 49 | void* init_microkaddrbk_opie_xxport(); |
50 | void* init_microkaddrbk_qtopia_xxport(); | 50 | void* init_microkaddrbk_qtopia_xxport(); |
51 | void* init_microkaddrbk_sharpdtm_xxport(); | 51 | void* init_microkaddrbk_sharpdtm_xxport(); |
52 | } | 52 | } |
53 | #endif //KAB_EMBEDDED | 53 | #endif //KAB_EMBEDDED |
54 | 54 | ||
55 | #include <libkdepim/addresseeview.h> | 55 | #include <addresseeview.h> |
56 | 56 | ||
57 | #include "kabcore.h" | 57 | #include "kabcore.h" |
58 | #include "undocmds.h" | 58 | #include "undocmds.h" |
59 | #include "xxportselectdialog.h" | 59 | #include "xxportselectdialog.h" |
60 | 60 | ||
61 | #include "xxportmanager.h" | 61 | #include "xxportmanager.h" |
62 | 62 | ||
63 | KURL XXPortManager::importURL = KURL(); | 63 | KURL XXPortManager::importURL = KURL(); |
64 | QString XXPortManager::importData = QString::null; | 64 | QString XXPortManager::importData = QString::null; |
65 | 65 | ||
66 | class PreviewDialog : public KDialogBase | 66 | class PreviewDialog : public KDialogBase |
67 | { | 67 | { |
68 | public: | 68 | public: |
69 | PreviewDialog( const KABC::Addressee &addr, | 69 | PreviewDialog( const KABC::Addressee &addr, |
70 | QWidget *parent, const char *name = 0 ); | 70 | QWidget *parent, const char *name = 0 ); |
71 | }; | 71 | }; |
72 | 72 | ||
73 | XXPortManager::XXPortManager( KABCore *core, QObject *parent, const char *name ) | 73 | XXPortManager::XXPortManager( KABCore *core, QObject *parent, const char *name ) |
74 | : QObject( parent, name ), mCore( core ), mShowPreview( false ) | 74 | : QObject( parent, name ), mCore( core ), mShowPreview( false ) |
75 | { | 75 | { |
76 | loadPlugins(); | 76 | loadPlugins(); |
77 | } | 77 | } |
78 | 78 | ||
79 | XXPortManager::~XXPortManager() | 79 | XXPortManager::~XXPortManager() |
80 | { | 80 | { |
81 | } | 81 | } |
82 | 82 | ||
83 | void XXPortManager::restoreSettings() | 83 | void XXPortManager::restoreSettings() |
84 | { | 84 | { |
85 | } | 85 | } |
86 | 86 | ||
87 | void XXPortManager::saveSettings() | 87 | void XXPortManager::saveSettings() |
88 | { | 88 | { |
89 | } | 89 | } |
90 | 90 | ||
91 | void XXPortManager::importVCard( const KURL &url ) | 91 | void XXPortManager::importVCard( const KURL &url ) |
92 | { | 92 | { |
93 | importVCard( url, false ); | 93 | importVCard( url, false ); |
94 | } | 94 | } |
95 | 95 | ||
96 | void XXPortManager::importVCard( const KURL &url, bool showPreview ) | 96 | void XXPortManager::importVCard( const KURL &url, bool showPreview ) |
97 | { | 97 | { |
98 | importURL = url; | 98 | importURL = url; |
99 | mShowPreview = showPreview; | 99 | mShowPreview = showPreview; |
100 | slotImport( "vcard", "<empty>" ); | 100 | slotImport( "vcard", "<empty>" ); |
101 | mShowPreview = false; | 101 | mShowPreview = false; |
102 | importURL = KURL(); | 102 | importURL = KURL(); |
103 | } | 103 | } |
104 | 104 | ||
105 | void XXPortManager::importVCard( const QString &vCard, bool showPreview ) | 105 | void XXPortManager::importVCard( const QString &vCard, bool showPreview ) |
106 | { | 106 | { |
107 | importData = vCard; | 107 | importData = vCard; |
108 | mShowPreview = showPreview; | 108 | mShowPreview = showPreview; |
109 | slotImport( "vcard", "<empty>" ); | 109 | slotImport( "vcard", "<empty>" ); |
110 | mShowPreview = false; | 110 | mShowPreview = false; |
111 | importData = ""; | 111 | importData = ""; |
112 | } | 112 | } |
113 | 113 | ||
114 | void XXPortManager::slotImport( const QString &identifier, const QString &data ) | 114 | void XXPortManager::slotImport( const QString &identifier, const QString &data ) |
115 | { | 115 | { |
116 | XXPortObject *obj = mXXPortObjects[ identifier ]; | 116 | XXPortObject *obj = mXXPortObjects[ identifier ]; |
117 | if ( !obj ) { | 117 | if ( !obj ) { |
118 | KMessageBox::error( mCore, i18n( "<qt>No import plugin available for <b>%1</b>.</qt>" ).arg( identifier ) ); | 118 | KMessageBox::error( mCore, i18n( "<qt>No import plugin available for <b>%1</b>.</qt>" ).arg( identifier ) ); |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | 121 | ||
122 | KABC::Resource *resource = mCore->requestResource( mCore ); | 122 | KABC::Resource *resource = mCore->requestResource( mCore ); |
123 | if ( !resource ) | 123 | if ( !resource ) |
124 | return; | 124 | return; |
125 | 125 | ||
126 | KABC::AddresseeList list = obj->importContacts( data ); | 126 | KABC::AddresseeList list = obj->importContacts( data ); |
127 | KABC::AddresseeList::Iterator it; | 127 | KABC::AddresseeList::Iterator it; |
128 | bool imported = false; | 128 | bool imported = false; |
129 | for ( it = list.begin(); it != list.end(); ++it ) { | 129 | for ( it = list.begin(); it != list.end(); ++it ) { |
130 | if ( mShowPreview ) { | 130 | if ( mShowPreview ) { |
131 | PreviewDialog dlg( *it, mCore ); | 131 | PreviewDialog dlg( *it, mCore ); |
132 | if ( !dlg.exec() ) | 132 | if ( !dlg.exec() ) |
133 | continue; | 133 | continue; |
134 | } | 134 | } |
135 | 135 | ||
136 | (*it).setResource( resource ); | 136 | (*it).setResource( resource ); |
137 | // We use a PwNewCommand so the user can undo it. | 137 | // We use a PwNewCommand so the user can undo it. |
138 | PwNewCommand *command = new PwNewCommand( mCore->addressBook(), *it ); | 138 | PwNewCommand *command = new PwNewCommand( mCore->addressBook(), *it ); |
139 | UndoStack::instance()->push( command ); | 139 | UndoStack::instance()->push( command ); |
140 | RedoStack::instance()->clear(); | 140 | RedoStack::instance()->clear(); |
141 | imported = true; | 141 | imported = true; |
142 | } | 142 | } |
143 | 143 | ||
144 | if ( imported ) { | 144 | if ( imported ) { |
145 | KMessageBox::information( mCore, i18n( "contacts successfully imported." ) ); | 145 | KMessageBox::information( mCore, i18n( "contacts successfully imported." ) ); |
146 | 146 | ||
147 | emit modified(); | 147 | emit modified(); |
148 | } | 148 | } |
149 | } | 149 | } |
150 | 150 | ||
151 | void XXPortManager::slotExport( const QString &identifier, const QString &data ) | 151 | void XXPortManager::slotExport( const QString &identifier, const QString &data ) |
152 | { | 152 | { |
153 | XXPortObject *obj = mXXPortObjects[ identifier ]; | 153 | XXPortObject *obj = mXXPortObjects[ identifier ]; |
154 | if ( !obj ) { | 154 | if ( !obj ) { |
155 | KMessageBox::error( mCore, i18n( "<qt>No export plugin available for <b>%1</b>.</qt>" ).arg( identifier ) ); | 155 | KMessageBox::error( mCore, i18n( "<qt>No export plugin available for <b>%1</b>.</qt>" ).arg( identifier ) ); |
156 | return; | 156 | return; |
157 | } | 157 | } |
158 | 158 | ||
159 | KABC::AddresseeList addrList; | 159 | KABC::AddresseeList addrList; |
160 | XXPortSelectDialog dlg( mCore, obj->requiresSorting(), mCore ); | 160 | XXPortSelectDialog dlg( mCore, obj->requiresSorting(), mCore ); |
161 | if ( dlg.exec() ) | 161 | if ( dlg.exec() ) |
162 | addrList = dlg.contacts(); | 162 | addrList = dlg.contacts(); |
163 | else | 163 | else |
164 | return; | 164 | return; |
165 | 165 | ||
166 | if ( !obj->exportContacts( addrList, data ) ) | 166 | if ( !obj->exportContacts( addrList, data ) ) |
167 | KMessageBox::error( mCore, i18n( "Unable to export contacts." ) ); | 167 | KMessageBox::error( mCore, i18n( "Unable to export contacts." ) ); |
168 | else | 168 | else |
169 | KMessageBox::information( mCore, i18n( "contacts successfully exported." ) ); | 169 | KMessageBox::information( mCore, i18n( "contacts successfully exported." ) ); |
170 | } | 170 | } |
171 | 171 | ||
172 | void XXPortManager::loadPlugins() | 172 | void XXPortManager::loadPlugins() |
173 | { | 173 | { |
174 | mXXPortObjects.clear(); | 174 | mXXPortObjects.clear(); |
175 | 175 | ||
176 | #ifndef KAB_EMBEDDED | 176 | #ifndef KAB_EMBEDDED |
177 | KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort" ); | 177 | KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort" ); |
178 | KTrader::OfferList::ConstIterator it; | 178 | KTrader::OfferList::ConstIterator it; |
179 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { | 179 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { |
180 | if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) | 180 | if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) |
181 | continue; | 181 | continue; |
182 | 182 | ||
183 | KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() ); | 183 | KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() ); |