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

Merge branch 'pr1487' into back_in_the_game

This commit is contained in:
tux3 2015-04-24 21:51:38 +02:00
commit 262fc7059d
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -347,10 +347,12 @@ void FileTransferWidget::onFileTransferFinished(ToxFile file)
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->topButton->setObjectName("ok");
ui->topButton->setToolTip(tr("Open file."));
ui->topButton->show();
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/dir.svg"));
ui->bottomButton->setObjectName("dir");
ui->bottomButton->setToolTip(tr("Open file directory."));
ui->bottomButton->show();
// preview
@ -395,9 +397,11 @@ void FileTransferWidget::setupButtons()
case ToxFile::TRANSMITTING:
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transfer"));
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/pause.svg"));
ui->bottomButton->setObjectName("pause");
ui->bottomButton->setToolTip(tr("Pause transfer"));
setButtonColor(Style::getColor(Style::Green));
@ -405,9 +409,11 @@ void FileTransferWidget::setupButtons()
case ToxFile::PAUSED:
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transfer"));
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/arrow_white.svg"));
ui->bottomButton->setObjectName("resume");
ui->bottomButton->setToolTip(tr("Resume transfer"));
setButtonColor(Style::getColor(Style::LightGrey));
@ -416,16 +422,19 @@ void FileTransferWidget::setupButtons()
case ToxFile::BROKEN: //TODO: ?
ui->topButton->setIcon(QIcon(":/ui/fileTransferInstance/no.svg"));
ui->topButton->setObjectName("cancel");
ui->topButton->setToolTip(tr("Cancel transfer"));
if(fileInfo.direction == ToxFile::SENDING)
{
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/pause.svg"));
ui->bottomButton->setObjectName("pause");
ui->bottomButton->setToolTip(tr("Pause transfer"));
}
else
{
ui->bottomButton->setIcon(QIcon(":/ui/fileTransferInstance/yes.svg"));
ui->bottomButton->setObjectName("accept");
ui->bottomButton->setToolTip(tr("Accept transfer"));
}
break;
}