summaryrefslogtreecommitdiffstats
path: root/src/smppopup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/smppopup.cpp')
-rw-r--r--src/smppopup.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/smppopup.cpp b/src/smppopup.cpp
index 59fa9f2..66f28c1 100644
--- a/src/smppopup.cpp
+++ b/src/smppopup.cpp
@@ -29,13 +29,20 @@
#include "smppopup.h"
#include "verifypopup.h"
-SMPPopup::SMPPopup(TQWidget* parent, const char* name, WFlags fl, ConnContext *context, Kopete::ChatSession *session, bool initiate )
+SMPPopup::SMPPopup(TQWidget* parent, const char* name, TQString title, WFlags fl, ConnContext *context, Kopete::ChatSession *session, bool initiate )
: SMPPopupUI(parent,name,fl)
{
this->context = context;
this->session = session;
this->initiate = initiate;
- tlText->setText( i18n("Please enter the secret passphrase to authenticate %1:").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ if (title.isNull()) {
+ question = false;
+ tlText->setText( i18n("Please enter the secret passphrase to authenticate %1:").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ }
+ else {
+ question = true;
+ tlText->setText( title );
+ }
}
SMPPopup::~SMPPopup()
@@ -51,7 +58,12 @@ void SMPPopup::cancelSMP()
void SMPPopup::respondSMP()
{
- OtrlChatInterface::self()->respondSMP( context, session, leSecret->text(), initiate );
+ if (question) {
+ OtrlChatInterface::self()->respondSMPQ( context, session, tlText->text(), leSecret->text(), initiate );
+ }
+ else {
+ OtrlChatInterface::self()->respondSMP( context, session, leSecret->text(), initiate );
+ }
this->close();
}