Reworked the process of the RetroShare links. Now RetroShare asks when adding a file or a person link and shows a detailed result.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4604 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-09-11 22:07:24 +00:00
parent d30c03b183
commit 2fac47293e
16 changed files with 721 additions and 333 deletions

View file

@ -749,6 +749,21 @@ void ForumsDialog::fillThreadFinished()
CleanupItems (thread->items);
}
if (thread->focusMsgId.empty() == false) {
/* Search exisiting item */
QTreeWidgetItemIterator itemIterator(ui.threadTreeWidget);
QTreeWidgetItem *item = NULL;
while ((item = *itemIterator) != NULL) {
itemIterator++;
if (item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString() == thread->focusMsgId) {
ui.threadTreeWidget->setCurrentItem(item);
ui.threadTreeWidget->setFocus();
break;
}
}
}
QList<QTreeWidgetItem*>::iterator Item;
for (Item = thread->itemToExpand.begin(); Item != thread->itemToExpand.end(); Item++) {
if ((*Item)->isHidden() == false) {
@ -1141,7 +1156,7 @@ void ForumsDialog::downloadAllFiles()
return;
}
RetroShareLink::process(urls, RetroShareLink::TYPE_FILE, true);
RetroShareLink::process(urls, RetroShareLink::TYPE_FILE/*, true*/);
}
// TODO
@ -1319,7 +1334,7 @@ void ForumsDialog::copyForumLink()
if (rsForums->getForumInfo(mCurrForumId, fi)) {
RetroShareLink link;
if (link.createForum(fi.forumId, "")) {
std::vector<RetroShareLink> urls;
QList<RetroShareLink> urls;
urls.push_back(link);
RSLinkClipboard::copyLinks(urls);
}
@ -1336,7 +1351,7 @@ void ForumsDialog::copyMessageLink()
if (rsForums->getForumInfo(mCurrForumId, fi)) {
RetroShareLink link;
if (link.createForum(mCurrForumId, mCurrThreadId)) {
std::vector<RetroShareLink> urls;
QList<RetroShareLink> urls;
urls.push_back(link);
RSLinkClipboard::copyLinks(urls);
}
@ -1596,6 +1611,11 @@ bool ForumsDialog::navigate(const std::string& forumId, const std::string& msgId
return true;
}
if (fillThread && fillThread->isRunning()) {
fillThread->focusMsgId = msgId;
return true;
}
/* Search exisiting item */
QTreeWidgetItemIterator itemIterator(ui.threadTreeWidget);
QTreeWidgetItem *item = NULL;