Added to display for Attached Audio,Video and Archive files a default icon in Private Chat

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3431 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-09-02 17:26:29 +00:00
parent 92f5d37712
commit a26547effb
6 changed files with 28 additions and 1 deletions

View File

@ -1081,13 +1081,37 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file)
}
QString message;
QString ext = QFileInfo(QString::fromStdString(file->FileName())).suffix();
if(file->getPicFlag()==1){
message+="<img src=\"file:///";
message+=file->FilePath().c_str();
message+="\" width=\"100\" height=\"100\">";
message+="<br>";
}
}
else if (ext == "ogg" || ext == "mp3" || ext == "MP3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma")
{
message+="<img src=\":/images/audio-x-monkey.png";
message+="\" width=\"48\" height=\"48\">";
message+="<br>";
}
else if (ext == "avi" || ext == "AVI" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "ogm"
|| ext == "mkv" || ext == "mp4" || ext == "flv" || ext == "mov"
|| ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp")
{
message+="<img src=\":/images/video-x-generic.png";
message+="\" width=\"48\" height=\"48\">";
message+="<br>";
}
else if (ext == "tar" || ext == "bz2" || ext == "zip" || ext == "gz" || ext == "7z"
|| ext == "rar" || ext == "rpm" || ext == "deb")
{
message+="<img src=\":/images/application-x-rar.png";
message+="\" width=\"48\" height=\"48\">";
message+="<br>";
}
message+= RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtmlSize();

View File

@ -1,6 +1,9 @@
<RCC>
<qresource prefix="/" >
<file>images/attach.png</file>
<file>images/audio-x-monkey.png</file>
<file>images/video-x-generic.png</file>
<file>images/application-x-rar.png</file>
<file>images/pgp.png</file>
<file>images/rs_wizard.png</file>
<file>images/about.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB