summaryrefslogtreecommitdiffstats
path: root/src/smppopup.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-22 17:22:32 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-22 17:22:32 -0500
commit1b9b8e3c30b106485611a77130ddaa203111d77b (patch)
tree6fe3d7cd99246e5ef52dd73226610858be9f2baa /src/smppopup.cpp
parentc8e8b9c67e66818b15e29929f8a0ca36a1e94d45 (diff)
downloadkopete-otr-1b9b8e3c30b106485611a77130ddaa203111d77b.tar.gz
kopete-otr-1b9b8e3c30b106485611a77130ddaa203111d77b.zip
Add preliminary untested support for libotr 4.x
This relates to Bug 1987
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();
}