Added drag and drop support for attaching files in MessageComposer.

Corrected some messageboxes to show the icon of the parent.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3802 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-16 09:31:30 +00:00
parent 88d4a3b18e
commit 0f1a1987b6
10 changed files with 149 additions and 71 deletions

View file

@ -1059,15 +1059,13 @@ void PopupChatDialog::dropEvent(QDropEvent *event)
QDir dir(localpath);
if (dir.exists()) {
std::cerr << "PopupChatDialog::dropEvent() directory not accepted."<< std::endl;
QMessageBox mb(tr("Drop file error."), tr("Directory can't be dropped, only files are accepted."),QMessageBox::Information,QMessageBox::Ok,0,0);
mb.setButtonText( QMessageBox::Ok, "OK" );
QMessageBox mb(tr("Drop file error."), tr("Directory can't be dropped, only files are accepted."),QMessageBox::Information,QMessageBox::Ok,0,0,this);
mb.exec();
} else if (QFile::exists(localpath)) {
PopupChatDialog::addAttachment(localpath.toUtf8().constData(), false);
} else {
std::cerr << "PopupChatDialog::dropEvent() file does not exists."<< std::endl;
QMessageBox mb(tr("Drop file error."), tr("File not found or file name not accepted."),QMessageBox::Information,QMessageBox::Ok,0,0);
mb.setButtonText( QMessageBox::Ok, "OK" );
QMessageBox mb(tr("Drop file error."), tr("File not found or file name not accepted."),QMessageBox::Information,QMessageBox::Ok,0,0,this);
mb.exec();
}
}