GNOME Bugzilla – Bug 762621
Saved logs aren't filtered when searching
Last modified: 2016-02-25 10:28:23 UTC
When you save logs, whatever is currently in the logs view is saved, so that changing the filters on the left or the boot at the top is reflected in the save action. However, this logic doesn't hold true when searching: if you search and then save, it's not just the search results that are saved. Two possible fixes: 1. Make the save button insensitive while a search is active 2. Make save only save search results I'm not sure how often people will want to save search results. If it's not that often, then 1 might be fine. Alternatively, you could do 1 until 2 is fixed.
Created attachment 322333 [details] [review] Only output search result I implemented the second solution. We only output the search results shown in the list view.
Review of attachment 322333 [details] [review]: ::: src/gl-eventviewlist.c @@ +96,3 @@ index); + if (gtk_widget_get_mapped (GTK_WIDGET (row)) == FALSE) This needs a comment as to why the check is there. Is using "mapped" good enough, or would "visible" work?
(In reply to David King from comment #2) > Review of attachment 322333 [details] [review] [review]: > > ::: src/gl-eventviewlist.c > @@ +96,3 @@ > index); > > + if (gtk_widget_get_mapped (GTK_WIDGET (row)) == FALSE) > > This needs a comment as to why the check is there. Is using "mapped" good > enough, or would "visible" work? Fine. I'll add some comments here. Using "visible" won't work. Because as for rows that's not shown while searching, their "visible" property is still TRUE. While "child visible" is FALSE. See links below: https://github.com/GNOME/gtk/blob/master/gtk/gtklistbox.c#L2189 https://github.com/GNOME/gtk/blob/master/gtk/gtklistbox.c#L2212
Created attachment 322346 [details] [review] output-search-result.patch Add comment and update the if condition
Review of attachment 322346 [details] [review]: Sure, go ahead.
Comment on attachment 322346 [details] [review] output-search-result.patch Pushed to master as commit 2fc19e0f0436788bdf9e81288bcafd8c91f6d039