Adding invitation rejection notification
diff --git a/src/chatdialog.cpp b/src/chatdialog.cpp
index 91282da..9ecd2a3 100644
--- a/src/chatdialog.cpp
+++ b/src/chatdialog.cpp
@@ -252,6 +252,8 @@
ChatDialog::invitationRejected(const ndn::Name& identity)
{
_LOG_DEBUG(" " << identity.toUri() << " Rejected your invitation!");
+ QString msg = QString::fromStdString(identity.toUri()) + " Rejected your invitation!";
+ emit inivationRejection(msg);
}
void
diff --git a/src/chatdialog.h b/src/chatdialog.h
index 20280e8..504d60f 100644
--- a/src/chatdialog.h
+++ b/src/chatdialog.h
@@ -206,6 +206,9 @@
void
noNdnConnection(const QString& msg);
+
+ void
+ inivationRejection(const QString& msg);
public slots:
void
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index 95e1922..dd52334 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -674,6 +674,8 @@
this, SLOT(removeChatDialog(const ndn::Name&)));
connect(chatDialog, SIGNAL(noNdnConnection(const QString&)),
this, SLOT(showError(const QString&)));
+ connect(chatDialog, SIGNAL(inivationRejection(const QString&)),
+ this, SLOT(showWarning(const QString&)));
// send invitation
chatDialog->sendInvitation(inviteeItem, isIntroducer);
@@ -697,6 +699,8 @@
this, SLOT(removeChatDialog(const ndn::Name&)));
connect(chatDialog, SIGNAL(noNdnConnection(const QString&)),
this, SLOT(showError(const QString&)));
+ connect(chatDialog, SIGNAL(inivationRejection(const QString&)),
+ this, SLOT(showWarning(const QString&)));
chatDialog->addChatDataRule(invitation.getInviterPrefix(), identityCertificate, true);
chatDialog->publishIntroCert(identityCertificate, true);
diff --git a/src/invitationdialog.cpp b/src/invitationdialog.cpp
index 4129ba0..f909a00 100644
--- a/src/invitationdialog.cpp
+++ b/src/invitationdialog.cpp
@@ -39,7 +39,7 @@
{
m_inviterAlias = alias;
string msg = alias;
- msg.append(" invites you to join the chat room: ");
+ msg.append("\ninvites you to join the chat room: ");
ui->msgLabel->setText(QString::fromStdString(msg));
m_invitation = invitation;
diff --git a/src/invitationdialog.ui b/src/invitationdialog.ui
index b7d9367..0348293 100644
--- a/src/invitationdialog.ui
+++ b/src/invitationdialog.ui
@@ -52,7 +52,7 @@
</rect>
</property>
<property name="text">
- <string>Cancel</string>
+ <string>Reject</string>
</property>
</widget>
<widget class="QPushButton" name="okButton">
@@ -65,7 +65,7 @@
</rect>
</property>
<property name="text">
- <string>OK</string>
+ <string>Accept</string>
</property>
</widget>
</widget>