-rw-r--r-- | kmicromail/composemail.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index ed8a2ee..3231b45 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -46,26 +46,27 @@ #include <qlabel.h> #include <qtabwidget.h> #include <qlistview.h> //using namespace Opie::Core; //using namespace Opie::Ui; ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) : ComposeMailUI( parent, name, modal ) { mPickLineEdit = 0; mEncoding = KOPrefs::instance()->mCurrentCodeName; - connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), - this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); + //managed from opiemail now + //connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), + // this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); settings = sett; m_replyid = ""; if ( KOPrefs::instance()->mUseKapi) { KConfig config( locateLocal("config", "kabcrc") ); config.setGroup( "General" ); QString whoami_uid = config.readEntry( "WhoAmI" ); if ( whoami_uid.isEmpty() ) { QMessageBox::information( 0, i18n( "Hint" ), i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), i18n( "Ok" ) ); @@ -251,46 +252,53 @@ void ComposeMail::pickAddress( ) } #else bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/ompi", this->name() /* name is here the unique uid*/); // the result should now arrive through method insertAttendees #endif } //the map includes name/email pairs, that comes from Ka/Pi void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) { //qDebug("ComposeMail::insertAttendees "); raise(); + QString UID = uid; + if ( uid.left( 18 ) == (this->name() +QString("pick2")) ) { + mPickLineEdit = toLine; + UID = this->name(); + subjectLine->setText( uid.mid( 18 ) ); + } + //qDebug("ccc %s %s ", uid.latin1(), this->name()); if ( mPickLineEdit == 0 ) { //whoami received QString defmail = uidList[0]; if ( emailList.count() == 0 ) QMessageBox::information( 0, i18n( "Hint" ), i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), i18n( "Ok" ) ); if (defmail.length()!=0) { fromBox->insertItem(defmail); } QStringList::ConstIterator sit = emailList.begin(); int pref = 0; for (;sit!=emailList.end();++sit) { if ( (*sit)==defmail) continue; fromBox->insertItem((*sit)); } senderNameEdit->setText(nameList[0]); return; } QString names ; QLineEdit *line = mPickLineEdit; - if (uid == this->name()) + if (UID == this->name()) { for ( int i = 0; i < nameList.count(); i++) { QString _name = nameList[i]; QString _email = emailList[i]; QString _uid = uidList[i]; if ( ! _email.isEmpty() ) { if ( ! names.isEmpty() ) names+= ","; names+= "\""+_name +"\"<" +_email +">"; } } |