[gnome-games] collection-box: Update filtering text on view change



commit f23208bd1f8592990dfd8f95cba0290c3365a65a
Author: Tony Crisci <tony dubstepdish com>
Date:   Thu Oct 4 15:41:15 2018 -0400

    collection-box: Update filtering text on view change
    
    When the active view of the CollectionBox changes, update the filtering
    text on the view to the current value of the search text box so it will
    filter entries correctly when it is shown.
    
    Fixes #124

 src/ui/collection-box.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 79bf0290..e56b2e18 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -143,12 +143,15 @@ private class Games.CollectionBox : Gtk.Box {
        [GtkCallback]
        private void on_visible_child_changed () {
                if (viewstack.visible_child == platform_view) {
+                       platform_view.filtering_text = search_bar.text;
                        platform_view.select_default_row ();
                }
                else if (viewstack.visible_child == developer_view) {
+                       developer_view.filtering_text = search_bar.text;
                        developer_view.select_default_row ();
                }
                else {
+                       collection_view.filtering_text = search_bar.text;
                        collection_view.reset_scroll_position ();
                }
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]