mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 05:11:02 -04:00
commit
ba7cf4995b
8 changed files with 43 additions and 8 deletions
|
@ -795,8 +795,7 @@ void SearchDialog::advancedSearch(RsRegularExpression::Expression* expression)
|
|||
TurtleRequestId req_id = rsTurtle->turtleSearch(e) ;
|
||||
|
||||
// This will act before turtle results come to the interface, thanks to the signals scheduling policy.
|
||||
// The text "bool exp" should be replaced by an appropriate text describing the actual search.
|
||||
initSearchResult("bool exp",req_id, ui.FileTypeComboBox->currentIndex(), true) ;
|
||||
initSearchResult(QString::fromStdString(e.GetStrings()),req_id, ui.FileTypeComboBox->currentIndex(), true) ;
|
||||
|
||||
rsFiles -> SearchBoolExp(expression, results, RS_FILE_HINTS_REMOTE);// | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "TurtleRouterDialog.h"
|
||||
#include <QPainter>
|
||||
#include <QStylePainter>
|
||||
#include <algorithm> // for sort
|
||||
|
||||
#include "gui/settings/rsharesettings.h"
|
||||
|
||||
|
@ -70,6 +71,10 @@ void TurtleRouterDialog::processSettings(bool bLoad)
|
|||
|
||||
}
|
||||
|
||||
bool sr_Compare( TurtleRequestDisplayInfo m1, TurtleRequestDisplayInfo m2)
|
||||
{
|
||||
return m1.age < m2.age;
|
||||
}
|
||||
|
||||
void TurtleRouterDialog::updateDisplay()
|
||||
{
|
||||
|
@ -79,7 +84,9 @@ void TurtleRouterDialog::updateDisplay()
|
|||
std::vector<TurtleRequestDisplayInfo > tunnel_reqs_info ;
|
||||
|
||||
rsTurtle->getInfo(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ;
|
||||
|
||||
|
||||
std::sort(search_reqs_info.begin(),search_reqs_info.end(),sr_Compare) ;
|
||||
|
||||
updateTunnelRequests(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ;
|
||||
|
||||
}
|
||||
|
@ -162,8 +169,8 @@ void TurtleRouterDialog::updateTunnelRequests( const std::vector<std::vector<std
|
|||
|
||||
for(uint i=0;i<search_reqs_info.size();++i)
|
||||
{
|
||||
QString str = tr("Request id: %1\t from [%2]\t %3 secs ago").arg(search_reqs_info[i].request_id,0,16).arg(getPeerName(search_reqs_info[i].source_peer_id)).arg(search_reqs_info[i].age);
|
||||
|
||||
QString str = tr("Request id: %1\t %3 secs ago\t from %2\t %4").arg(search_reqs_info[i].request_id,0,16).arg(getPeerName(search_reqs_info[i].source_peer_id), -25).arg(search_reqs_info[i].age).arg(QString::fromUtf8(search_reqs_info[i].keywords.c_str(),search_reqs_info[i].keywords.length()));
|
||||
|
||||
stl.clear() ;
|
||||
stl.push_back(str) ;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue