-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index e053e94..975911e 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -643,24 +643,26 @@ static void parseName( const QString& name, QString *first, QString *middle, if ( space <= 0 ) { *first = rest; } else { *first = rest.left( space ); *middle = rest.mid( space+1 ); } } void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) { + qWarning("Receiving QCop-Call with message %s", QString( msg ).latin1() ); + if (msg == "editPersonal()") { editPersonal(); } else if (msg == "editPersonalAndClose()") { editPersonal(); close(); } else if ( msg == "addContact(QString,QString)" ) { QDataStream stream(data,IO_ReadOnly); QString name, email; stream >> name >> email; OContact cnt; QString fn, mn, ln; @@ -677,41 +679,45 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) // :SXm_abView()->init( cnt ); editEntry( EditEntry ); } else if ( msg == "beamBusinessCard()" ) { QString beamFilename = addressbookPersonalVCardName(); if ( !QFile::exists( beamFilename ) ) return; // can't beam a non-existent file Ir *ir = new Ir( this ); connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); QString description = "mycard.vcf"; ir->send( beamFilename, description, "text/x-vCard" ); - } else if ( msg == "showUid(int)" ) { + } else if ( msg == "show(int)" ) { QDataStream stream(data,IO_ReadOnly); int uid; stream >> uid; + qWarning( "Showing uid: %d" , uid ); + // Deactivate Personal View.. if ( actionPersonal->isOn() ){ actionPersonal->setOn( false ); slotPersonalView(); } // Reset category and show as card.. m_abView -> setShowByCategory( QString::null ); m_abView -> setCurrentUid( uid ); slotViewSwitched ( AbView::CardView ); + + qApp->exec(); - } else if ( msg == "editUid(int)" ) { + } else if ( msg == "edit(int)" ) { QDataStream stream(data,IO_ReadOnly); int uid; stream >> uid; // Deactivate Personal View.. if ( actionPersonal->isOn() ){ actionPersonal->setOn( false ); slotPersonalView(); } // Reset category and edit.. m_abView -> setShowByCategory( QString::null ); |