mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 15:35:49 -04:00
Rise post size
This commit is contained in:
parent
a988b1dd8b
commit
5efd318cb5
3 changed files with 4 additions and 3 deletions
|
@ -62,6 +62,7 @@ PostedCreatePostDialog::PostedCreatePostDialog(TokenQueue* tokenQ, RsPosted *pos
|
||||||
ui->hashBox->setAutoHide(true);
|
ui->hashBox->setAutoHide(true);
|
||||||
ui->hashBox->setDefaultTransferRequestFlags(RS_FILE_REQ_ANONYMOUS_ROUTING);
|
ui->hashBox->setDefaultTransferRequestFlags(RS_FILE_REQ_ANONYMOUS_ROUTING);
|
||||||
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
connect(ui->hashBox, SIGNAL(fileHashingFinished(QList<HashedFile>)), this, SLOT(fileHashingFinished(QList<HashedFile>)));
|
||||||
|
ui->sizeWarningLabel->setText(QString("Post size is limited to %1 KB, pictures will be downscaled.").arg(MAXMESSAGESIZE / 1024));
|
||||||
|
|
||||||
/* fill in the available OwnIds for signing */
|
/* fill in the available OwnIds for signing */
|
||||||
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
ui->idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||||
|
@ -189,7 +190,7 @@ void PostedCreatePostDialog::addPicture()
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage opt;
|
QImage opt;
|
||||||
if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 1000)) { //Leave space for other stuff
|
if(ImageUtil::optimizeSizeBytes(imagebytes, image, opt, 800*600, MAXMESSAGESIZE - 2000)) { //Leave space for other stuff
|
||||||
ui->imageLabel->setPixmap(QPixmap::fromImage(opt));
|
ui->imageLabel->setPixmap(QPixmap::fromImage(opt));
|
||||||
} else {
|
} else {
|
||||||
imagefilename = "";
|
imagefilename = "";
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
private:
|
private:
|
||||||
QString imagefilename;
|
QString imagefilename;
|
||||||
QByteArray imagebytes;
|
QByteArray imagebytes;
|
||||||
const int MAXMESSAGESIZE = 32000;
|
const int MAXMESSAGESIZE = 199000;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void createPost();
|
void createPost();
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="sizeWarningLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Post size is limited to 32 KB, pictures will be downscaled.</string>
|
<string>Post size is limited to 32 KB, pictures will be downscaled.</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue