mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
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:
parent
88d4a3b18e
commit
0f1a1987b6
10 changed files with 149 additions and 71 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue