summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp2
-rw-r--r--kaddressbook/kabcore.cpp4
-rw-r--r--korganizer/mainwindow.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index df0fba4..d101589 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -531,97 +531,97 @@ void AddressBook::removeUntagged()
531 bool todelete = false; 531 bool todelete = false;
532 Iterator todel; 532 Iterator todel;
533 for ( ait = begin(); ait != end(); ++ait ) { 533 for ( ait = begin(); ait != end(); ++ait ) {
534 if ( todelete ) 534 if ( todelete )
535 removeAddressee( todel ); 535 removeAddressee( todel );
536 if (!(*ait).tagged()) { 536 if (!(*ait).tagged()) {
537 todelete = true; 537 todelete = true;
538 todel = ait; 538 todel = ait;
539 } else 539 } else
540 todelete = false; 540 todelete = false;
541 } 541 }
542 if ( todelete ) 542 if ( todelete )
543 removeAddressee( todel ); 543 removeAddressee( todel );
544 deleteRemovedAddressees(); 544 deleteRemovedAddressees();
545} 545}
546void AddressBook::smplifyAddressees() 546void AddressBook::smplifyAddressees()
547{ 547{
548 Iterator ait; 548 Iterator ait;
549 for ( ait = begin(); ait != end(); ++ait ) { 549 for ( ait = begin(); ait != end(); ++ait ) {
550 (*ait).simplifyEmails(); 550 (*ait).simplifyEmails();
551 (*ait).simplifyPhoneNumbers(); 551 (*ait).simplifyPhoneNumbers();
552 (*ait).simplifyPhoneNumberTypes(); 552 (*ait).simplifyPhoneNumberTypes();
553 (*ait).simplifyAddresses(); 553 (*ait).simplifyAddresses();
554 } 554 }
555} 555}
556void AddressBook::removeSyncInfo( QString syncProfile) 556void AddressBook::removeSyncInfo( QString syncProfile)
557{ 557{
558 Iterator ait; 558 Iterator ait;
559 for ( ait = begin(); ait != end(); ++ait ) { 559 for ( ait = begin(); ait != end(); ++ait ) {
560 (*ait).removeID( syncProfile ); 560 (*ait).removeID( syncProfile );
561 } 561 }
562 if ( syncProfile.isEmpty() ) { 562 if ( syncProfile.isEmpty() ) {
563 Iterator it = begin(); 563 Iterator it = begin();
564 Iterator it2 ; 564 Iterator it2 ;
565 QDateTime dt ( QDate( 2004,1,1) ); 565 QDateTime dt ( QDate( 2004,1,1) );
566 while ( it != end() ) { 566 while ( it != end() ) {
567 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { 567 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) {
568 it2 = it; 568 it2 = it;
569 //qDebug("removing %s ",(*it).uid().latin1() ); 569 //qDebug("removing %s ",(*it).uid().latin1() );
570 ++it; 570 ++it;
571 removeAddressee( it2 ); 571 removeAddressee( it2 );
572 } else { 572 } else {
573 //qDebug("skipping %s ",(*it).uid().latin1() ); 573 //qDebug("skipping %s ",(*it).uid().latin1() );
574 ++it; 574 ++it;
575 } 575 }
576 } 576 }
577 } else { 577 } else {
578 Addressee lse; 578 Addressee lse;
579 lse = mAddressBook->findByUid( "last-syncAddressee-"+ syncProfile ); 579 lse = findByUid( "last-syncAddressee-"+ syncProfile );
580 if ( ! lse.isEmpty() ) 580 if ( ! lse.isEmpty() )
581 removeAddressee( lse ); 581 removeAddressee( lse );
582 } 582 }
583 583
584} 584}
585void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync ) 585void AddressBook::preparePhoneSync( QString currentSyncDevice, bool isPreSync )
586{ 586{
587 Iterator ait; 587 Iterator ait;
588 for ( ait = begin(); ait != end(); ++ait ) { 588 for ( ait = begin(); ait != end(); ++ait ) {
589 QString id = (*ait).IDStr(); 589 QString id = (*ait).IDStr();
590 (*ait).setIDStr( ":"); 590 (*ait).setIDStr( ":");
591 (*ait).setExternalUID( id ); 591 (*ait).setExternalUID( id );
592 (*ait).setOriginalExternalUID( id ); 592 (*ait).setOriginalExternalUID( id );
593 if ( isPreSync ) 593 if ( isPreSync )
594 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL ); 594 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_EXTERNAL );
595 else { 595 else {
596 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 596 (*ait).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
597 (*ait).setID( currentSyncDevice,id ); 597 (*ait).setID( currentSyncDevice,id );
598 598
599 } 599 }
600 } 600 }
601} 601}
602void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) 602void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
603{ 603{
604 604
605 setUntagged(); 605 setUntagged();
606 KABC::Addressee::List list; 606 KABC::Addressee::List list;
607 QFile file( fileName ); 607 QFile file( fileName );
608 file.open( IO_ReadOnly ); 608 file.open( IO_ReadOnly );
609 QByteArray rawData = file.readAll(); 609 QByteArray rawData = file.readAll();
610 file.close(); 610 file.close();
611 QString data; 611 QString data;
612 612
613 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); 613 data = QString::fromUtf8( rawData.data(), rawData.size() + 1 );
614 KABC::VCardTool tool; 614 KABC::VCardTool tool;
615 list = tool.parseVCards( data ); 615 list = tool.parseVCards( data );
616 KABC::Addressee::List::Iterator it; 616 KABC::Addressee::List::Iterator it;
617 for ( it = list.begin(); it != list.end(); ++it ) { 617 for ( it = list.begin(); it != list.end(); ++it ) {
618 Iterator ait; 618 Iterator ait;
619 for ( ait = begin(); ait != end(); ++ait ) { 619 for ( ait = begin(); ait != end(); ++ait ) {
620 if ( !(*ait).tagged() ) { 620 if ( !(*ait).tagged() ) {
621 if ( (*ait).containsAdr(*it)) { 621 if ( (*ait).containsAdr(*it)) {
622 (*ait).setTagged(true); 622 (*ait).setTagged(true);
623 QString id = (*it).custom( "KADDRESSBOOK", "X-ExternalID" ); 623 QString id = (*it).custom( "KADDRESSBOOK", "X-ExternalID" );
624 (*it).setIDStr( ":"); 624 (*it).setIDStr( ":");
625 (*it).setID( currentSyncDevice,id ); 625 (*it).setID( currentSyncDevice,id );
626 (*it).setExternalUID( id ); 626 (*it).setExternalUID( id );
627 (*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID ); 627 (*it).setTempSyncStat( SYNC_TEMPSTATE_NEW_ID );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index e56e46a..2f00a09 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -268,101 +268,101 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
268 268
269 connect( mViewManager, SIGNAL( selected( const QString& ) ), 269 connect( mViewManager, SIGNAL( selected( const QString& ) ),
270 SLOT( setContactSelected( const QString& ) ) ); 270 SLOT( setContactSelected( const QString& ) ) );
271 connect( mViewManager, SIGNAL( executed( const QString& ) ), 271 connect( mViewManager, SIGNAL( executed( const QString& ) ),
272 SLOT( executeContact( const QString& ) ) ); 272 SLOT( executeContact( const QString& ) ) );
273 273
274 connect( mViewManager, SIGNAL( deleteRequest( ) ), 274 connect( mViewManager, SIGNAL( deleteRequest( ) ),
275 SLOT( deleteContacts( ) ) ); 275 SLOT( deleteContacts( ) ) );
276 connect( mViewManager, SIGNAL( modified() ), 276 connect( mViewManager, SIGNAL( modified() ),
277 SLOT( setModified() ) ); 277 SLOT( setModified() ) );
278 278
279 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 279 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
280 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 280 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
281 281
282 connect( mXXPortManager, SIGNAL( modified() ), 282 connect( mXXPortManager, SIGNAL( modified() ),
283 SLOT( setModified() ) ); 283 SLOT( setModified() ) );
284 284
285 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 285 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
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 310
311 mMessageTimer = new QTimer( this ); 311 mMessageTimer = new QTimer( this );
312 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 312 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
313 mEditorDialog = 0; 313 mEditorDialog = 0;
314 createAddresseeEditorDialog( this ); 314 createAddresseeEditorDialog( this );
315 setModified( false ); 315 setModified( false );
316 mBRdisabled = 0; 316 mBRdisabled = false;
317#ifndef DESKTOP_VERSION 317#ifndef DESKTOP_VERSION
318 infrared = 0; 318 infrared = 0;
319#endif 319#endif
320 toggleBeamReceive( ); 320 //toggleBeamReceive( );
321} 321}
322 322
323KABCore::~KABCore() 323KABCore::~KABCore()
324{ 324{
325 // save(); 325 // save();
326 //saveSettings(); 326 //saveSettings();
327 //KABPrefs::instance()->writeConfig(); 327 //KABPrefs::instance()->writeConfig();
328 delete AddresseeConfig::instance(); 328 delete AddresseeConfig::instance();
329 mAddressBook = 0; 329 mAddressBook = 0;
330 KABC::StdAddressBook::close(); 330 KABC::StdAddressBook::close();
331 331
332 delete syncManager; 332 delete syncManager;
333#ifndef DESKTOP_VERSION 333#ifndef DESKTOP_VERSION
334 if ( infrared ) 334 if ( infrared )
335 delete infrared; 335 delete infrared;
336#endif 336#endif
337} 337}
338void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 338void KABCore::receive( const QCString& cmsg, const QByteArray& data )
339{ 339{
340 qDebug("KA: QCOP message received: %s ", cmsg.data() ); 340 qDebug("KA: QCOP message received: %s ", cmsg.data() );
341 if ( cmsg == "setDocument(QString)" ) { 341 if ( cmsg == "setDocument(QString)" ) {
342 QDataStream stream( data, IO_ReadOnly ); 342 QDataStream stream( data, IO_ReadOnly );
343 QString fileName; 343 QString fileName;
344 stream >> fileName; 344 stream >> fileName;
345 recieve( fileName ); 345 recieve( fileName );
346 return; 346 return;
347 } 347 }
348} 348}
349void KABCore::toggleBeamReceive( ) 349void KABCore::toggleBeamReceive( )
350{ 350{
351 if ( mBRdisabled ) 351 if ( mBRdisabled )
352 return; 352 return;
353#ifndef DESKTOP_VERSION 353#ifndef DESKTOP_VERSION
354 if ( infrared ) { 354 if ( infrared ) {
355 qDebug("AB disable BeamReceive "); 355 qDebug("AB disable BeamReceive ");
356 delete infrared; 356 delete infrared;
357 infrared = 0; 357 infrared = 0;
358 mActionBR->setChecked(false); 358 mActionBR->setChecked(false);
359 return; 359 return;
360 } 360 }
361 qDebug("AB enable BeamReceive "); 361 qDebug("AB enable BeamReceive ");
362 mActionBR->setChecked(true); 362 mActionBR->setChecked(true);
363 363
364 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 364 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
365 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 365 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
366#endif 366#endif
367} 367}
368 368
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index dc2026b..fc2d59b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -234,97 +234,97 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
234 SLOT( processIncidenceSelection( Incidence * ) ) ); 234 SLOT( processIncidenceSelection( Incidence * ) ) );
235 connect( mView, SIGNAL( modifiedChanged( bool ) ), 235 connect( mView, SIGNAL( modifiedChanged( bool ) ),
236 SLOT( slotModifiedChanged( bool ) ) ); 236 SLOT( slotModifiedChanged( bool ) ) );
237 237
238 238
239 connect( mView, SIGNAL( tempDisableBR(bool) ), 239 connect( mView, SIGNAL( tempDisableBR(bool) ),
240 SLOT( disableBR(bool) ) ); 240 SLOT( disableBR(bool) ) );
241 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 241 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
242 mView->setModified( false ); 242 mView->setModified( false );
243 mBlockAtStartup = false; 243 mBlockAtStartup = false;
244 mView->setModified( false ); 244 mView->setModified( false );
245 setCentralWidget( mView ); 245 setCentralWidget( mView );
246 globalFlagBlockStartup = 0; 246 globalFlagBlockStartup = 0;
247 mView->show(); 247 mView->show();
248 delete splash; 248 delete splash;
249 if ( newFile ) 249 if ( newFile )
250 mView->updateConfig(); 250 mView->updateConfig();
251 // qApp->processEvents(); 251 // qApp->processEvents();
252 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 252 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
253 //fillSyncMenu(); 253 //fillSyncMenu();
254 254
255 255
256 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 256 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
257 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 257 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
258 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 258 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
259 mSyncManager->setDefaultFileName( defaultFileName()); 259 mSyncManager->setDefaultFileName( defaultFileName());
260 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 260 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
261 mSyncManager->fillSyncMenu(); 261 mSyncManager->fillSyncMenu();
262 262
263 263
264 264
265 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 265 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
266 if ( showWarning ) { 266 if ( showWarning ) {
267 KMessageBox::information( this, 267 KMessageBox::information( this,
268 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 268 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
269 qApp->processEvents(); 269 qApp->processEvents();
270 mView->dialogManager()->showSyncOptions(); 270 mView->dialogManager()->showSyncOptions();
271 } 271 }
272 272
273 //US listen for result adressed from Ka/Pi 273 //US listen for result adressed from Ka/Pi
274#ifndef DESKTOP_VERSION 274#ifndef DESKTOP_VERSION
275 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 275 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
276#endif 276#endif
277#ifndef DESKTOP_VERSION 277#ifndef DESKTOP_VERSION
278 infrared = 0; 278 infrared = 0;
279#endif 279#endif
280 280
281 mBRdisabled = false; 281 mBRdisabled = false;
282 toggleBeamReceive(); 282 //toggleBeamReceive();
283} 283}
284MainWindow::~MainWindow() 284MainWindow::~MainWindow()
285{ 285{
286 //qDebug("MainWindow::~MainWindow() "); 286 //qDebug("MainWindow::~MainWindow() ");
287 //save toolbar location 287 //save toolbar location
288 delete mCalendar; 288 delete mCalendar;
289 delete mSyncManager; 289 delete mSyncManager;
290#ifndef DESKTOP_VERSION 290#ifndef DESKTOP_VERSION
291 if ( infrared ) 291 if ( infrared )
292 delete infrared; 292 delete infrared;
293#endif 293#endif
294 294
295 295
296} 296}
297 297
298void MainWindow::disableBR(bool b) 298void MainWindow::disableBR(bool b)
299{ 299{
300#ifndef DESKTOP_VERSION 300#ifndef DESKTOP_VERSION
301 if ( b ) { 301 if ( b ) {
302 if ( infrared ) { 302 if ( infrared ) {
303 toggleBeamReceive(); 303 toggleBeamReceive();
304 mBRdisabled = true; 304 mBRdisabled = true;
305 } 305 }
306 mBRdisabled = true; 306 mBRdisabled = true;
307 } else { 307 } else {
308 if ( mBRdisabled ) { 308 if ( mBRdisabled ) {
309 mBRdisabled = false; 309 mBRdisabled = false;
310 //makes no sense,because other cal ap is probably running 310 //makes no sense,because other cal ap is probably running
311 // toggleBeamReceive(); 311 // toggleBeamReceive();
312 } 312 }
313 } 313 }
314#endif 314#endif
315 315
316} 316}
317bool MainWindow::beamReceiveEnabled() 317bool MainWindow::beamReceiveEnabled()
318{ 318{
319#ifndef DESKTOP_VERSION 319#ifndef DESKTOP_VERSION
320 return ( infrared != 0 ); 320 return ( infrared != 0 );
321#endif 321#endif
322 return false; 322 return false;
323} 323}
324 324
325void MainWindow::toggleBeamReceive() 325void MainWindow::toggleBeamReceive()
326{ 326{
327 if ( mBRdisabled ) 327 if ( mBRdisabled )
328 return; 328 return;
329#ifndef DESKTOP_VERSION 329#ifndef DESKTOP_VERSION
330 if ( infrared ) { 330 if ( infrared ) {