1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

FTW: Always show the checkmark after a successful transfer

This commit is contained in:
krepa098 2015-02-15 11:53:32 +01:00
parent 2bc7594049
commit 4831e0c18b

View File

@ -306,6 +306,8 @@ void FileTransferWidget::onFileTransferPaused(ToxFile file)
void FileTransferWidget::onFileTransferFinished(ToxFile file)
{
static const QStringList openExtensions = { "png", "jpeg", "jpg", "gif", "zip", "rar" };
if(fileInfo != file)
return;
@ -316,14 +318,10 @@ void FileTransferWidget::onFileTransferFinished(ToxFile file)
setupButtons();
hideWidgets();
static const QStringList openExtensions = { "png", "jpeg", "jpg", "gif", "zip", "rar" };
if(openExtensions.contains(QFileInfo(file.fileName).suffix()))
{
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->topButton->setObjectName("ok");
ui->topButton->show();
}
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->topButton->setObjectName("ok");
ui->topButton->setEnabled(openExtensions.contains(QFileInfo(file.fileName).suffix()));
ui->topButton->show();
// preview
if(fileInfo.direction == ToxFile::RECEIVING)