Added new RetroShare link format to start a search

retroshare://search?keywords=...
Enabled key "delete" to remove search results.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4185 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-05-04 10:22:49 +00:00
parent 73daae5992
commit cd8188bf09
18 changed files with 276 additions and 156 deletions

View file

@ -104,10 +104,12 @@ void ChanMsgItem::updateItemStatic()
if (!mIsHome)
{
title = tr("Channel Feed") + ": ";
RetroShareLink link(RetroShareLink::TYPE_CHANNEL, QString::fromStdWString(ci.channelName), QString::fromStdString(ci.channelId), "");
RetroShareLink link;
link.createChannel(QString::fromStdWString(ci.channelName), QString::fromStdString(ci.channelId), "");
title += link.toHtml();
titleLabel->setText(title);
RetroShareLink msgLink(RetroShareLink::TYPE_CHANNEL, QString::fromStdWString(cmi.subject), QString::fromStdString(cmi.channelId), QString::fromStdString(cmi.msgId));
RetroShareLink msgLink;
msgLink.createChannel(QString::fromStdWString(cmi.subject), QString::fromStdString(cmi.channelId), QString::fromStdString(cmi.msgId));
subjectLabel->setText(msgLink.toHtml());
if ((ci.channelFlags & RS_DISTRIB_SUBSCRIBED) || (ci.channelFlags & RS_DISTRIB_ADMIN)) {
@ -403,8 +405,8 @@ void ChanMsgItem::copyLink()
ChannelMsgInfo cmi;
if (rsChannels->getChannelMessage(mChanId, mMsgId, cmi)) {
RetroShareLink link(RetroShareLink::TYPE_CHANNEL, QString::fromStdWString(cmi.subject), QString::fromStdString(cmi.channelId), QString::fromStdString(cmi.msgId));
if (link.valid() && link.type() == RetroShareLink::TYPE_CHANNEL) {
RetroShareLink link;
if (link.createChannel(QString::fromStdWString(cmi.subject), QString::fromStdString(cmi.channelId), QString::fromStdString(cmi.msgId))) {
std::vector<RetroShareLink> urls;
urls.push_back(link);
RSLinkClipboard::copyLinks(urls);