mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
Added to show a message box when closing the boards post composer
This commit is contained in:
parent
f6c554807f
commit
ef200fee47
@ -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…
Reference in New Issue
Block a user