Added warn messagebox before send invite

This commit is contained in:
defnax 2017-02-02 17:15:32 +01:00
parent 873fbf98ad
commit bc8aac1ca6
2 changed files with 12 additions and 5 deletions

View File

@ -2463,10 +2463,14 @@ void IdDialog::sendInvite()
RsGxsId id(ui->lineEdit_KeyId->text().toStdString()); RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
MessageComposer::sendInvite(id); if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
{
MessageComposer::sendInvite(id);
ui->inviteFrame->show();
ui->inviteButton->setEnabled(false);
}
ui->inviteFrame->show();
ui->inviteButton->setEnabled(false);
} }
void IdDialog::negativePerson() void IdDialog::negativePerson()

View File

@ -19,6 +19,7 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include <QMessageBox>
#include <QDateTime> #include <QDateTime>
#include <QTimer> #include <QTimer>
@ -365,7 +366,9 @@ void MsgItem::sendInvite()
if (!rsMail->getMessage(mMsgId, mi)) if (!rsMail->getMessage(mMsgId, mi))
return; return;
if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
MessageComposer::sendInvite(mi.rsgxsid_srcId); {
MessageComposer::sendInvite(mi.rsgxsid_srcId);
}
} }