author | zautrix <zautrix> | 2005-08-23 14:22:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-23 14:22:11 (UTC) |
commit | e6d678229580cd712ff82ea989e7b151be546dbd (patch) (unidiff) | |
tree | 1cf32674db62993bcdc636d90b3994e9343a8b5f | |
parent | 02fa432f183ad2b18380de0e41399efe3b867dba (diff) | |
download | kdepimpi-e6d678229580cd712ff82ea989e7b151be546dbd.zip kdepimpi-e6d678229580cd712ff82ea989e7b151be546dbd.tar.gz kdepimpi-e6d678229580cd712ff82ea989e7b151be546dbd.tar.bz2 |
stdab fix
-rw-r--r-- | kabc/stdaddressbook.cpp | 27 | ||||
-rw-r--r-- | kabc/stdaddressbook.h | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
3 files changed, 27 insertions, 4 deletions
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp index a14ae20..43d9fde 100644 --- a/kabc/stdaddressbook.cpp +++ b/kabc/stdaddressbook.cpp | |||
@@ -27,130 +27,151 @@ $Id$ | |||
27 | 27 | ||
28 | #include <qdir.h> | 28 | #include <qdir.h> |
29 | #include "resource.h" | 29 | #include "resource.h" |
30 | #include <kresources/manager.h> | 30 | #include <kresources/manager.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <klocale.h> | 32 | #include <klocale.h> |
33 | #include <kstaticdeleter.h> | 33 | #include <kstaticdeleter.h> |
34 | #include <kstandarddirs.h> | 34 | #include <kstandarddirs.h> |
35 | 35 | ||
36 | #include "stdaddressbook.h" | 36 | #include "stdaddressbook.h" |
37 | 37 | ||
38 | using namespace KABC; | 38 | using namespace KABC; |
39 | 39 | ||
40 | StdAddressBook *StdAddressBook::mSelf = 0; | 40 | StdAddressBook *StdAddressBook::mSelf = 0; |
41 | bool StdAddressBook::mAutomaticSave = false; | 41 | bool StdAddressBook::mAutomaticSave = false; |
42 | 42 | ||
43 | static KStaticDeleter<StdAddressBook> addressBookDeleter; | 43 | static KStaticDeleter<StdAddressBook> addressBookDeleter; |
44 | 44 | ||
45 | QString StdAddressBook::fileName() | 45 | QString StdAddressBook::fileName() |
46 | { | 46 | { |
47 | return locateLocal( "data", "kabc/std.vcf" ); | 47 | return locateLocal( "data", "kabc/std.vcf" ); |
48 | } | 48 | } |
49 | 49 | ||
50 | QString StdAddressBook::directoryName() | 50 | QString StdAddressBook::directoryName() |
51 | { | 51 | { |
52 | return locateLocal( "data", "kabc/stdvcf" ); | 52 | return locateLocal( "data", "kabc/stdvcf" ); |
53 | } | 53 | } |
54 | 54 | ||
55 | void StdAddressBook::handleCrash() | 55 | void StdAddressBook::handleCrash() |
56 | { | 56 | { |
57 | StdAddressBook::self()->cleanUp(); | 57 | StdAddressBook::self()->cleanUp(); |
58 | } | 58 | } |
59 | StdAddressBook *StdAddressBook::selfNoLoad() | ||
60 | { | ||
61 | |||
62 | if ( !mSelf ) | ||
63 | { | ||
64 | QString appdir = StdAddressBook::setTempAppDir(); | ||
65 | // US im am not sure why I have to use the other format here?? | ||
66 | #ifdef KAB_EMBEDDED | ||
67 | mSelf = addressBookDeleter.setObject( new StdAddressBook ( QString() ) ); | ||
68 | #else //KAB_EMBEDDED | ||
69 | addressBookDeleter.setObject( mSelf, new StdAddressBook( QString() ) ); | ||
70 | #endif //KAB_EMBEDDED | ||
71 | KStandardDirs::setAppDir( appdir ); | ||
72 | } | ||
73 | |||
74 | return mSelf; | ||
75 | } | ||
59 | 76 | ||
60 | StdAddressBook *StdAddressBook::self() | 77 | StdAddressBook *StdAddressBook::self() |
61 | { | 78 | { |
62 | 79 | ||
63 | if ( !mSelf ) | 80 | if ( !mSelf ) |
64 | { | 81 | { |
65 | QString appdir = StdAddressBook::setTempAppDir(); | 82 | QString appdir = StdAddressBook::setTempAppDir(); |
66 | // US im am not sure why I have to use the other format here?? | 83 | // US im am not sure why I have to use the other format here?? |
67 | #ifdef KAB_EMBEDDED | 84 | #ifdef KAB_EMBEDDED |
68 | mSelf = addressBookDeleter.setObject( new StdAddressBook ); | 85 | mSelf = addressBookDeleter.setObject( new StdAddressBook ); |
69 | #else //KAB_EMBEDDED | 86 | #else //KAB_EMBEDDED |
70 | addressBookDeleter.setObject( mSelf, new StdAddressBook ); | 87 | addressBookDeleter.setObject( mSelf, new StdAddressBook ); |
71 | #endif //KAB_EMBEDDED | 88 | #endif //KAB_EMBEDDED |
72 | KStandardDirs::setAppDir( appdir ); | 89 | KStandardDirs::setAppDir( appdir ); |
73 | } | 90 | } |
74 | 91 | ||
75 | return mSelf; | 92 | return mSelf; |
76 | } | 93 | } |
77 | 94 | ||
78 | QString StdAddressBook::setTempAppDir() | 95 | QString StdAddressBook::setTempAppDir() |
79 | { | 96 | { |
80 | QString appDIR = KStandardDirs::appDir(); | 97 | QString appDIR = KStandardDirs::appDir(); |
81 | #ifdef DESKTOP_VERSION | 98 | #ifdef DESKTOP_VERSION |
82 | QString appdir = QDir::homeDirPath(); | 99 | QString appdir = QDir::homeDirPath(); |
83 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) | 100 | if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) |
84 | appdir += "kaddressbook/"; | 101 | appdir += "kaddressbook/"; |
85 | else | 102 | else |
86 | appdir += "/kaddressbook/"; | 103 | appdir += "/kaddressbook/"; |
87 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); | 104 | KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); |
88 | #else | 105 | #else |
89 | QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook"; | 106 | QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook"; |
90 | 107 | ||
91 | KStandardDirs::setAppDir( appdir ); | 108 | KStandardDirs::setAppDir( appdir ); |
92 | #endif | 109 | #endif |
93 | 110 | ||
94 | return appDIR; | 111 | return appDIR; |
95 | } | 112 | } |
96 | StdAddressBook *StdAddressBook::self( bool onlyFastResources ) | 113 | StdAddressBook *StdAddressBook::self( bool onlyFastResources ) |
97 | { | 114 | { |
98 | 115 | ||
99 | if ( !mSelf ) | 116 | if ( !mSelf ) |
100 | { | 117 | { |
101 | QString appdir =StdAddressBook::setTempAppDir(); | 118 | QString appdir =StdAddressBook::setTempAppDir(); |
102 | #ifdef KAB_EMBEDDED | 119 | #ifdef KAB_EMBEDDED |
103 | mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) ); | 120 | mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) ); |
104 | #else //KAB_EMBEDDED | 121 | #else //KAB_EMBEDDED |
105 | addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) ); | 122 | addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) ); |
106 | #endif //KAB_EMBEDDED | 123 | #endif //KAB_EMBEDDED |
107 | KStandardDirs::setAppDir( appdir ); | 124 | KStandardDirs::setAppDir( appdir ); |
108 | } | 125 | } |
109 | return mSelf; | 126 | return mSelf; |
110 | } | 127 | } |
128 | StdAddressBook::StdAddressBook( QString ) | ||
129 | : AddressBook( "kabcrc" ) | ||
130 | { | ||
131 | |||
132 | } | ||
111 | 133 | ||
112 | StdAddressBook::StdAddressBook() | 134 | StdAddressBook::StdAddressBook() |
113 | : AddressBook( "kabcrc" ) | 135 | : AddressBook( "kabcrc" ) |
114 | { | 136 | { |
115 | 137 | ||
116 | //init( false ); | 138 | init( false ); |
117 | } | 139 | } |
118 | 140 | ||
119 | StdAddressBook::StdAddressBook( bool onlyFastResources ) | 141 | StdAddressBook::StdAddressBook( bool onlyFastResources ) |
120 | : AddressBook( "kabcrc" ) | 142 | : AddressBook( "kabcrc" ) |
121 | { | 143 | { |
122 | 144 | ||
123 | if ( onlyFastResources ) | 145 | init( onlyFastResources ); |
124 | init( onlyFastResources ); | ||
125 | } | 146 | } |
126 | 147 | ||
127 | StdAddressBook::~StdAddressBook() | 148 | StdAddressBook::~StdAddressBook() |
128 | { | 149 | { |
129 | if ( mAutomaticSave ) | 150 | if ( mAutomaticSave ) |
130 | save(); | 151 | save(); |
131 | } | 152 | } |
132 | 153 | ||
133 | void StdAddressBook::init( bool ) | 154 | void StdAddressBook::init( bool ) |
134 | { | 155 | { |
135 | KRES::Manager<Resource> *manager = resourceManager(); | 156 | KRES::Manager<Resource> *manager = resourceManager(); |
136 | KRES::Manager<Resource>::ActiveIterator it; | 157 | KRES::Manager<Resource>::ActiveIterator it; |
137 | 158 | ||
138 | for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { | 159 | for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { |
139 | (*it)->setAddressBook( this ); | 160 | (*it)->setAddressBook( this ); |
140 | if ( !(*it)->open() ) | 161 | if ( !(*it)->open() ) |
141 | error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); | 162 | error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); |
142 | } | 163 | } |
143 | 164 | ||
144 | Resource *res = standardResource(); | 165 | Resource *res = standardResource(); |
145 | if ( !res ) { | 166 | if ( !res ) { |
146 | res = manager->createResource( "file" ); | 167 | res = manager->createResource( "file" ); |
147 | if ( res ) | 168 | if ( res ) |
148 | { | 169 | { |
149 | addResource( res ); | 170 | addResource( res ); |
150 | } | 171 | } |
151 | else | 172 | else |
152 | qDebug(" No resource available!!!"); | 173 | qDebug(" No resource available!!!"); |
153 | } | 174 | } |
154 | 175 | ||
155 | setStandardResource( res ); | 176 | setStandardResource( res ); |
156 | manager->writeConfig(); | 177 | manager->writeConfig(); |
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h index cf130b3..3cd6363 100644 --- a/kabc/stdaddressbook.h +++ b/kabc/stdaddressbook.h | |||
@@ -41,64 +41,65 @@ namespace KABC { | |||
41 | It's implemented as a singleton. Use @ref self() to get the address book | 41 | It's implemented as a singleton. Use @ref self() to get the address book |
42 | object. On the first self() call the address book also gets loaded. | 42 | object. On the first self() call the address book also gets loaded. |
43 | 43 | ||
44 | Example: | 44 | Example: |
45 | 45 | ||
46 | <pre> | 46 | <pre> |
47 | KABC::AddressBook *ab = KABC::StdAddressBook::self(); | 47 | KABC::AddressBook *ab = KABC::StdAddressBook::self(); |
48 | 48 | ||
49 | KABC::AddressBook::Iterator it; | 49 | KABC::AddressBook::Iterator it; |
50 | for ( it = ab->begin(); it != ab->end(); ++it ) { | 50 | for ( it = ab->begin(); it != ab->end(); ++it ) { |
51 | kdDebug() << "UID=" << (*it).uid() << endl; | 51 | kdDebug() << "UID=" << (*it).uid() << endl; |
52 | 52 | ||
53 | // do some other stuff | 53 | // do some other stuff |
54 | } | 54 | } |
55 | 55 | ||
56 | KABC::StdAddressBook::save(); | 56 | KABC::StdAddressBook::save(); |
57 | </pre> | 57 | </pre> |
58 | */ | 58 | */ |
59 | class StdAddressBook : public AddressBook | 59 | class StdAddressBook : public AddressBook |
60 | { | 60 | { |
61 | public: | 61 | public: |
62 | 62 | ||
63 | /** | 63 | /** |
64 | Destructor. | 64 | Destructor. |
65 | */ | 65 | */ |
66 | ~StdAddressBook(); | 66 | ~StdAddressBook(); |
67 | 67 | ||
68 | /** | 68 | /** |
69 | Return the standard addressbook object. It also loads slow resources. | 69 | Return the standard addressbook object. It also loads slow resources. |
70 | It is the same as self(false); . | 70 | It is the same as self(false); . |
71 | */ | 71 | */ |
72 | static StdAddressBook *self(); | 72 | static StdAddressBook *self(); |
73 | static StdAddressBook *selfNoLoad(); | ||
73 | 74 | ||
74 | /** | 75 | /** |
75 | This is the same as above, but with specified | 76 | This is the same as above, but with specified |
76 | behaviour of resource loading. | 77 | behaviour of resource loading. |
77 | 78 | ||
78 | @param onlyFastResource Only resources marked as 'fast' should be loaded | 79 | @param onlyFastResource Only resources marked as 'fast' should be loaded |
79 | */ | 80 | */ |
80 | // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke | 81 | // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke |
81 | static StdAddressBook *self( bool onlyFastResources ); | 82 | static StdAddressBook *self( bool onlyFastResources ); |
82 | 83 | ||
83 | /** | 84 | /** |
84 | Save the standard address book to disk. | 85 | Save the standard address book to disk. |
85 | */ | 86 | */ |
86 | static bool save(); | 87 | static bool save(); |
87 | 88 | ||
88 | /** | 89 | /** |
89 | Call this method in your crash handler to allow the library clean up | 90 | Call this method in your crash handler to allow the library clean up |
90 | possible locks. | 91 | possible locks. |
91 | */ | 92 | */ |
92 | static void handleCrash(); | 93 | static void handleCrash(); |
93 | 94 | ||
94 | /** | 95 | /** |
95 | Returns the default file name for vcard-based addressbook | 96 | Returns the default file name for vcard-based addressbook |
96 | */ | 97 | */ |
97 | static QString fileName(); | 98 | static QString fileName(); |
98 | 99 | ||
99 | /** | 100 | /** |
100 | Returns the default directory name for vcard-based addressbook | 101 | Returns the default directory name for vcard-based addressbook |
101 | */ | 102 | */ |
102 | static QString directoryName(); | 103 | static QString directoryName(); |
103 | 104 | ||
104 | /** | 105 | /** |
@@ -109,43 +110,44 @@ class StdAddressBook : public AddressBook | |||
109 | */ | 110 | */ |
110 | static void setAutomaticSave( bool enable ); | 111 | static void setAutomaticSave( bool enable ); |
111 | 112 | ||
112 | /** | 113 | /** |
113 | Closes the address book. Depending on @ref automaticSave() it will | 114 | Closes the address book. Depending on @ref automaticSave() it will |
114 | save the address book first. | 115 | save the address book first. |
115 | */ | 116 | */ |
116 | static void close(); | 117 | static void close(); |
117 | 118 | ||
118 | /** | 119 | /** |
119 | Returns whether the address book is saved at destruction time. | 120 | Returns whether the address book is saved at destruction time. |
120 | See also @ref setAutomaticSave(). | 121 | See also @ref setAutomaticSave(). |
121 | */ | 122 | */ |
122 | static bool automaticSave(); | 123 | static bool automaticSave(); |
123 | 124 | ||
124 | /** | 125 | /** |
125 | Returns the contact, that is associated with the owner of the | 126 | Returns the contact, that is associated with the owner of the |
126 | address book. This contact should be used by other programs | 127 | address book. This contact should be used by other programs |
127 | to access user specific data. | 128 | to access user specific data. |
128 | */ | 129 | */ |
129 | Addressee whoAmI(); | 130 | Addressee whoAmI(); |
130 | 131 | ||
131 | /** | 132 | /** |
132 | Sets the users contact. See @ref whoAmI() for more information. | 133 | Sets the users contact. See @ref whoAmI() for more information. |
133 | 134 | ||
134 | @param uid The uid of the users contact. | 135 | @param uid The uid of the users contact. |
135 | */ | 136 | */ |
136 | void setWhoAmI( const Addressee &addr ); | 137 | void setWhoAmI( const Addressee &addr ); |
137 | void init( bool onlyFastResources ); | 138 | void init( bool onlyFastResources ); |
138 | 139 | ||
139 | protected: | 140 | protected: |
140 | StdAddressBook(); | 141 | StdAddressBook(); |
142 | StdAddressBook( QString ); | ||
141 | StdAddressBook( bool onlyFastResources ); | 143 | StdAddressBook( bool onlyFastResources ); |
142 | 144 | ||
143 | 145 | ||
144 | private: | 146 | private: |
145 | static QString setTempAppDir(); | 147 | static QString setTempAppDir(); |
146 | static StdAddressBook *mSelf; | 148 | static StdAddressBook *mSelf; |
147 | static bool mAutomaticSave; | 149 | static bool mAutomaticSave; |
148 | }; | 150 | }; |
149 | 151 | ||
150 | } | 152 | } |
151 | #endif | 153 | #endif |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index c670b1f..77321aa 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -274,65 +274,65 @@ class KAex2phonePrefs : public QDialog | |||
274 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 274 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
275 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 275 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
276 | resize( 220, 240 ); | 276 | resize( 220, 240 ); |
277 | 277 | ||
278 | } | 278 | } |
279 | 279 | ||
280 | public: | 280 | public: |
281 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 281 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
282 | QCheckBox* mWriteToSim; | 282 | QCheckBox* mWriteToSim; |
283 | }; | 283 | }; |
284 | 284 | ||
285 | 285 | ||
286 | bool pasteWithNewUid = true; | 286 | bool pasteWithNewUid = true; |
287 | 287 | ||
288 | #ifdef KAB_EMBEDDED | 288 | #ifdef KAB_EMBEDDED |
289 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) | 289 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) |
290 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 290 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
291 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ | 291 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ |
292 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) | 292 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) |
293 | #else //KAB_EMBEDDED | 293 | #else //KAB_EMBEDDED |
294 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) | 294 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) |
295 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 295 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
296 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), | 296 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), |
297 | mReadWrite( readWrite ), mModified( false ) | 297 | mReadWrite( readWrite ), mModified( false ) |
298 | #endif //KAB_EMBEDDED | 298 | #endif //KAB_EMBEDDED |
299 | { | 299 | { |
300 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 300 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
301 | // syncManager->setBlockSave(false); | 301 | // syncManager->setBlockSave(false); |
302 | mIncSearchWidget = 0; | 302 | mIncSearchWidget = 0; |
303 | mMiniSplitter = 0; | 303 | mMiniSplitter = 0; |
304 | mExtensionBarSplitter = 0; | 304 | mExtensionBarSplitter = 0; |
305 | mIsPart = !parent->inherits( "KAddressBookMain" ); | 305 | mIsPart = !parent->inherits( "KAddressBookMain" ); |
306 | mAddressBook = KABC::StdAddressBook::self(); | 306 | mAddressBook = KABC::StdAddressBook::selfNoLoad(); |
307 | KABC::StdAddressBook::setAutomaticSave( false ); | 307 | KABC::StdAddressBook::setAutomaticSave( false ); |
308 | 308 | ||
309 | #ifndef KAB_EMBEDDED | 309 | #ifndef KAB_EMBEDDED |
310 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); | 310 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); |
311 | #endif //KAB_EMBEDDED | 311 | #endif //KAB_EMBEDDED |
312 | 312 | ||
313 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), | 313 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), |
314 | SLOT( addressBookChanged() ) ); | 314 | SLOT( addressBookChanged() ) ); |
315 | 315 | ||
316 | #if 0 | 316 | #if 0 |
317 | // LR moved to addressbook init method | 317 | // LR moved to addressbook init method |
318 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, | 318 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, |
319 | "X-Department", "KADDRESSBOOK" ); | 319 | "X-Department", "KADDRESSBOOK" ); |
320 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, | 320 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, |
321 | "X-Profession", "KADDRESSBOOK" ); | 321 | "X-Profession", "KADDRESSBOOK" ); |
322 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, | 322 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, |
323 | "X-AssistantsName", "KADDRESSBOOK" ); | 323 | "X-AssistantsName", "KADDRESSBOOK" ); |
324 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, | 324 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, |
325 | "X-ManagersName", "KADDRESSBOOK" ); | 325 | "X-ManagersName", "KADDRESSBOOK" ); |
326 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, | 326 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, |
327 | "X-SpousesName", "KADDRESSBOOK" ); | 327 | "X-SpousesName", "KADDRESSBOOK" ); |
328 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, | 328 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, |
329 | "X-Office", "KADDRESSBOOK" ); | 329 | "X-Office", "KADDRESSBOOK" ); |
330 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, | 330 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, |
331 | "X-IMAddress", "KADDRESSBOOK" ); | 331 | "X-IMAddress", "KADDRESSBOOK" ); |
332 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, | 332 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, |
333 | "X-Anniversary", "KADDRESSBOOK" ); | 333 | "X-Anniversary", "KADDRESSBOOK" ); |
334 | 334 | ||
335 | //US added this field to become compatible with Opie/qtopia addressbook | 335 | //US added this field to become compatible with Opie/qtopia addressbook |
336 | // values can be "female" or "male" or "". An empty field represents undefined. | 336 | // values can be "female" or "male" or "". An empty field represents undefined. |
337 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, | 337 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, |
338 | "X-Gender", "KADDRESSBOOK" ); | 338 | "X-Gender", "KADDRESSBOOK" ); |