Add a temporary name filter for the main view.

By using 'F' in the main view you can enter a regex
that will be used to filter the view based on the torrent name.
To remove the filter set the input to empty.
This is adding a 'view.temp_filter' property and a 'match{}' function.
For example with Ctrl+X you could do:
command> view.temp_filter=main,"match={d.name=,.*linux.*iso}"
This commit is contained in:
Toff
2016-10-31 12:19:41 +01:00
parent 226e670dec
commit e15270271d
9 changed files with 113 additions and 10 deletions
+8
View File
@@ -109,6 +109,14 @@ ViewManager::set_filter(const std::string& name, const torrent::Object& cmd) {
(*viewItr)->filter();
}
void
ViewManager::set_temp_filter(const std::string& name, const torrent::Object& cmd) {
iterator viewItr = find_throw(name);
(*viewItr)->set_temp_filter(cmd);
(*viewItr)->filter();
}
void
ViewManager::set_filter_on(const std::string& name, const filter_args& args) {
iterator viewItr = find_throw(name);