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
+3
View File
@@ -124,6 +124,8 @@ public:
const torrent::Object& get_filter() const { return m_filter; }
void set_filter(const torrent::Object& s) { m_filter = s; }
const torrent::Object& get_temp_filter() const { return m_tempFilter; }
void set_temp_filter(const torrent::Object& s) { m_tempFilter = s; }
void set_filter_on_event(const std::string& event);
void clear_filter_on();
@@ -172,6 +174,7 @@ private:
torrent::Object m_sortCurrent;
torrent::Object m_filter;
torrent::Object m_tempFilter; // Temporary view filter (eg: name based filter)
torrent::Object m_event_added;
torrent::Object m_event_removed;