summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b107e2d..3715786 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2539,21 +2539,22 @@ void KABCore::configureResources()
2539#endif //KAB_EMBEDDED 2539#endif //KAB_EMBEDDED
2540 2540
2541 2541
2542/* this method will be called through the QCop interface from Ko/Pi to select addresses 2542/* this method will be called through the QCop interface from Ko/Pi to select addresses
2543 * for the attendees list of an event. 2543 * for the attendees list of an event.
2544 */ 2544 */
2545void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2545void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2546{ 2546{
2547 2547 qDebug("KABCore::requestForNameEmailUidList ");
2548 bool ok = false; 2548 bool ok = false;
2549 mEmailSourceChannel = sourceChannel; 2549 mEmailSourceChannel = sourceChannel;
2550 mEmailSourceUID = uid; 2550 mEmailSourceUID = uid;
2551 callContactdialog(); 2551 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2552 //callContactdialog();
2552#if 0 2553#if 0
2553 int wid = uid.toInt( &ok ); 2554 int wid = uid.toInt( &ok );
2554 qDebug("UID %s ", uid.latin1()); 2555 qDebug("UID %s ", uid.latin1());
2555 if ( ok ) { 2556 if ( ok ) {
2556 if ( wid != QApplication::desktop()->width() ) { 2557 if ( wid != QApplication::desktop()->width() ) {
2557 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2558 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2558 message( i18n("Resizing, please wait...") ); 2559 message( i18n("Resizing, please wait...") );
2559 mMainWindow->showMinimized(); 2560 mMainWindow->showMinimized();
@@ -2571,37 +2572,40 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
2571 } 2572 }
2572 callContactdialog(); 2573 callContactdialog();
2573 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2574 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2574#endif 2575#endif
2575} 2576}
2576void KABCore::resizeAndCallContactdialog() 2577void KABCore::resizeAndCallContactdialog()
2577{ 2578{
2578 updateMainWindow(); 2579 updateMainWindow();
2579 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); 2580 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2580} 2581}
2581 2582
2582void KABCore::callContactdialog() 2583void KABCore::callContactdialog()
2583{ 2584{
2584 QStringList nameList; 2585 static bool running = false;
2586 if (running) return;
2587 running = true;
2588 QStringList nameList;
2585 QStringList emailList; 2589 QStringList emailList;
2586 QStringList uidList; 2590 QStringList uidList;
2587 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); 2591 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2588 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2592 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2589 uint i=0; 2593 uint i=0;
2590 for (i=0; i < list.count(); i++) 2594 for (i=0; i < list.count(); i++)
2591 { 2595 {
2592 nameList.append(list[i].realName()); 2596 nameList.append(list[i].realName());
2593 emailList.append(list[i].preferredEmail()); 2597 emailList.append(list[i].preferredEmail());
2594 uidList.append(list[i].uid()); 2598 uidList.append(list[i].uid());
2595 } 2599 }
2596 QString uid = mEmailSourceUID; 2600 QString uid = mEmailSourceUID;
2597 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2601 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2598 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2602 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2599 2603 running = false;
2600} 2604}
2601/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2605/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2602 * to put them into the calendar. 2606 * to put them into the calendar.
2603 */ 2607 */
2604void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2608void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2605{ 2609{
2606 // qDebug("KABCore::requestForBirthdayList"); 2610 // qDebug("KABCore::requestForBirthdayList");
2607 QStringList birthdayList; 2611 QStringList birthdayList;