summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp40
1 files changed, 32 insertions, 8 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 27aca2d..3f9b546 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -376,2 +376,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
376 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 376 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
377 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
377 378
@@ -837,2 +838,3 @@ void KABCore::resizeEvent(QResizeEvent* e )
837 if ( QApplication::desktop()->width() <= 640 ) { 838 if ( QApplication::desktop()->width() <= 640 ) {
839 mMainWindow->showMinimized();
838 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 840 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
@@ -863,2 +865,3 @@ void KABCore::resizeEvent(QResizeEvent* e )
863 } 865 }
866 QWidget::resizeEvent( e );
864 867
@@ -2507,7 +2510,7 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
2507{ 2510{
2508 QStringList nameList; 2511
2509 QStringList emailList;
2510 QStringList uidList;
2511 bool ok = false; 2512 bool ok = false;
2513 mEmailSourceChannel = sourceChannel;
2512 int wid = uid.toInt( &ok ); 2514 int wid = uid.toInt( &ok );
2515 qDebug("UID %s ", uid.latin1());
2513 if ( ok ) { 2516 if ( ok ) {
@@ -2516,4 +2519,10 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
2516 message( i18n("Resizing, please wait...") ); 2519 message( i18n("Resizing, please wait...") );
2517 raise(); 2520 mMainWindow->showMinimized();
2518 qApp->processEvents(); 2521 /*
2522 {
2523 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2524 }
2525 */
2526 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2527 return;
2519 } 2528 }
@@ -2523,3 +2532,18 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
2523 } 2532 }
2524 2533 callContactdialog();
2534 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2535
2536}
2537void KABCore::resizeAndCallContactdialog()
2538{
2539 updateMainWindow();
2540 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
2541}
2542
2543void KABCore::callContactdialog()
2544{
2545 QStringList nameList;
2546 QStringList emailList;
2547 QStringList uidList;
2548 qDebug("WIDTH %d ", QApplication::desktop()->width() );
2525 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2549 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
@@ -2532,7 +2556,7 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
2532 } 2556 }
2557 QString uid = "unnamed";
2533 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2558 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2534 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); 2559 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2535 2560
2536} 2561}
2537
2538/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2562/* this method will be called through the QCop interface from Ko/Pi to select birthdays