Fixed the Play Button text, if its not a media file, display right text.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7785 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-12-23 16:02:00 +00:00
parent 244b8e406e
commit d958910089

View File

@ -391,8 +391,16 @@ void GxsChannelPostItem::fill()
mFileItems.push_back(fi);
/* check if the file is a media file */
if (!misc::isPreviewable(QFileInfo(QString::fromUtf8(it->mName.c_str())).suffix()))
fi->mediatype();
if (!misc::isPreviewable(QFileInfo(QString::fromUtf8(it->mName.c_str())).suffix()))
{
fi->mediatype();
/* check if the file is not a media file and change text */
ui->playButton->setText(tr("Open"));
ui->playButton->setToolTip(tr("Open File"));
} else {
ui->playButton->setText(tr("Play"));
ui->playButton->setToolTip(tr("Play Media"));
}
QLayout *layout = ui->expandFrame->layout();
layout->addWidget(fi);