From a26547effb44980457f2d1b227bb1b71a0345f06 Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 2 Sep 2010 17:26:29 +0000 Subject: [PATCH] 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 --- .../src/gui/chat/PopupChatDialog.cpp | 26 +++++++++++++++++- retroshare-gui/src/gui/images.qrc | 3 ++ .../src/gui/images/application-x-cd-image.png | Bin 0 -> 2622 bytes .../src/gui/images/application-x-rar.png | Bin 0 -> 3232 bytes .../src/gui/images/audio-x-monkey.png | Bin 0 -> 2414 bytes .../src/gui/images/video-x-generic.png | Bin 0 -> 2601 bytes 6 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 retroshare-gui/src/gui/images/application-x-cd-image.png create mode 100644 retroshare-gui/src/gui/images/application-x-rar.png create mode 100644 retroshare-gui/src/gui/images/audio-x-monkey.png create mode 100644 retroshare-gui/src/gui/images/video-x-generic.png diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 2cc52c62e..7d807ebf9 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -1081,13 +1081,37 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file) } QString message; + QString ext = QFileInfo(QString::fromStdString(file->FileName())).suffix(); if(file->getPicFlag()==1){ message+="FilePath().c_str(); message+="\" width=\"100\" height=\"100\">"; message+="
"; - } + } + else if (ext == "ogg" || ext == "mp3" || ext == "MP3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma") + { + message+=""; + message+="
"; + } + 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+=""; + message+="
"; + } + else if (ext == "tar" || ext == "bz2" || ext == "zip" || ext == "gz" || ext == "7z" + || ext == "rar" || ext == "rpm" || ext == "deb") + { + message+=""; + message+="
"; + } + + message+= RetroShareLink(QString::fromStdString(file->FileName()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtmlSize(); diff --git a/retroshare-gui/src/gui/images.qrc b/retroshare-gui/src/gui/images.qrc index 6a8e36d13..465978477 100644 --- a/retroshare-gui/src/gui/images.qrc +++ b/retroshare-gui/src/gui/images.qrc @@ -1,6 +1,9 @@ images/attach.png + images/audio-x-monkey.png + images/video-x-generic.png + images/application-x-rar.png images/pgp.png images/rs_wizard.png images/about.png diff --git a/retroshare-gui/src/gui/images/application-x-cd-image.png b/retroshare-gui/src/gui/images/application-x-cd-image.png new file mode 100644 index 0000000000000000000000000000000000000000..6d2673ecc47c3dd8e99b725576ffaf384c8553c1 GIT binary patch literal 2622 zcmV-E3c>Y>P)c9*?j z1BMp{>>p64DA4Y@>b8HTKojrTY+p=uQvfh+QN+O3MXXf^Nm*Y|B5v7<^ z0e|rE9nQ6e=X}pQmaUY+NoLUS5t-^k)INc@$t4x-eJmmrdHG!1)DfO4faVfY#Hil? zILs%i#1_%)6_8AuEb&RR+5D&1I^w-340_9mKkL8a>uCS@Io&lG-rkQr_xqb;+eoES zzXh<*XM2j46woUwFXTPX6EXydSU^lr?i5}K&bZf{^`Vr7ZF=Bif0QjVhrc~(*+D5qK6xx&Wu1rHsSHXh@UOO7(N0? zxk&;2SLx1`jRS1FuH(S-VJH)>X(45sFipU)45YIT%Ckj`PGp34Qp9-*K!5T*-VOqV zrN>*S?=|2S6w)OZ_IQ>8(#SgwayCUc7EIfaafE}ar-f#6HfBE^<$d$#h!`vaNz%Q7 zR)4HwbGeGKi8N*}r=aW(0xLip0l6xGUbj*H(VHB1DO zsr3BuE-tX>GM0j+1iVkS1_{8Y7#q5HErW!jNEj-FK?zFINDs!7$%kRcRf^rfSUHE) zr3ya##ndnY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)uX;4k?7`SRuW zjvYJp7JxB9wLuDnr;llv`1$s?u-V#*39bCSO`7CZznqAeRz5G zFEBnnj^eeV-!WPSI+2g(muC7zBB2Q&NM0>kjt<;&&z?P?@pZ9S^l?+{(4j*=18_r7 zkk8uFMp6~J*JAkPsZpU)RhoH%h>qHzVlgusk2%taE^DECzn1PhkLgJ0w+ zfN5DgefsoIWSsaIz_`|RA`EjOWJ4_=tfdkKFbZs=LE0QYe*CnMKM&xJprVrx7f@5M zQX|>=f)<+se_f>a`CZVcbekVa+FWJYsN};1d>*zqBC|2DRbD)B;J{MBhNX>O1D}(z zdtJG5`}xbN}2U`{(>S15o{X%(bD!xSUo>iv{)p;=S``hT^F geO6^m16FST1%d46X7Gf<>Hq)$07*qoM6N<$f_-I}O#lD@ literal 0 HcmV?d00001 diff --git a/retroshare-gui/src/gui/images/video-x-generic.png b/retroshare-gui/src/gui/images/video-x-generic.png new file mode 100644 index 0000000000000000000000000000000000000000..28f9700f4f93b0f922058874b62b6d03c4978b44 GIT binary patch literal 2601 zcmV+^3fA?BP)^?^i{TS8*M)Zz}oj!UR95E|Rq7-Ji+ zcfH=7ot|?#M{GLwE-)L3V;|4|&-MGx?LRa2S(b(W7Y_*@L9qq^>l*;P7l7YB_NWkH z;8DWXPaMp_2&mn8^8o`j0Siw{Hq?yR4jfW0pe z2;ltr3m7qcIA+eAfdukE1Qe{p;%xeI5{TtGP7k0*+XuzU9my`Osz zcoc9V(85J~`E zMoG3l0@BvniqiF^Xl`jme}4qgNDOtgU*X-Y8|6NJe;PJzF2zTG`6~=5U)J;=o32Zu9G!rc?Ef`K=@#BT_F>U&Ei;dGqFJpO5nLa`XlQv^MN?;eo`VB$Xl%3_zvs%X+L>@hV1- z8ij)gKf&Qok3i*>S6;%Ti4%D!O=0e!loM{LMVg1MjDgt&719r#bPp#nWVBc(SG}Ol3vKY2N-}n9NO#|Qej1DCi}s2 z9YX(rciKekb7FiiA;4Rnr?iX?=z-aDW+Nkm%cK{E?l%k`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