summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index e34951a..ce5c755 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2508,68 +2508,71 @@ void KABCore::configureResources()
2508} 2508}
2509#endif //KAB_EMBEDDED 2509#endif //KAB_EMBEDDED
2510 2510
2511 2511
2512/* this method will be called through the QCop interface from Ko/Pi to select addresses 2512/* this method will be called through the QCop interface from Ko/Pi to select addresses
2513 * for the attendees list of an event. 2513 * for the attendees list of an event.
2514 */ 2514 */
2515void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2515void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2516{ 2516{
2517 2517
2518 bool ok = false; 2518 bool ok = false;
2519 mEmailSourceChannel = sourceChannel; 2519 mEmailSourceChannel = sourceChannel;
2520 mEmailSourceUID = uid;
2521 callContactdialog();
2522#if 0
2520 int wid = uid.toInt( &ok ); 2523 int wid = uid.toInt( &ok );
2521 qDebug("UID %s ", uid.latin1()); 2524 qDebug("UID %s ", uid.latin1());
2522 if ( ok ) { 2525 if ( ok ) {
2523 if ( wid != QApplication::desktop()->width() ) { 2526 if ( wid != QApplication::desktop()->width() ) {
2524 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2527 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2525 message( i18n("Resizing, please wait...") ); 2528 message( i18n("Resizing, please wait...") );
2526 mMainWindow->showMinimized(); 2529 mMainWindow->showMinimized();
2527 /* 2530 /*
2528 { 2531 {
2529 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2532 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2530 } 2533 }
2531 */ 2534 */
2532 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); 2535 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2533 return; 2536 return;
2534 } 2537 }
2535 2538
2536 } else { 2539 } else {
2537 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2540 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2538 } 2541 }
2539 callContactdialog(); 2542 callContactdialog();
2540 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2543 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2541 2544#endif
2542} 2545}
2543void KABCore::resizeAndCallContactdialog() 2546void KABCore::resizeAndCallContactdialog()
2544{ 2547{
2545 updateMainWindow(); 2548 updateMainWindow();
2546 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); 2549 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
2547} 2550}
2548 2551
2549void KABCore::callContactdialog() 2552void KABCore::callContactdialog()
2550{ 2553{
2551 QStringList nameList; 2554 QStringList nameList;
2552 QStringList emailList; 2555 QStringList emailList;
2553 QStringList uidList; 2556 QStringList uidList;
2554 qDebug("WIDTH %d ", QApplication::desktop()->width() ); 2557 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2555 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2558 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2556 uint i=0; 2559 uint i=0;
2557 for (i=0; i < list.count(); i++) 2560 for (i=0; i < list.count(); i++)
2558 { 2561 {
2559 nameList.append(list[i].realName()); 2562 nameList.append(list[i].realName());
2560 emailList.append(list[i].preferredEmail()); 2563 emailList.append(list[i].preferredEmail());
2561 uidList.append(list[i].uid()); 2564 uidList.append(list[i].uid());
2562 } 2565 }
2563 QString uid = "unnamed"; 2566 QString uid = mEmailSourceUID;
2564 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2567 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2565 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2568 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2566 2569
2567} 2570}
2568/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2571/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2569 * to put them into the calendar. 2572 * to put them into the calendar.
2570 */ 2573 */
2571void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2574void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2572{ 2575{
2573 // qDebug("KABCore::requestForBirthdayList"); 2576 // qDebug("KABCore::requestForBirthdayList");
2574 QStringList birthdayList; 2577 QStringList birthdayList;
2575 QStringList anniversaryList; 2578 QStringList anniversaryList;