mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
FileTransferWidget: limit browse to pics and archives
This commit is contained in:
parent
9793ebd094
commit
e365b0eb2d
|
@ -189,9 +189,14 @@ void FileTransferWidget::onFileTransferFinished(ToxFile file)
|
|||
setupButtons();
|
||||
hideWidgets();
|
||||
|
||||
ui->bottomButton->show();
|
||||
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/browse_path.png"));
|
||||
ui->bottomButton->setObjectName("browse");
|
||||
static const QStringList openExtensions = { "png", "jpeg", "jpg", "gif", "zip", "rar" };
|
||||
|
||||
if(openExtensions.contains(QFileInfo(file.fileName).suffix()))
|
||||
{
|
||||
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/browse_path.png"));
|
||||
ui->bottomButton->setObjectName("browse");
|
||||
ui->bottomButton->show();
|
||||
}
|
||||
|
||||
// preview
|
||||
if(fileInfo.direction == ToxFile::RECEIVING)
|
||||
|
|
Loading…
Reference in New Issue
Block a user