Commit 18c905af authored by Brian Masney's avatar Brian Masney Committed by Jim Nelson

Allow searching for event comments: Closes bgo#723749

parent f691aca0
......@@ -42,6 +42,7 @@ Dominique Leuenberger <dimstar@opensuse.org>
Dominic Lloyd <dwlloyd@telus.net>
Tobias Lott <tobias@lott.eu.org>
Gavrilov Maksim <ulltor@gmail.com>
Brian Masney <masneyb@onstation.org>
mcben <mcbennn@gmail.com>
Trevor Mehard <mehardtj@g.cofc.edu>
mnemo <mnemo@minimum.se>
......
......@@ -570,7 +570,23 @@ public class Event : EventSource, ContainerSource, Proxyable, Indexable {
}
private void update_indexable_keywords() {
indexable_keywords = prepare_indexable_string(get_raw_name());
string[] components = new string[3];
int i = 0;
string? rawname = get_raw_name();
if (rawname != null)
components[i++] = rawname;
string? comment = get_comment();
if (comment != null)
components[i++] = comment;
if (i == 0)
indexable_keywords = null;
else {
components[i] = null;
indexable_keywords = prepare_indexable_string(string.joinv(" ", components));
}
}
public unowned string? get_indexable_keywords() {
......@@ -788,6 +804,7 @@ public class Event : EventSource, ContainerSource, Proxyable, Indexable {
bool committed = event_table.set_comment(event_id, new_comment);
if (committed) {
this.comment = new_comment;
update_indexable_keywords();
notify_altered(new Alteration.from_list("metadata:comment, indexable:keywords"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment