author | zautrix <zautrix> | 2004-10-14 09:28:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-14 09:28:50 (UTC) |
commit | 3d79ab275374292196c7d032ffd2e321841c8cb0 (patch) (unidiff) | |
tree | 6ceaba2a5f375cfebc88189000221fe456e6f9d2 | |
parent | 57bd80b04dddd40a897dce8b6902d1046d71c631 (diff) | |
download | kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.zip kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.gz kdepimpi-3d79ab275374292196c7d032ffd2e321841c8cb0.tar.bz2 |
umlaute phone fixes
-rw-r--r-- | gammu/emb/common/service/gsmmisc.c | 5 | ||||
-rw-r--r-- | kabc/addressbook.cpp | 3 | ||||
-rw-r--r-- | kabc/addressbook.h | 2 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 31 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 3 |
6 files changed, 27 insertions, 21 deletions
diff --git a/gammu/emb/common/service/gsmmisc.c b/gammu/emb/common/service/gsmmisc.c index 1c6ec8b..486d136 100644 --- a/gammu/emb/common/service/gsmmisc.c +++ b/gammu/emb/common/service/gsmmisc.c | |||
@@ -200,49 +200,52 @@ void ReadVCALDateTime(char *Buffer, GSM_DateTime *dt) | |||
200 | void SaveVCALText(char *Buffer, int *Length, char *Text, char *Start) | 200 | void SaveVCALText(char *Buffer, int *Length, char *Text, char *Start) |
201 | { | 201 | { |
202 | char buffer[1000]; | 202 | char buffer[1000]; |
203 | 203 | ||
204 | if (UnicodeLength(Text) != 0) { | 204 | if (UnicodeLength(Text) != 0) { |
205 | EncodeUTF8(buffer,Text); | 205 | EncodeUTF8(buffer,Text); |
206 | if (UnicodeLength(Text)==strlen(buffer)) { | 206 | if (UnicodeLength(Text)==strlen(buffer)) { |
207 | *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,DecodeUnicodeString(Text),13,10); | 207 | *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,DecodeUnicodeString(Text),13,10); |
208 | } else { | 208 | } else { |
209 | *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,buffer,13,10); | 209 | *Length+=sprintf(Buffer+(*Length), "%s:%s%c%c",Start,buffer,13,10); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } |
213 | 213 | ||
214 | bool ReadVCALText(char *Buffer, char *Start, char *Value) | 214 | bool ReadVCALText(char *Buffer, char *Start, char *Value) |
215 | { | 215 | { |
216 | unsigned char buff[200]; | 216 | unsigned char buff[200]; |
217 | 217 | ||
218 | Value[0] = 0x00; | 218 | Value[0] = 0x00; |
219 | Value[1] = 0x00; | 219 | Value[1] = 0x00; |
220 | 220 | ||
221 | strcpy(buff,Start); | 221 | strcpy(buff,Start); |
222 | strcat(buff,":"); | 222 | strcat(buff,":"); |
223 | if (!strncmp(Buffer,buff,strlen(buff))) { | 223 | if (!strncmp(Buffer,buff,strlen(buff))) { |
224 | EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1)); | 224 | |
225 | // LR original :EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1)); | ||
226 | // LR we have utf8 as default | ||
227 | DecodeUTF8(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1)); | ||
225 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); | 228 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); |
226 | return true; | 229 | return true; |
227 | } | 230 | } |
228 | /* SE T68i */ | 231 | /* SE T68i */ |
229 | strcpy(buff,Start); | 232 | strcpy(buff,Start); |
230 | strcat(buff,";ENCODING=QUOTED-PRINTABLE:"); | 233 | strcat(buff,";ENCODING=QUOTED-PRINTABLE:"); |
231 | if (!strncmp(Buffer,buff,strlen(buff))) { | 234 | if (!strncmp(Buffer,buff,strlen(buff))) { |
232 | DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+27,strlen(Buffer)-(strlen(Start)+27)); | 235 | DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+27,strlen(Buffer)-(strlen(Start)+27)); |
233 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); | 236 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); |
234 | return true; | 237 | return true; |
235 | } | 238 | } |
236 | strcpy(buff,Start); | 239 | strcpy(buff,Start); |
237 | strcat(buff,";CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:"); | 240 | strcat(buff,";CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:"); |
238 | if (!strncmp(Buffer,buff,strlen(buff))) { | 241 | if (!strncmp(Buffer,buff,strlen(buff))) { |
239 | DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+41,strlen(Buffer)-(strlen(Start)+41)); | 242 | DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+41,strlen(Buffer)-(strlen(Start)+41)); |
240 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); | 243 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); |
241 | return true; | 244 | return true; |
242 | } | 245 | } |
243 | strcpy(buff,Start); | 246 | strcpy(buff,Start); |
244 | strcat(buff,";CHARSET=UTF-8:"); | 247 | strcat(buff,";CHARSET=UTF-8:"); |
245 | if (!strncmp(Buffer,buff,strlen(buff))) { | 248 | if (!strncmp(Buffer,buff,strlen(buff))) { |
246 | DecodeUTF8(Value,Buffer+strlen(Start)+15,strlen(Buffer)-(strlen(Start)+15)); | 249 | DecodeUTF8(Value,Buffer+strlen(Start)+15,strlen(Buffer)-(strlen(Start)+15)); |
247 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); | 250 | dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); |
248 | return true; | 251 | return true; |
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index c584c35..3641c0c 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -456,81 +456,82 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) | |||
456 | } | 456 | } |
457 | vcard += vcardnew.mid( start,vcardnew.length() ); | 457 | vcard += vcardnew.mid( start,vcardnew.length() ); |
458 | vcard.replace ( QRegExp(";;;") , "" ); | 458 | vcard.replace ( QRegExp(";;;") , "" ); |
459 | vcard.replace ( QRegExp(";;") , "" ); | 459 | vcard.replace ( QRegExp(";;") , "" ); |
460 | datastream += vcard; | 460 | datastream += vcard; |
461 | 461 | ||
462 | } | 462 | } |
463 | 463 | ||
464 | QFile outFile(fileName); | 464 | QFile outFile(fileName); |
465 | if ( outFile.open(IO_WriteOnly) ) { | 465 | if ( outFile.open(IO_WriteOnly) ) { |
466 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); | 466 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); |
467 | QTextStream t( &outFile ); // use a text stream | 467 | QTextStream t( &outFile ); // use a text stream |
468 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 468 | t.setEncoding( QTextStream::UnicodeUTF8 ); |
469 | t <<datastream; | 469 | t <<datastream; |
470 | t << "\r\n\r\n"; | 470 | t << "\r\n\r\n"; |
471 | outFile.close(); | 471 | outFile.close(); |
472 | 472 | ||
473 | } else { | 473 | } else { |
474 | qDebug("Error open temp file "); | 474 | qDebug("Error open temp file "); |
475 | return false; | 475 | return false; |
476 | } | 476 | } |
477 | return true; | 477 | return true; |
478 | 478 | ||
479 | } | 479 | } |
480 | void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld ) | 480 | int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool removeOld ) |
481 | { | 481 | { |
482 | 482 | ||
483 | if ( removeOld ) | 483 | if ( removeOld ) |
484 | setUntagged( true ); | 484 | setUntagged( true ); |
485 | KABC::Addressee::List list; | 485 | KABC::Addressee::List list; |
486 | QFile file( fileName ); | 486 | QFile file( fileName ); |
487 | file.open( IO_ReadOnly ); | 487 | file.open( IO_ReadOnly ); |
488 | QByteArray rawData = file.readAll(); | 488 | QByteArray rawData = file.readAll(); |
489 | file.close(); | 489 | file.close(); |
490 | QString data; | 490 | QString data; |
491 | if ( replaceLabel ) { | 491 | if ( replaceLabel ) { |
492 | data = QString::fromLatin1( rawData.data(), rawData.size() + 1 ); | 492 | data = QString::fromLatin1( rawData.data(), rawData.size() + 1 ); |
493 | data.replace ( QRegExp("LABEL") , "ADR" ); | 493 | data.replace ( QRegExp("LABEL") , "ADR" ); |
494 | data.replace ( QRegExp("CHARSET=ISO-8859-1") , "" ); | 494 | data.replace ( QRegExp("CHARSET=ISO-8859-1") , "" ); |
495 | } else | 495 | } else |
496 | data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); | 496 | data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); |
497 | KABC::VCardTool tool; | 497 | KABC::VCardTool tool; |
498 | list = tool.parseVCards( data ); | 498 | list = tool.parseVCards( data ); |
499 | KABC::Addressee::List::Iterator it; | 499 | KABC::Addressee::List::Iterator it; |
500 | for ( it = list.begin(); it != list.end(); ++it ) { | 500 | for ( it = list.begin(); it != list.end(); ++it ) { |
501 | QString id = (*it).custom( "KADDRESSBOOK", "X-ExternalID" ); | 501 | QString id = (*it).custom( "KADDRESSBOOK", "X-ExternalID" ); |
502 | if ( !id.isEmpty() ) | 502 | if ( !id.isEmpty() ) |
503 | (*it).setIDStr(id ); | 503 | (*it).setIDStr(id ); |
504 | (*it).setResource( 0 ); | 504 | (*it).setResource( 0 ); |
505 | if ( replaceLabel ) | 505 | if ( replaceLabel ) |
506 | (*it).removeVoice(); | 506 | (*it).removeVoice(); |
507 | if ( removeOld ) | 507 | if ( removeOld ) |
508 | (*it).setTagged( true ); | 508 | (*it).setTagged( true ); |
509 | insertAddressee( (*it), false, true ); | 509 | insertAddressee( (*it), false, true ); |
510 | } | 510 | } |
511 | if ( removeOld ) | 511 | if ( removeOld ) |
512 | removeUntagged(); | 512 | removeUntagged(); |
513 | return list.count(); | ||
513 | } | 514 | } |
514 | void AddressBook::setUntagged(bool setNonSyncTagged) // = false) | 515 | void AddressBook::setUntagged(bool setNonSyncTagged) // = false) |
515 | { | 516 | { |
516 | Iterator ait; | 517 | Iterator ait; |
517 | for ( ait = begin(); ait != end(); ++ait ) { | 518 | for ( ait = begin(); ait != end(); ++ait ) { |
518 | if ( setNonSyncTagged ) { | 519 | if ( setNonSyncTagged ) { |
519 | if ( (*ait).resource() && ! (*ait).resource()->includeInSync() ) { | 520 | if ( (*ait).resource() && ! (*ait).resource()->includeInSync() ) { |
520 | (*ait).setTagged( true ); | 521 | (*ait).setTagged( true ); |
521 | } else | 522 | } else |
522 | (*ait).setTagged( false ); | 523 | (*ait).setTagged( false ); |
523 | } else | 524 | } else |
524 | (*ait).setTagged( false ); | 525 | (*ait).setTagged( false ); |
525 | } | 526 | } |
526 | } | 527 | } |
527 | void AddressBook::removeUntagged() | 528 | void AddressBook::removeUntagged() |
528 | { | 529 | { |
529 | Iterator ait; | 530 | Iterator ait; |
530 | bool todelete = false; | 531 | bool todelete = false; |
531 | Iterator todel; | 532 | Iterator todel; |
532 | for ( ait = begin(); ait != end(); ++ait ) { | 533 | for ( ait = begin(); ait != end(); ++ait ) { |
533 | if ( todelete ) | 534 | if ( todelete ) |
534 | removeAddressee( todel ); | 535 | removeAddressee( todel ); |
535 | if (!(*ait).tagged()) { | 536 | if (!(*ait).tagged()) { |
536 | todelete = true; | 537 | todelete = true; |
diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 23bba02..5edca06 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h | |||
@@ -126,49 +126,49 @@ class AddressBook : public QObject | |||
126 | for calling the @ref save() function. | 126 | for calling the @ref save() function. |
127 | 127 | ||
128 | @see save() | 128 | @see save() |
129 | */ | 129 | */ |
130 | Ticket *requestSaveTicket( Resource *resource=0 ); | 130 | Ticket *requestSaveTicket( Resource *resource=0 ); |
131 | 131 | ||
132 | /** | 132 | /** |
133 | Load address book from file. | 133 | Load address book from file. |
134 | */ | 134 | */ |
135 | bool load(); | 135 | bool load(); |
136 | 136 | ||
137 | /** | 137 | /** |
138 | Save address book. The address book is saved to the file, the Ticket | 138 | Save address book. The address book is saved to the file, the Ticket |
139 | object has been requested for by @ref requestSaveTicket(). | 139 | object has been requested for by @ref requestSaveTicket(). |
140 | 140 | ||
141 | @param ticket a ticket object returned by @ref requestSaveTicket() | 141 | @param ticket a ticket object returned by @ref requestSaveTicket() |
142 | */ | 142 | */ |
143 | bool save( Ticket *ticket ); | 143 | bool save( Ticket *ticket ); |
144 | bool saveAB( ); | 144 | bool saveAB( ); |
145 | bool saveABphone( QString fileName ); | 145 | bool saveABphone( QString fileName ); |
146 | void smplifyAddressees(); | 146 | void smplifyAddressees(); |
147 | void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); | 147 | void preparePhoneSync( QString currentSyncDevice, bool isPreSync ); |
148 | void export2File( QString fileName ); | 148 | void export2File( QString fileName ); |
149 | bool export2PhoneFormat( QStringList uids ,QString fileName ); | 149 | bool export2PhoneFormat( QStringList uids ,QString fileName ); |
150 | void importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); | 150 | int importFromFile( QString fileName, bool replaceLabel = false, bool removeOld = false ); |
151 | void setUntagged( bool setNonSyncTagged = false ); | 151 | void setUntagged( bool setNonSyncTagged = false ); |
152 | void removeUntagged(); | 152 | void removeUntagged(); |
153 | void findNewExtIds( QString fileName, QString currentSyncDevice ); | 153 | void findNewExtIds( QString fileName, QString currentSyncDevice ); |
154 | /** | 154 | /** |
155 | Returns a iterator for first entry of address book. | 155 | Returns a iterator for first entry of address book. |
156 | */ | 156 | */ |
157 | Iterator begin(); | 157 | Iterator begin(); |
158 | 158 | ||
159 | /** | 159 | /** |
160 | Returns a const iterator for first entry of address book. | 160 | Returns a const iterator for first entry of address book. |
161 | */ | 161 | */ |
162 | ConstIterator begin() const; | 162 | ConstIterator begin() const; |
163 | 163 | ||
164 | /** | 164 | /** |
165 | Returns a iterator for first entry of address book. | 165 | Returns a iterator for first entry of address book. |
166 | */ | 166 | */ |
167 | Iterator end(); | 167 | Iterator end(); |
168 | 168 | ||
169 | /** | 169 | /** |
170 | Returns a const iterator for first entry of address book. | 170 | Returns a const iterator for first entry of address book. |
171 | */ | 171 | */ |
172 | ConstIterator end() const; | 172 | ConstIterator end() const; |
173 | 173 | ||
174 | /** | 174 | /** |
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp index 2cdf4bf..ba17c50 100644 --- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp +++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp | |||
@@ -51,50 +51,50 @@ $Id$ | |||
51 | #include "resourcesharpdtm.h" | 51 | #include "resourcesharpdtm.h" |
52 | 52 | ||
53 | #include "stdaddressbook.h" | 53 | #include "stdaddressbook.h" |
54 | 54 | ||
55 | #include "sharpdtmconverter.h" | 55 | #include "sharpdtmconverter.h" |
56 | //#define ALLOW_LOCKING | 56 | //#define ALLOW_LOCKING |
57 | using namespace KABC; | 57 | using namespace KABC; |
58 | extern "C" | 58 | extern "C" |
59 | { | 59 | { |
60 | void *init_microkabc_sharpdtm() | 60 | void *init_microkabc_sharpdtm() |
61 | { | 61 | { |
62 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>(); | 62 | return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>(); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | 65 | ||
66 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config ) | 66 | ResourceSharpDTM::ResourceSharpDTM( const KConfig *config ) |
67 | : Resource( config ), mConverter (0) | 67 | : Resource( config ), mConverter (0) |
68 | { | 68 | { |
69 | // we can not choose the filename. Therefore use the default to display | 69 | // we can not choose the filename. Therefore use the default to display |
70 | 70 | ||
71 | QString fileName = SlZDataBase::addressbookFileName(); | 71 | QString fileName = SlZDataBase::addressbookFileName(); |
72 | init( fileName ); | 72 | init( fileName ); |
73 | } | 73 | } |
74 | 74 | ||
75 | ResourceSharpDTM::ResourceSharpDTM( const QString &fileName, bool syncable ) | 75 | ResourceSharpDTM::ResourceSharpDTM( const QString &fileName ) |
76 | : Resource( 0, syncable ) | 76 | : Resource( 0 ) |
77 | { | 77 | { |
78 | init( fileName ); | 78 | init( fileName ); |
79 | } | 79 | } |
80 | 80 | ||
81 | void ResourceSharpDTM::init( const QString &fileName ) | 81 | void ResourceSharpDTM::init( const QString &fileName ) |
82 | { | 82 | { |
83 | 83 | ||
84 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); | 84 | connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); |
85 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); | 85 | connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); |
86 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); | 86 | connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); |
87 | 87 | ||
88 | setFileName( fileName ); | 88 | setFileName( fileName ); |
89 | } | 89 | } |
90 | 90 | ||
91 | ResourceSharpDTM::~ResourceSharpDTM() | 91 | ResourceSharpDTM::~ResourceSharpDTM() |
92 | { | 92 | { |
93 | if (mConverter != 0) | 93 | if (mConverter != 0) |
94 | delete mConverter; | 94 | delete mConverter; |
95 | 95 | ||
96 | if(mAccess != 0) | 96 | if(mAccess != 0) |
97 | delete mAccess; | 97 | delete mAccess; |
98 | } | 98 | } |
99 | 99 | ||
100 | void ResourceSharpDTM::writeConfig( KConfig *config ) | 100 | void ResourceSharpDTM::writeConfig( KConfig *config ) |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 087e9e3..3ab06c4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -183,67 +183,67 @@ class KAex2phonePrefs : public QDialog | |||
183 | lay->addWidget( temphb ); | 183 | lay->addWidget( temphb ); |
184 | temphb = new QHBox( this ); | 184 | temphb = new QHBox( this ); |
185 | new QLabel( i18n("Model(opt.): "), temphb ); | 185 | new QLabel( i18n("Model(opt.): "), temphb ); |
186 | mPhoneModel = new QLineEdit( temphb); | 186 | mPhoneModel = new QLineEdit( temphb); |
187 | lay->addWidget( temphb ); | 187 | lay->addWidget( temphb ); |
188 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); | 188 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); |
189 | // lay->addWidget( mWriteToSim ); | 189 | // lay->addWidget( mWriteToSim ); |
190 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); | 190 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); |
191 | lab->setAlignment (AlignHCenter ); | 191 | lab->setAlignment (AlignHCenter ); |
192 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 192 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
193 | lay->addWidget( ok ); | 193 | lay->addWidget( ok ); |
194 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 194 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
195 | lay->addWidget( cancel ); | 195 | lay->addWidget( cancel ); |
196 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 196 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
197 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 197 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
198 | resize( 220, 240 ); | 198 | resize( 220, 240 ); |
199 | 199 | ||
200 | } | 200 | } |
201 | 201 | ||
202 | public: | 202 | public: |
203 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 203 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
204 | QCheckBox* mWriteToSim; | 204 | QCheckBox* mWriteToSim; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | |||
207 | bool pasteWithNewUid = true; | 208 | bool pasteWithNewUid = true; |
208 | 209 | ||
209 | #ifdef KAB_EMBEDDED | 210 | #ifdef KAB_EMBEDDED |
210 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) | 211 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) |
211 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 212 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
212 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ | 213 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ |
213 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) | 214 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) |
214 | #else //KAB_EMBEDDED | 215 | #else //KAB_EMBEDDED |
215 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) | 216 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) |
216 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 217 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
217 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), | 218 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), |
218 | mReadWrite( readWrite ), mModified( false ) | 219 | mReadWrite( readWrite ), mModified( false ) |
219 | #endif //KAB_EMBEDDED | 220 | #endif //KAB_EMBEDDED |
220 | { | 221 | { |
221 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 222 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
222 | // syncManager->setBlockSave(false); | 223 | // syncManager->setBlockSave(false); |
223 | mExtensionBarSplitter = 0; | 224 | mExtensionBarSplitter = 0; |
224 | mIsPart = !parent->inherits( "KAddressBookMain" ); | 225 | mIsPart = !parent->inherits( "KAddressBookMain" ); |
225 | |||
226 | mAddressBook = KABC::StdAddressBook::self(); | 226 | mAddressBook = KABC::StdAddressBook::self(); |
227 | KABC::StdAddressBook::setAutomaticSave( false ); | 227 | KABC::StdAddressBook::setAutomaticSave( false ); |
228 | 228 | ||
229 | #ifndef KAB_EMBEDDED | 229 | #ifndef KAB_EMBEDDED |
230 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); | 230 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); |
231 | #endif //KAB_EMBEDDED | 231 | #endif //KAB_EMBEDDED |
232 | 232 | ||
233 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), | 233 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), |
234 | SLOT( addressBookChanged() ) ); | 234 | SLOT( addressBookChanged() ) ); |
235 | 235 | ||
236 | #if 0 | 236 | #if 0 |
237 | // LP moved to addressbook init method | 237 | // LP moved to addressbook init method |
238 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, | 238 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, |
239 | "X-Department", "KADDRESSBOOK" ); | 239 | "X-Department", "KADDRESSBOOK" ); |
240 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, | 240 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, |
241 | "X-Profession", "KADDRESSBOOK" ); | 241 | "X-Profession", "KADDRESSBOOK" ); |
242 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, | 242 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, |
243 | "X-AssistantsName", "KADDRESSBOOK" ); | 243 | "X-AssistantsName", "KADDRESSBOOK" ); |
244 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, | 244 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, |
245 | "X-ManagersName", "KADDRESSBOOK" ); | 245 | "X-ManagersName", "KADDRESSBOOK" ); |
246 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, | 246 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, |
247 | "X-SpousesName", "KADDRESSBOOK" ); | 247 | "X-SpousesName", "KADDRESSBOOK" ); |
248 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, | 248 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, |
249 | "X-Office", "KADDRESSBOOK" ); | 249 | "X-Office", "KADDRESSBOOK" ); |
@@ -286,71 +286,75 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
286 | SLOT( incrementalSearch( const QString& ) ) ); | 286 | SLOT( incrementalSearch( const QString& ) ) ); |
287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), | 287 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), |
288 | mJumpButtonBar, SLOT( recreateButtons() ) ); | 288 | mJumpButtonBar, SLOT( recreateButtons() ) ); |
289 | 289 | ||
290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), | 290 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), |
291 | SLOT( sendMail( const QString& ) ) ); | 291 | SLOT( sendMail( const QString& ) ) ); |
292 | 292 | ||
293 | 293 | ||
294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 294 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 295 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 296 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
297 | 297 | ||
298 | 298 | ||
299 | #ifndef KAB_EMBEDDED | 299 | #ifndef KAB_EMBEDDED |
300 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 300 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
301 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 301 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
302 | 302 | ||
303 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 303 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
304 | SLOT( browse( const QString& ) ) ); | 304 | SLOT( browse( const QString& ) ) ); |
305 | 305 | ||
306 | 306 | ||
307 | mAddressBookService = new KAddressBookService( this ); | 307 | mAddressBookService = new KAddressBookService( this ); |
308 | 308 | ||
309 | #endif //KAB_EMBEDDED | 309 | #endif //KAB_EMBEDDED |
310 | |||
311 | mMessageTimer = new QTimer( this ); | ||
312 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | ||
310 | mEditorDialog = 0; | 313 | mEditorDialog = 0; |
311 | createAddresseeEditorDialog( this ); | 314 | createAddresseeEditorDialog( this ); |
312 | setModified( false ); | 315 | setModified( false ); |
313 | } | 316 | } |
314 | 317 | ||
315 | KABCore::~KABCore() | 318 | KABCore::~KABCore() |
316 | { | 319 | { |
317 | // save(); | 320 | // save(); |
318 | //saveSettings(); | 321 | //saveSettings(); |
319 | //KABPrefs::instance()->writeConfig(); | 322 | //KABPrefs::instance()->writeConfig(); |
320 | delete AddresseeConfig::instance(); | 323 | delete AddresseeConfig::instance(); |
321 | mAddressBook = 0; | 324 | mAddressBook = 0; |
322 | KABC::StdAddressBook::close(); | 325 | KABC::StdAddressBook::close(); |
323 | 326 | ||
324 | delete syncManager; | 327 | delete syncManager; |
325 | 328 | ||
326 | } | 329 | } |
327 | 330 | ||
328 | void KABCore::recieve( QString fn ) | 331 | void KABCore::recieve( QString fn ) |
329 | { | 332 | { |
330 | //qDebug("KABCore::recieve "); | 333 | //qDebug("KABCore::recieve "); |
331 | mAddressBook->importFromFile( fn, true ); | 334 | int count = mAddressBook->importFromFile( fn, true ); |
332 | mViewManager->refreshView(); | 335 | mViewManager->refreshView(); |
336 | message(i18n("%1 contact(s) received!").arg( count )); | ||
333 | topLevelWidget()->raise(); | 337 | topLevelWidget()->raise(); |
334 | } | 338 | } |
335 | void KABCore::restoreSettings() | 339 | void KABCore::restoreSettings() |
336 | { | 340 | { |
337 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; | 341 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; |
338 | 342 | ||
339 | bool state; | 343 | bool state; |
340 | 344 | ||
341 | if (mMultipleViewsAtOnce) | 345 | if (mMultipleViewsAtOnce) |
342 | state = KABPrefs::instance()->mDetailsPageVisible; | 346 | state = KABPrefs::instance()->mDetailsPageVisible; |
343 | else | 347 | else |
344 | state = false; | 348 | state = false; |
345 | 349 | ||
346 | mActionDetails->setChecked( state ); | 350 | mActionDetails->setChecked( state ); |
347 | setDetailsVisible( state ); | 351 | setDetailsVisible( state ); |
348 | 352 | ||
349 | state = KABPrefs::instance()->mJumpButtonBarVisible; | 353 | state = KABPrefs::instance()->mJumpButtonBarVisible; |
350 | 354 | ||
351 | mActionJumpBar->setChecked( state ); | 355 | mActionJumpBar->setChecked( state ); |
352 | setJumpButtonBarVisible( state ); | 356 | setJumpButtonBarVisible( state ); |
353 | /*US | 357 | /*US |
354 | QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; | 358 | QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; |
355 | if ( splitterSize.count() == 0 ) { | 359 | if ( splitterSize.count() == 0 ) { |
356 | splitterSize.append( width() / 2 ); | 360 | splitterSize.append( width() / 2 ); |
@@ -676,66 +680,67 @@ void KABCore::export2phone() | |||
676 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 680 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
677 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 681 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
678 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 682 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
679 | 683 | ||
680 | if ( !ex2phone.exec() ) { | 684 | if ( !ex2phone.exec() ) { |
681 | return; | 685 | return; |
682 | } | 686 | } |
683 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 687 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
684 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 688 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
685 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 689 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
686 | 690 | ||
687 | 691 | ||
688 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 692 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
689 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 693 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
690 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 694 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
691 | 695 | ||
692 | QStringList uids = mViewManager->selectedUids(); | 696 | QStringList uids = mViewManager->selectedUids(); |
693 | if ( uids.isEmpty() ) | 697 | if ( uids.isEmpty() ) |
694 | return; | 698 | return; |
695 | 699 | ||
696 | QString fileName = getPhoneFile(); | 700 | QString fileName = getPhoneFile(); |
697 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) | 701 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) |
698 | return; | 702 | return; |
699 | 703 | ||
704 | message(i18n("Exporting to phone...")); | ||
700 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); | 705 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); |
701 | 706 | ||
702 | } | 707 | } |
703 | QString KABCore::getPhoneFile() | 708 | QString KABCore::getPhoneFile() |
704 | { | 709 | { |
705 | #ifdef _WIN32_ | 710 | #ifdef _WIN32_ |
706 | return locateLocal("tmp", "phonefile.vcf"); | 711 | return locateLocal("tmp", "phonefile.vcf"); |
707 | #else | 712 | #else |
708 | return "/tmp/phonefile.vcf"; | 713 | return "/tmp/phonefile.vcf"; |
709 | #endif | 714 | #endif |
710 | 715 | ||
711 | } | 716 | } |
712 | void KABCore::writeToPhone( ) | 717 | void KABCore::writeToPhone( ) |
713 | { | 718 | { |
714 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) | 719 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) |
715 | qDebug("Export okay "); | 720 | message(i18n("Export to phone finished!")); |
716 | else | 721 | else |
717 | qDebug("Error export contacts "); | 722 | qDebug(i18n("Error exporting to phone")); |
718 | } | 723 | } |
719 | void KABCore::beamVCard() | 724 | void KABCore::beamVCard() |
720 | { | 725 | { |
721 | QStringList uids = mViewManager->selectedUids(); | 726 | QStringList uids = mViewManager->selectedUids(); |
722 | if ( !uids.isEmpty() ) | 727 | if ( !uids.isEmpty() ) |
723 | beamVCard( uids ); | 728 | beamVCard( uids ); |
724 | } | 729 | } |
725 | 730 | ||
726 | 731 | ||
727 | void KABCore::beamVCard(const QStringList& uids) | 732 | void KABCore::beamVCard(const QStringList& uids) |
728 | { | 733 | { |
729 | /*US | 734 | /*US |
730 | QString beamFilename; | 735 | QString beamFilename; |
731 | Opie::OPimContact c; | 736 | Opie::OPimContact c; |
732 | if ( actionPersonal->isOn() ) { | 737 | if ( actionPersonal->isOn() ) { |
733 | beamFilename = addressbookPersonalVCardName(); | 738 | beamFilename = addressbookPersonalVCardName(); |
734 | if ( !QFile::exists( beamFilename ) ) | 739 | if ( !QFile::exists( beamFilename ) ) |
735 | return; // can't beam a non-existent file | 740 | return; // can't beam a non-existent file |
736 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, | 741 | Opie::OPimContactAccessBackend* vcard_backend = new Opie::OPimContactAccessBackend_VCard( QString::null, |
737 | beamFilename ); | 742 | beamFilename ); |
738 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); | 743 | Opie::OPimContactAccess* access = new Opie::OPimContactAccess ( "addressbook", QString::null , vcard_backend, true ); |
739 | Opie::OPimContactAccess::List allList = access->allRecords(); | 744 | Opie::OPimContactAccess::List allList = access->allRecords(); |
740 | Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first | 745 | Opie::OPimContactAccess::List::Iterator it = allList.begin(); // Just take first |
741 | c = *it; | 746 | c = *it; |
@@ -810,49 +815,49 @@ void KABCore::beamVCard(const QStringList& uids) | |||
810 | if ( outFile.open(IO_WriteOnly) ) { | 815 | if ( outFile.open(IO_WriteOnly) ) { |
811 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); | 816 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); |
812 | QTextStream t( &outFile ); // use a text stream | 817 | QTextStream t( &outFile ); // use a text stream |
813 | //t.setEncoding( QTextStream::UnicodeUTF8 ); | 818 | //t.setEncoding( QTextStream::UnicodeUTF8 ); |
814 | t.setEncoding( QTextStream::Latin1 ); | 819 | t.setEncoding( QTextStream::Latin1 ); |
815 | t <<datastream.latin1(); | 820 | t <<datastream.latin1(); |
816 | outFile.close(); | 821 | outFile.close(); |
817 | Ir *ir = new Ir( this ); | 822 | Ir *ir = new Ir( this ); |
818 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); | 823 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); |
819 | ir->send( fileName, description, "text/x-vCard" ); | 824 | ir->send( fileName, description, "text/x-vCard" ); |
820 | } else { | 825 | } else { |
821 | qDebug("Error open temp beam file "); | 826 | qDebug("Error open temp beam file "); |
822 | return; | 827 | return; |
823 | } | 828 | } |
824 | #endif | 829 | #endif |
825 | 830 | ||
826 | } | 831 | } |
827 | 832 | ||
828 | void KABCore::beamDone( Ir *ir ) | 833 | void KABCore::beamDone( Ir *ir ) |
829 | { | 834 | { |
830 | #ifndef DESKTOP_VERSION | 835 | #ifndef DESKTOP_VERSION |
831 | delete ir; | 836 | delete ir; |
832 | #endif | 837 | #endif |
833 | topLevelWidget()->raise(); | 838 | topLevelWidget()->raise(); |
834 | message( i18n("Beaming successful!") ); | 839 | message( i18n("Beaming finished!") ); |
835 | } | 840 | } |
836 | 841 | ||
837 | 842 | ||
838 | void KABCore::browse( const QString& url ) | 843 | void KABCore::browse( const QString& url ) |
839 | { | 844 | { |
840 | #ifndef KAB_EMBEDDED | 845 | #ifndef KAB_EMBEDDED |
841 | kapp->invokeBrowser( url ); | 846 | kapp->invokeBrowser( url ); |
842 | #else //KAB_EMBEDDED | 847 | #else //KAB_EMBEDDED |
843 | qDebug("KABCore::browse must be fixed"); | 848 | qDebug("KABCore::browse must be fixed"); |
844 | #endif //KAB_EMBEDDED | 849 | #endif //KAB_EMBEDDED |
845 | } | 850 | } |
846 | 851 | ||
847 | void KABCore::selectAllContacts() | 852 | void KABCore::selectAllContacts() |
848 | { | 853 | { |
849 | mViewManager->setSelected( QString::null, true ); | 854 | mViewManager->setSelected( QString::null, true ); |
850 | } | 855 | } |
851 | 856 | ||
852 | void KABCore::deleteContacts() | 857 | void KABCore::deleteContacts() |
853 | { | 858 | { |
854 | QStringList uidList = mViewManager->selectedUids(); | 859 | QStringList uidList = mViewManager->selectedUids(); |
855 | deleteContacts( uidList ); | 860 | deleteContacts( uidList ); |
856 | } | 861 | } |
857 | 862 | ||
858 | void KABCore::deleteContacts( const QStringList &uids ) | 863 | void KABCore::deleteContacts( const QStringList &uids ) |
@@ -1174,71 +1179,67 @@ void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) | |||
1174 | { | 1179 | { |
1175 | if ( mMultipleViewsAtOnce ) | 1180 | if ( mMultipleViewsAtOnce ) |
1176 | { | 1181 | { |
1177 | editContact( uid ); | 1182 | editContact( uid ); |
1178 | } | 1183 | } |
1179 | else | 1184 | else |
1180 | { | 1185 | { |
1181 | setDetailsVisible( true ); | 1186 | setDetailsVisible( true ); |
1182 | mActionDetails->setChecked(true); | 1187 | mActionDetails->setChecked(true); |
1183 | } | 1188 | } |
1184 | 1189 | ||
1185 | } | 1190 | } |
1186 | 1191 | ||
1187 | void KABCore::save() | 1192 | void KABCore::save() |
1188 | { | 1193 | { |
1189 | if (syncManager->blockSave()) | 1194 | if (syncManager->blockSave()) |
1190 | return; | 1195 | return; |
1191 | if ( !mModified ) | 1196 | if ( !mModified ) |
1192 | return; | 1197 | return; |
1193 | 1198 | ||
1194 | syncManager->setBlockSave(true); | 1199 | syncManager->setBlockSave(true); |
1195 | QString text = i18n( "There was an error while attempting to save\n the " | 1200 | QString text = i18n( "There was an error while attempting to save\n the " |
1196 | "address book. Please check that some \nother application is " | 1201 | "address book. Please check that some \nother application is " |
1197 | "not using it. " ); | 1202 | "not using it. " ); |
1198 | statusMessage(i18n("Saving addressbook ... ")); | 1203 | message(i18n("Saving addressbook ... ")); |
1199 | #ifndef KAB_EMBEDDED | 1204 | #ifndef KAB_EMBEDDED |
1200 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); | 1205 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); |
1201 | if ( !b || !b->save() ) { | 1206 | if ( !b || !b->save() ) { |
1202 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); | 1207 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); |
1203 | } | 1208 | } |
1204 | #else //KAB_EMBEDDED | 1209 | #else //KAB_EMBEDDED |
1205 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); | 1210 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); |
1206 | if ( !b || !b->save() ) { | 1211 | if ( !b || !b->save() ) { |
1207 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); | 1212 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); |
1208 | } | 1213 | } |
1209 | #endif //KAB_EMBEDDED | 1214 | #endif //KAB_EMBEDDED |
1210 | 1215 | ||
1211 | statusMessage(i18n("Addressbook saved!")); | 1216 | message(i18n("Addressbook saved!")); |
1212 | setModified( false ); | 1217 | setModified( false ); |
1213 | syncManager->setBlockSave(false); | 1218 | syncManager->setBlockSave(false); |
1214 | } | 1219 | } |
1215 | 1220 | ||
1216 | void KABCore::statusMessage(QString mess , int time ) | 1221 | |
1217 | { | ||
1218 | //topLevelWidget()->setCaption( mess ); | ||
1219 | // pending setting timer to revome message | ||
1220 | } | ||
1221 | void KABCore::undo() | 1222 | void KABCore::undo() |
1222 | { | 1223 | { |
1223 | UndoStack::instance()->undo(); | 1224 | UndoStack::instance()->undo(); |
1224 | 1225 | ||
1225 | // Refresh the view | 1226 | // Refresh the view |
1226 | mViewManager->refreshView(); | 1227 | mViewManager->refreshView(); |
1227 | } | 1228 | } |
1228 | 1229 | ||
1229 | void KABCore::redo() | 1230 | void KABCore::redo() |
1230 | { | 1231 | { |
1231 | RedoStack::instance()->redo(); | 1232 | RedoStack::instance()->redo(); |
1232 | 1233 | ||
1233 | // Refresh the view | 1234 | // Refresh the view |
1234 | mViewManager->refreshView(); | 1235 | mViewManager->refreshView(); |
1235 | } | 1236 | } |
1236 | 1237 | ||
1237 | void KABCore::setJumpButtonBarVisible( bool visible ) | 1238 | void KABCore::setJumpButtonBarVisible( bool visible ) |
1238 | { | 1239 | { |
1239 | if (mMultipleViewsAtOnce) | 1240 | if (mMultipleViewsAtOnce) |
1240 | { | 1241 | { |
1241 | if ( visible ) | 1242 | if ( visible ) |
1242 | mJumpButtonBar->show(); | 1243 | mJumpButtonBar->show(); |
1243 | else | 1244 | else |
1244 | mJumpButtonBar->hide(); | 1245 | mJumpButtonBar->hide(); |
@@ -2134,49 +2135,49 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString | |||
2134 | { | 2135 | { |
2135 | // qDebug("KABCore::requestForBirthdayList"); | 2136 | // qDebug("KABCore::requestForBirthdayList"); |
2136 | QStringList birthdayList; | 2137 | QStringList birthdayList; |
2137 | QStringList anniversaryList; | 2138 | QStringList anniversaryList; |
2138 | QStringList realNameList; | 2139 | QStringList realNameList; |
2139 | QStringList preferredEmailList; | 2140 | QStringList preferredEmailList; |
2140 | QStringList assembledNameList; | 2141 | QStringList assembledNameList; |
2141 | QStringList uidList; | 2142 | QStringList uidList; |
2142 | 2143 | ||
2143 | KABC::AddressBook::Iterator it; | 2144 | KABC::AddressBook::Iterator it; |
2144 | 2145 | ||
2145 | int count = 0; | 2146 | int count = 0; |
2146 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2147 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2147 | ++count; | 2148 | ++count; |
2148 | } | 2149 | } |
2149 | QProgressBar bar(count,0 ); | 2150 | QProgressBar bar(count,0 ); |
2150 | int w = 300; | 2151 | int w = 300; |
2151 | if ( QApplication::desktop()->width() < 320 ) | 2152 | if ( QApplication::desktop()->width() < 320 ) |
2152 | w = 220; | 2153 | w = 220; |
2153 | int h = bar.sizeHint().height() ; | 2154 | int h = bar.sizeHint().height() ; |
2154 | int dw = QApplication::desktop()->width(); | 2155 | int dw = QApplication::desktop()->width(); |
2155 | int dh = QApplication::desktop()->height(); | 2156 | int dh = QApplication::desktop()->height(); |
2156 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2157 | bar.show(); | 2158 | bar.show(); |
2158 | bar.setCaption (i18n("collecting birthdays - close to abort!") ); | 2159 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); |
2159 | qApp->processEvents(); | 2160 | qApp->processEvents(); |
2160 | 2161 | ||
2161 | QDate bday; | 2162 | QDate bday; |
2162 | QString anni; | 2163 | QString anni; |
2163 | QString formattedbday; | 2164 | QString formattedbday; |
2164 | 2165 | ||
2165 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) | 2166 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) |
2166 | { | 2167 | { |
2167 | if ( ! bar.isVisible() ) | 2168 | if ( ! bar.isVisible() ) |
2168 | return; | 2169 | return; |
2169 | bar.setProgress( count++ ); | 2170 | bar.setProgress( count++ ); |
2170 | qApp->processEvents(); | 2171 | qApp->processEvents(); |
2171 | bday = (*it).birthday().date(); | 2172 | bday = (*it).birthday().date(); |
2172 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); | 2173 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); |
2173 | 2174 | ||
2174 | if ( bday.isValid() || !anni.isEmpty()) | 2175 | if ( bday.isValid() || !anni.isEmpty()) |
2175 | { | 2176 | { |
2176 | if (bday.isValid()) | 2177 | if (bday.isValid()) |
2177 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); | 2178 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); |
2178 | else | 2179 | else |
2179 | formattedbday = "NOTVALID"; | 2180 | formattedbday = "NOTVALID"; |
2180 | if (anni.isEmpty()) | 2181 | if (anni.isEmpty()) |
2181 | anni = "INVALID"; | 2182 | anni = "INVALID"; |
2182 | 2183 | ||
@@ -2788,51 +2789,50 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
2788 | 2789 | ||
2789 | AddressBook abLocal( resource,"syncContact"); | 2790 | AddressBook abLocal( resource,"syncContact"); |
2790 | bool syncOK = false; | 2791 | bool syncOK = false; |
2791 | if ( abLocal.load() ) { | 2792 | if ( abLocal.load() ) { |
2792 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2793 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2793 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2794 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2794 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 2795 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
2795 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2796 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2796 | if ( syncOK ) { | 2797 | if ( syncOK ) { |
2797 | if ( syncManager->mWriteBackFile ) { | 2798 | if ( syncManager->mWriteBackFile ) { |
2798 | abLocal.removeSyncAddressees( false ); | 2799 | abLocal.removeSyncAddressees( false ); |
2799 | abLocal.saveAB(); | 2800 | abLocal.saveAB(); |
2800 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2801 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2801 | } | 2802 | } |
2802 | } | 2803 | } |
2803 | setModified(); | 2804 | setModified(); |
2804 | } | 2805 | } |
2805 | if ( syncOK ) | 2806 | if ( syncOK ) |
2806 | mViewManager->refreshView(); | 2807 | mViewManager->refreshView(); |
2807 | return syncOK; | 2808 | return syncOK; |
2808 | 2809 | ||
2809 | } | 2810 | } |
2810 | void KABCore::message( QString m ) | 2811 | void KABCore::message( QString m ) |
2811 | { | 2812 | { |
2812 | |||
2813 | topLevelWidget()->setCaption( m ); | 2813 | topLevelWidget()->setCaption( m ); |
2814 | QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); | 2814 | mMessageTimer->start( 15000, true ); |
2815 | } | 2815 | } |
2816 | bool KABCore::syncPhone() | 2816 | bool KABCore::syncPhone() |
2817 | { | 2817 | { |
2818 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2818 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2819 | QString fileName = getPhoneFile(); | 2819 | QString fileName = getPhoneFile(); |
2820 | if ( !PhoneAccess::readFromPhone( fileName) ) { | 2820 | if ( !PhoneAccess::readFromPhone( fileName) ) { |
2821 | message(i18n("Phone access failed!")); | 2821 | message(i18n("Phone access failed!")); |
2822 | return false; | 2822 | return false; |
2823 | } | 2823 | } |
2824 | AddressBook abLocal( fileName,"syncContact"); | 2824 | AddressBook abLocal( fileName,"syncContact"); |
2825 | bool syncOK = false; | 2825 | bool syncOK = false; |
2826 | { | 2826 | { |
2827 | abLocal.importFromFile( fileName ); | 2827 | abLocal.importFromFile( fileName ); |
2828 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2828 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2829 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2829 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2830 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); | 2830 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); |
2831 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 2831 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
2832 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2832 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2833 | if ( syncOK ) { | 2833 | if ( syncOK ) { |
2834 | if ( syncManager->mWriteBackFile ) { | 2834 | if ( syncManager->mWriteBackFile ) { |
2835 | abLocal.removeSyncAddressees( true ); | 2835 | abLocal.removeSyncAddressees( true ); |
2836 | abLocal.saveABphone( fileName ); | 2836 | abLocal.saveABphone( fileName ); |
2837 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); | 2837 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); |
2838 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 2838 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
@@ -2849,26 +2849,27 @@ void KABCore::getFile( bool success ) | |||
2849 | { | 2849 | { |
2850 | if ( ! success ) { | 2850 | if ( ! success ) { |
2851 | message( i18n("Error receiving file. Nothing changed!") ); | 2851 | message( i18n("Error receiving file. Nothing changed!") ); |
2852 | return; | 2852 | return; |
2853 | } | 2853 | } |
2854 | mAddressBook->importFromFile( sentSyncFile() , false, true ); | 2854 | mAddressBook->importFromFile( sentSyncFile() , false, true ); |
2855 | message( i18n("Pi-Sync successful!") ); | 2855 | message( i18n("Pi-Sync successful!") ); |
2856 | mViewManager->refreshView(); | 2856 | mViewManager->refreshView(); |
2857 | } | 2857 | } |
2858 | void KABCore::syncFileRequest() | 2858 | void KABCore::syncFileRequest() |
2859 | { | 2859 | { |
2860 | mAddressBook->export2File( sentSyncFile() ); | 2860 | mAddressBook->export2File( sentSyncFile() ); |
2861 | } | 2861 | } |
2862 | QString KABCore::sentSyncFile() | 2862 | QString KABCore::sentSyncFile() |
2863 | { | 2863 | { |
2864 | #ifdef _WIN32_ | 2864 | #ifdef _WIN32_ |
2865 | return locateLocal( "tmp", "copysyncab.vcf" ); | 2865 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2866 | #else | 2866 | #else |
2867 | return QString( "/tmp/copysyncab.vcf" ); | 2867 | return QString( "/tmp/copysyncab.vcf" ); |
2868 | #endif | 2868 | #endif |
2869 | } | 2869 | } |
2870 | 2870 | ||
2871 | void KABCore::setCaptionBack() | 2871 | void KABCore::setCaptionBack() |
2872 | { | 2872 | { |
2873 | mMessageTimer->stop(); | ||
2873 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | 2874 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); |
2874 | } | 2875 | } |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 5871d39..c7be343 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -8,48 +8,49 @@ | |||
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 | #ifndef KABCORE_H | 24 | #ifndef KABCORE_H |
25 | #define KABCORE_H | 25 | #define KABCORE_H |
26 | 26 | ||
27 | #include <kabc/field.h> | 27 | #include <kabc/field.h> |
28 | 28 | ||
29 | #ifndef KAB_EMBEDDED | 29 | #ifndef KAB_EMBEDDED |
30 | #endif //KAB_EMBEDDED | 30 | #endif //KAB_EMBEDDED |
31 | #include <qdict.h> | 31 | #include <qdict.h> |
32 | #include <qtimer.h> | ||
32 | 33 | ||
33 | #include <qwidget.h> | 34 | #include <qwidget.h> |
34 | #include <qpopupmenu.h> | 35 | #include <qpopupmenu.h> |
35 | #include <ksyncmanager.h> | 36 | #include <ksyncmanager.h> |
36 | 37 | ||
37 | namespace KABC { | 38 | namespace KABC { |
38 | class AddressBook; | 39 | class AddressBook; |
39 | } | 40 | } |
40 | 41 | ||
41 | #ifndef KAB_EMBEDDED | 42 | #ifndef KAB_EMBEDDED |
42 | class KAboutData; | 43 | class KAboutData; |
43 | class KConfig; | 44 | class KConfig; |
44 | 45 | ||
45 | class KAddressBookService; | 46 | class KAddressBookService; |
46 | class LDAPSearchDialog; | 47 | class LDAPSearchDialog; |
47 | #else //KAB_EMBEDDED | 48 | #else //KAB_EMBEDDED |
48 | class KAddressBookMain; | 49 | class KAddressBookMain; |
49 | //US class QAction; | 50 | //US class QAction; |
50 | #endif //KAB_EMBEDDED | 51 | #endif //KAB_EMBEDDED |
51 | class KCMultiDialog; | 52 | class KCMultiDialog; |
52 | class KXMLGUIClient; | 53 | class KXMLGUIClient; |
53 | class ExtensionManager; | 54 | class ExtensionManager; |
54 | class XXPortManager; | 55 | class XXPortManager; |
55 | class JumpButtonBar; | 56 | class JumpButtonBar; |
@@ -122,49 +123,48 @@ class KABCore : public QWidget, public KSyncInterface | |||
122 | */ | 123 | */ |
123 | QStringList selectedUIDs() const; | 124 | QStringList selectedUIDs() const; |
124 | 125 | ||
125 | /** | 126 | /** |
126 | Displays the ResourceSelectDialog and returns the selected | 127 | Displays the ResourceSelectDialog and returns the selected |
127 | resource or a null pointer if no resource was selected by | 128 | resource or a null pointer if no resource was selected by |
128 | the user. | 129 | the user. |
129 | */ | 130 | */ |
130 | KABC::Resource *requestResource( QWidget *parent ); | 131 | KABC::Resource *requestResource( QWidget *parent ); |
131 | 132 | ||
132 | #ifndef KAB_EMBEDDED | 133 | #ifndef KAB_EMBEDDED |
133 | static KAboutData *createAboutData(); | 134 | static KAboutData *createAboutData(); |
134 | #endif //KAB_EMBEDDED | 135 | #endif //KAB_EMBEDDED |
135 | 136 | ||
136 | #ifdef KAB_EMBEDDED | 137 | #ifdef KAB_EMBEDDED |
137 | inline QPopupMenu* getImportMenu() { return ImportMenu;} | 138 | inline QPopupMenu* getImportMenu() { return ImportMenu;} |
138 | inline QPopupMenu* getExportMenu() { return ExportMenu;} | 139 | inline QPopupMenu* getExportMenu() { return ExportMenu;} |
139 | #endif //KAB_EMBEDDED | 140 | #endif //KAB_EMBEDDED |
140 | 141 | ||
141 | public slots: | 142 | public slots: |
142 | #ifdef KAB_EMBEDDED | 143 | #ifdef KAB_EMBEDDED |
143 | void createAboutData(); | 144 | void createAboutData(); |
144 | #endif //KAB_EMBEDDED | 145 | #endif //KAB_EMBEDDED |
145 | 146 | ||
146 | void statusMessage(QString, int time = 0 ); | ||
147 | void showLicence(); | 147 | void showLicence(); |
148 | void faq(); | 148 | void faq(); |
149 | void whatsnew() ; | 149 | void whatsnew() ; |
150 | void synchowto() ; | 150 | void synchowto() ; |
151 | void writeToPhone(); | 151 | void writeToPhone(); |
152 | 152 | ||
153 | /** | 153 | /** |
154 | Is called whenever a contact is selected in the view. | 154 | Is called whenever a contact is selected in the view. |
155 | */ | 155 | */ |
156 | void setContactSelected( const QString &uid ); | 156 | void setContactSelected( const QString &uid ); |
157 | 157 | ||
158 | /** | 158 | /** |
159 | Opens the preferred mail composer with all selected contacts as | 159 | Opens the preferred mail composer with all selected contacts as |
160 | arguments. | 160 | arguments. |
161 | */ | 161 | */ |
162 | void sendMail(); | 162 | void sendMail(); |
163 | 163 | ||
164 | /** | 164 | /** |
165 | Opens the preferred mail composer with the given contacts as | 165 | Opens the preferred mail composer with the given contacts as |
166 | arguments. | 166 | arguments. |
167 | */ | 167 | */ |
168 | void sendMail( const QString& email ); | 168 | void sendMail( const QString& email ); |
169 | 169 | ||
170 | 170 | ||
@@ -349,48 +349,49 @@ class KABCore : public QWidget, public KSyncInterface | |||
349 | void getFile( bool success ); | 349 | void getFile( bool success ); |
350 | void syncFileRequest(); | 350 | void syncFileRequest(); |
351 | void setDetailsVisible( bool visible ); | 351 | void setDetailsVisible( bool visible ); |
352 | void setDetailsToState(); | 352 | void setDetailsToState(); |
353 | // void slotSyncMenu( int ); | 353 | // void slotSyncMenu( int ); |
354 | private slots: | 354 | private slots: |
355 | void setJumpButtonBarVisible( bool visible ); | 355 | void setJumpButtonBarVisible( bool visible ); |
356 | void setCaptionBack(); | 356 | void setCaptionBack(); |
357 | void importFromOL(); | 357 | void importFromOL(); |
358 | void extensionModified( const KABC::Addressee::List &list ); | 358 | void extensionModified( const KABC::Addressee::List &list ); |
359 | void extensionChanged( int id ); | 359 | void extensionChanged( int id ); |
360 | void clipboardDataChanged(); | 360 | void clipboardDataChanged(); |
361 | void updateActionMenu(); | 361 | void updateActionMenu(); |
362 | void configureKeyBindings(); | 362 | void configureKeyBindings(); |
363 | void removeVoice(); | 363 | void removeVoice(); |
364 | #ifdef KAB_EMBEDDED | 364 | #ifdef KAB_EMBEDDED |
365 | void configureResources(); | 365 | void configureResources(); |
366 | #endif //KAB_EMBEDDED | 366 | #endif //KAB_EMBEDDED |
367 | 367 | ||
368 | void slotEditorDestroyed( const QString &uid ); | 368 | void slotEditorDestroyed( const QString &uid ); |
369 | void configurationChanged(); | 369 | void configurationChanged(); |
370 | void addressBookChanged(); | 370 | void addressBookChanged(); |
371 | 371 | ||
372 | private: | 372 | private: |
373 | QTimer *mMessageTimer; | ||
373 | void initGUI(); | 374 | void initGUI(); |
374 | void initActions(); | 375 | void initActions(); |
375 | QString getPhoneFile(); | 376 | QString getPhoneFile(); |
376 | 377 | ||
377 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, | 378 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, |
378 | const char *name = 0 ); | 379 | const char *name = 0 ); |
379 | 380 | ||
380 | KXMLGUIClient *mGUIClient; | 381 | KXMLGUIClient *mGUIClient; |
381 | 382 | ||
382 | KABC::AddressBook *mAddressBook; | 383 | KABC::AddressBook *mAddressBook; |
383 | 384 | ||
384 | ViewManager *mViewManager; | 385 | ViewManager *mViewManager; |
385 | // QSplitter *mDetailsSplitter; | 386 | // QSplitter *mDetailsSplitter; |
386 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 387 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
387 | ViewContainer *mDetails; | 388 | ViewContainer *mDetails; |
388 | KDGanttMinimizeSplitter* mMiniSplitter; | 389 | KDGanttMinimizeSplitter* mMiniSplitter; |
389 | XXPortManager *mXXPortManager; | 390 | XXPortManager *mXXPortManager; |
390 | JumpButtonBar *mJumpButtonBar; | 391 | JumpButtonBar *mJumpButtonBar; |
391 | IncSearchWidget *mIncSearchWidget; | 392 | IncSearchWidget *mIncSearchWidget; |
392 | ExtensionManager *mExtensionManager; | 393 | ExtensionManager *mExtensionManager; |
393 | 394 | ||
394 | KCMultiDialog *mConfigureDialog; | 395 | KCMultiDialog *mConfigureDialog; |
395 | 396 | ||
396 | #ifndef KAB_EMBEDDED | 397 | #ifndef KAB_EMBEDDED |