diff --git a/retroshare-gui/src/gui/SearchDialog.cpp b/retroshare-gui/src/gui/SearchDialog.cpp index 4de8032d0..26ae0c9b6 100644 --- a/retroshare-gui/src/gui/SearchDialog.cpp +++ b/retroshare-gui/src/gui/SearchDialog.cpp @@ -653,6 +653,16 @@ void SearchDialog::searchKeywords() void SearchDialog::updateFiles(qulonglong search_id,FileDetail file) { + static std::map nb_results ; + + if(nb_results.find(search_id) == nb_results.end()) + nb_results[search_id] = 0 ; + + if(nb_results[search_id] >= ui._max_results_SB->value()) + return ; + else + ++nb_results[search_id] ; + /* which extensions do we use? */ std::string txt = ui.lineEdit->text().toStdString(); #ifdef DEBUG diff --git a/retroshare-gui/src/gui/SearchDialog.ui b/retroshare-gui/src/gui/SearchDialog.ui index 398944f48..9cd3de9fa 100644 --- a/retroshare-gui/src/gui/SearchDialog.ui +++ b/retroshare-gui/src/gui/SearchDialog.ui @@ -1099,6 +1099,29 @@ border-image: url(:/images/btn_26_pressed.png) 4; + + + + Limit number of results to : + + + + + + + 100 + + + 5000 + + + 100 + + + 1000 + + +