Fixed add attachment per drag and drop.

Added the size after the link in group chat too.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3833 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-20 01:40:24 +00:00
parent 8f9a54544d
commit 7bcebc8e2b
3 changed files with 16 additions and 8 deletions

View file

@ -898,7 +898,7 @@ void PopupChatDialog::addExtraFile()
std::string filePath = qfile.toStdString();
if (filePath != "")
{
PopupChatDialog::addAttachment(filePath,0);
addAttachment(filePath,0);
}
}
@ -994,13 +994,16 @@ void PopupChatDialog::fileHashingFinished(AttachFileItem* file)
message+= RetroShareLink(QString::fromUtf8(file->FileName().c_str()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtmlSize();
message += RetroShareLink(QString::fromUtf8(file->FileName().c_str()),file->FileSize(),QString::fromStdString(file->FileHash())).toHtmlSize();
#ifdef CHAT_DEBUG
std::cerr << "PopupChatDialog::fileHashingFinished message : " << message.toStdString() << std::endl;
#endif
std::wstring msg = message.toStdWString();
/* convert to real html document */
QTextBrowser textBrowser;
textBrowser.setHtml(message);
std::wstring msg = textBrowser.toHtml().toStdWString();
if (rsMsgs->sendPrivateChat(dialogId, msg)) {
QDateTime currentTime = QDateTime::currentDateTime();