added warning about number of destinations in msg composer and in IdDialog

This commit is contained in:
csoler 2020-11-14 13:37:49 +01:00
parent c32f90f84d
commit 9e94057a66
4 changed files with 1106 additions and 933 deletions

View File

@ -2387,6 +2387,10 @@ void IdDialog::sendMsg()
if(selected_items.empty())
return ;
if(selected_items.size() > 20)
if(QMessageBox::warning(nullptr,tr("Too many identities"),tr("<p>It is not recommended to send a message to more than 20 persons at once. Large scale diffusion of data (including friend invitations) are much more efficiently handled by forums. Click ok to proceed anyway.</p>"),QMessageBox::Ok|QMessageBox::Cancel,QMessageBox::Cancel)==QMessageBox::Cancel)
return;
MessageComposer *nMsgDialog = MessageComposer::newMsg();
if (nMsgDialog == NULL)
return;

View File

@ -134,6 +134,7 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
m_completer = NULL;
ui.distantFrame->hide();
ui.sizeLimitFrame->hide();
ui.respond_to_CB->hide();
ui.fromLabel->hide();
@ -395,6 +396,11 @@ void MessageComposer::updateCells(int,int)
ui.distantFrame->hide() ;
ui.fromLabel->hide();
}
if(rowCount > 20)
ui.sizeLimitFrame->show();
else
ui.sizeLimitFrame->hide();
}
void MessageComposer::processSettings(bool bLoad)
@ -2770,7 +2776,10 @@ void MessageComposer::showTagLabels()
ui.tagLayout->addStretch();
}
}
void MessageComposer::on_closeSizeLimitFrameButton_clicked()
{
ui.sizeLimitFrame->setVisible(false);
}
void MessageComposer::on_closeInfoFrameButton_clicked()
{
ui.distantFrame->setVisible(false);

View File

@ -164,6 +164,7 @@ private slots:
void tagRemoveAll();
void on_closeInfoFrameButton_clicked();
void on_closeSizeLimitFrameButton_clicked();
static QString inviteMessage();

File diff suppressed because it is too large Load Diff