summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-03-29 17:05:50 (UTC)
committer zautrix <zautrix>2005-03-29 17:05:50 (UTC)
commita7c827aa0e555206b60dec3bc07f7afab4352883 (patch) (side-by-side diff)
tree56dbda15314f27ffabd143d09ea036b092444198 /kaddressbook
parent3116f249fc6ccd0e067213e826d3d924f6986972 (diff)
downloadkdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.zip
kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.gz
kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.bz2
fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp40
-rw-r--r--kaddressbook/kabcore.h4
2 files changed, 36 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
@@ -375,4 +375,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
+ connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
@@ -836,4 +837,5 @@ void KABCore::resizeEvent(QResizeEvent* e )
}
if ( QApplication::desktop()->width() <= 640 ) {
+ mMainWindow->showMinimized();
//mMainWindow->setMaximumSize( QApplication::desktop()->size() );
mViewManager->getFilterAction()->setComboWidth( 150 );
@@ -862,4 +864,5 @@ void KABCore::resizeEvent(QResizeEvent* e )
}
}
+ QWidget::resizeEvent( e );
}
@@ -2506,15 +2509,21 @@ void KABCore::configureResources()
void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
{
- QStringList nameList;
- QStringList emailList;
- QStringList uidList;
+
bool ok = false;
+ mEmailSourceChannel = sourceChannel;
int wid = uid.toInt( &ok );
+ qDebug("UID %s ", uid.latin1());
if ( ok ) {
if ( wid != QApplication::desktop()->width() ) {
qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
message( i18n("Resizing, please wait...") );
- raise();
- qApp->processEvents();
+ mMainWindow->showMinimized();
+ /*
+ {
+ QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
+ }
+ */
+ QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
+ return;
}
@@ -2522,5 +2531,20 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
}
-
+ callContactdialog();
+ //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
+
+}
+void KABCore::resizeAndCallContactdialog()
+{
+ updateMainWindow();
+ QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
+}
+
+void KABCore::callContactdialog()
+{
+ QStringList nameList;
+ QStringList emailList;
+ QStringList uidList;
+ qDebug("WIDTH %d ", QApplication::desktop()->width() );
KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
uint i=0;
@@ -2531,9 +2555,9 @@ void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QSt
uidList.append(list[i].uid());
}
+ QString uid = "unnamed";
//qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
- bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
+ bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
}
-
/* this method will be called through the QCop interface from Ko/Pi to select birthdays
* to put them into the calendar.
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index c185117..47ea152 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -369,4 +369,7 @@ class KABCore : public QWidget, public KSyncInterface
void setJumpButtonBar( bool visible );
void setCaptionBack();
+ void resizeAndCallContactdialog();
+ void callContactdialog();
+
void importFromOL();
void extensionModified( const KABC::Addressee::List &list );
@@ -386,4 +389,5 @@ class KABCore : public QWidget, public KSyncInterface
private:
+ QString mEmailSourceChannel;
void resizeEvent(QResizeEvent* e );
bool mBRdisabled;