summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b4e0b07..d5de9cb 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2539,96 +2539,97 @@ void KABCore::configureResources()
2539 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2539 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2540} 2540}
2541#endif //KAB_EMBEDDED 2541#endif //KAB_EMBEDDED
2542 2542
2543 2543
2544/* this method will be called through the QCop interface from Ko/Pi to select addresses 2544/* this method will be called through the QCop interface from Ko/Pi to select addresses
2545 * for the attendees list of an event. 2545 * for the attendees list of an event.
2546 */ 2546 */
2547void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2547void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2548{ 2548{
2549 qDebug("KABCore::requestForNameEmailUidList "); 2549 qDebug("KABCore::requestForNameEmailUidList ");
2550 bool ok = false; 2550 bool ok = false;
2551 mEmailSourceChannel = sourceChannel; 2551 mEmailSourceChannel = sourceChannel;
2552 mEmailSourceUID = uid; 2552 mEmailSourceUID = uid;
2553 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2553 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2554 //callContactdialog(); 2554 //callContactdialog();
2555#if 0 2555#if 0
2556 int wid = uid.toInt( &ok ); 2556 int wid = uid.toInt( &ok );
2557 qDebug("UID %s ", uid.latin1()); 2557 qDebug("UID %s ", uid.latin1());
2558 if ( ok ) { 2558 if ( ok ) {
2559 if ( wid != QApplication::desktop()->width() ) { 2559 if ( wid != QApplication::desktop()->width() ) {
2560 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2560 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2561 message( i18n("Resizing, please wait...") ); 2561 message( i18n("Resizing, please wait...") );
2562 mMainWindow->showMinimized(); 2562 mMainWindow->showMinimized();
2563 /* 2563 /*
2564 { 2564 {
2565 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2565 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2566 } 2566 }
2567 */ 2567 */
2568 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); 2568 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2569 return; 2569 return;
2570 } 2570 }
2571 2571
2572 } else { 2572 } else {
2573 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2573 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2574 } 2574 }
2575 callContactdialog(); 2575 callContactdialog();
2576 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2576 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2577#endif 2577#endif
2578} 2578}
2579void KABCore::resizeAndCallContactdialog() 2579void KABCore::resizeAndCallContactdialog()
2580{ 2580{
2581 updateMainWindow(); 2581 updateMainWindow();
2582 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2582 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2583} 2583}
2584 2584
2585void KABCore::doRingSync() 2585void KABCore::doRingSync()
2586{ 2586{
2587 topLevelWidget()->raise();
2587 syncManager->multiSync( false ); 2588 syncManager->multiSync( false );
2588} 2589}
2589void KABCore::callContactdialog() 2590void KABCore::callContactdialog()
2590{ 2591{
2591 static bool running = false; 2592 static bool running = false;
2592 if (running) return; 2593 if (running) return;
2593 running = true; 2594 running = true;
2594 QStringList nameList; 2595 QStringList nameList;
2595 QStringList emailList; 2596 QStringList emailList;
2596 QStringList uidList; 2597 QStringList uidList;
2597 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); 2598 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2598 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2599 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2599 uint i=0; 2600 uint i=0;
2600 for (i=0; i < list.count(); i++) 2601 for (i=0; i < list.count(); i++)
2601 { 2602 {
2602 nameList.append(list[i].realName()); 2603 nameList.append(list[i].realName());
2603 emailList.append(list[i].preferredEmail()); 2604 emailList.append(list[i].preferredEmail());
2604 uidList.append(list[i].uid()); 2605 uidList.append(list[i].uid());
2605 } 2606 }
2606 QString uid = mEmailSourceUID; 2607 QString uid = mEmailSourceUID;
2607 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2608 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2608 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2609 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2609 running = false; 2610 running = false;
2610} 2611}
2611/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2612/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2612 * to put them into the calendar. 2613 * to put them into the calendar.
2613 */ 2614 */
2614void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2615void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2615{ 2616{
2616 // qDebug("KABCore::requestForBirthdayList"); 2617 // qDebug("KABCore::requestForBirthdayList");
2617 QStringList birthdayList; 2618 QStringList birthdayList;
2618 QStringList anniversaryList; 2619 QStringList anniversaryList;
2619 QStringList realNameList; 2620 QStringList realNameList;
2620 QStringList preferredEmailList; 2621 QStringList preferredEmailList;
2621 QStringList assembledNameList; 2622 QStringList assembledNameList;
2622 QStringList uidList; 2623 QStringList uidList;
2623 2624
2624 KABC::AddressBook::Iterator it; 2625 KABC::AddressBook::Iterator it;
2625 2626
2626 int count = 0; 2627 int count = 0;
2627 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2628 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2628 ++count; 2629 ++count;
2629 } 2630 }
2630 QProgressBar bar(count,0 ); 2631 QProgressBar bar(count,0 );
2631 int w = 300; 2632 int w = 300;
2632 if ( QApplication::desktop()->width() < 320 ) 2633 if ( QApplication::desktop()->width() < 320 )
2633 w = 220; 2634 w = 220;
2634 int h = bar.sizeHint().height() ; 2635 int h = bar.sizeHint().height() ;