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 | |||
@@ -216,17 +216,20 @@ bool ReadVCALText(char *Buffer, char *Start, char *Value) | |||
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)); |
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index c584c35..3641c0c 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -472,17 +472,17 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) | |||
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(); |
@@ -505,16 +505,17 @@ void AddressBook::importFromFile( QString fileName, bool replaceLabel, bool rem | |||
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 ); |
diff --git a/kabc/addressbook.h b/kabc/addressbook.h index 23bba02..5edca06 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h | |||
@@ -142,17 +142,17 @@ class AddressBook : public QObject | |||
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 | ||
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 | |||
@@ -67,18 +67,18 @@ 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() ) ); |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 087e9e3..3ab06c4 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -199,16 +199,17 @@ class KAex2phonePrefs : public QDialog | |||
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 |
@@ -217,17 +218,16 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
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 * ) ), |
@@ -302,16 +302,19 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const | |||
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(); |
@@ -323,18 +326,19 @@ KABCore::~KABCore() | |||
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 | ||
@@ -692,34 +696,35 @@ void KABCore::export2phone() | |||
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 | ||
@@ -826,17 +831,17 @@ void KABCore::beamVCard(const QStringList& uids) | |||
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 |
@@ -1190,39 +1195,35 @@ void KABCore::save() | |||
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 | ||
@@ -2150,17 +2151,17 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString | |||
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 | { |
@@ -2804,19 +2805,18 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
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; |
@@ -2865,10 +2865,11 @@ QString KABCore::sentSyncFile() | |||
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 | |||
@@ -24,16 +24,17 @@ | |||
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 | } |
@@ -138,17 +139,16 @@ class KABCore : public QWidget, public KSyncInterface | |||
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. |
@@ -365,16 +365,17 @@ class KABCore : public QWidget, public KSyncInterface | |||
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; |