mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Merge pull request #2146 from defnax/boardscomposer
[ Boards ] Added to show a message box when closing the boards post composer
This commit is contained in:
commit
8f5656433a
2 changed files with 10 additions and 1 deletions
|
@ -54,7 +54,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(RsPosted *posted, const RsGxsGrou
|
||||||
Settings->loadWidgetInformation(this);
|
Settings->loadWidgetInformation(this);
|
||||||
|
|
||||||
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
connect(ui->submitButton, SIGNAL(clicked()), this, SLOT(createPost()));
|
||||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(close()));
|
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
|
connect(ui->addPicButton, SIGNAL(clicked() ), this , SLOT(addPicture()));
|
||||||
connect(ui->RichTextEditWidget, SIGNAL(textSizeOk(bool)),ui->submitButton, SLOT(setEnabled(bool)));
|
connect(ui->RichTextEditWidget, SIGNAL(textSizeOk(bool)),ui->submitButton, SLOT(setEnabled(bool)));
|
||||||
|
|
||||||
|
@ -299,3 +299,11 @@ void PostedCreatePostDialog::on_removeButton_clicked()
|
||||||
ui->removeButton->hide();
|
ui->removeButton->hide();
|
||||||
ui->stackedWidgetPicture->setCurrentIndex(0);
|
ui->stackedWidgetPicture->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostedCreatePostDialog::reject()
|
||||||
|
{
|
||||||
|
if(QMessageBox::warning(nullptr,tr("Close this window?"),tr("Do you really want to discard your post?"),QMessageBox::Yes,QMessageBox::No) == QMessageBox::No)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QDialog::reject();
|
||||||
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ private slots:
|
||||||
void addPicture();
|
void addPicture();
|
||||||
void on_removeButton_clicked();
|
void on_removeButton_clicked();
|
||||||
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
||||||
|
void reject();
|
||||||
|
|
||||||
void setPage(int viewMode);
|
void setPage(int viewMode);
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue