mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Added a new button in the forums dialog to download all links in the selected forum message.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4202 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ddba6d35db
commit
650ef12af6
10 changed files with 234 additions and 100 deletions
|
@ -852,6 +852,29 @@ bool RetroShareLink::process(int flag)
|
|||
return false;
|
||||
}
|
||||
|
||||
/*static*/ int RetroShareLink::process(QStringList &urls, RetroShareLink::enumType type /*= RetroShareLink::TYPE_UNKNOWN*/, bool notify /*= true*/)
|
||||
{
|
||||
int processed = 0;
|
||||
|
||||
for (QStringList::iterator it = urls.begin(); it != urls.end(); it++) {
|
||||
RetroShareLink link(*it);
|
||||
if (link.valid() && (type == RetroShareLink::TYPE_UNKNOWN || link.type() == type)) {
|
||||
if (link.process(0)) {
|
||||
processed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (notify) {
|
||||
QString text = QObject::tr("%1 of %2 RetroShare links processed.").arg(processed).arg(urls.count());
|
||||
QMessageBox mb(QObject::tr("Request Confirmation"), text, QMessageBox::Information, QMessageBox::Ok, 0, 0);
|
||||
mb.setWindowIcon(QIcon(QString::fromUtf8(":/images/rstray3.png")));
|
||||
mb.exec();
|
||||
}
|
||||
|
||||
return processed;
|
||||
}
|
||||
|
||||
void RSLinkClipboard::copyLinks(const std::vector<RetroShareLink>& links)
|
||||
{
|
||||
QString res ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue