mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
add file button to general message; add extra file sending from chat dialog; Add a link when sending a file; Add a link for downloading in the reciever chat dialog; Little gui improvement
Merge branch 'extraFile' git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1181 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e34173759e
commit
8e6f082025
8 changed files with 441 additions and 269 deletions
|
@ -45,9 +45,11 @@ GeneralMsgDialog::GeneralMsgDialog(QWidget *parent, uint32_t type)
|
|||
connect(addButton, SIGNAL(clicked()), this, SLOT(newDestination()));
|
||||
connect(typeComboBox, SIGNAL(currentIndexChanged( int )), this, SLOT(updateGroupId()));
|
||||
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(sendMsg()));
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(sendMsg()));
|
||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(cancelMsg()));
|
||||
|
||||
connect(addFileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile()));
|
||||
|
||||
/* set the type to ...
|
||||
* const uint32_t GMD_TYPE_MESSAGE_IDX = 0;
|
||||
* const uint32_t GMD_TYPE_FORUM_IDX = 1;
|
||||
|
@ -289,6 +291,23 @@ void GeneralMsgDialog::addAttachment(std::string hash, std::string fname, uint64
|
|||
}
|
||||
|
||||
|
||||
void GeneralMsgDialog::addExtraFile()
|
||||
{
|
||||
/* add a SubFileItem to the attachment section */
|
||||
std::cerr << "GeneralMsgDialog::addExtraFile() opening file dialog";
|
||||
std::cerr << std::endl;
|
||||
|
||||
// select a file
|
||||
QString qfile = QFileDialog::getOpenFileName(this, tr("Add Extra File"), "", "", 0,
|
||||
QFileDialog::DontResolveSymlinks);
|
||||
std::string filePath = qfile.toStdString();
|
||||
if (filePath != "")
|
||||
{
|
||||
addAttachment(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GeneralMsgDialog::addAttachment(std::string path)
|
||||
{
|
||||
/* add a SubFileItem to the attachment section */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue