[gnome-games/wip/exalm/views: 59/68] collection-view: Add 'loading-notification'



commit 3b80b87b7f1c35b971df5e2417f514b5eb6c8d22
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Thu Oct 4 19:59:38 2018 +0500

    collection-view: Add 'loading-notification'
    
    Make ApplicationWindow interact with CollectionView instead of its
    internals.

 src/ui/application-window.vala | 4 +++-
 src/ui/collection-view.vala    | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 413e9f83..553f02e8 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -117,7 +117,9 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
                if (settings.get_boolean ("window-maximized"))
                        maximize ();
 
-               loading_notification_binding = bind_property ("loading-notification", collection_view.box, 
"loading-notification",
+               loading_notification_binding = bind_property ("loading-notification",
+                                                             collection_view,
+                                                             "loading-notification",
                                                              BindingFlags.DEFAULT);
 
                box_fullscreen_binding = bind_property ("is-fullscreen", display_view.box, "is-fullscreen",
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index cb93b2ef..243827dc 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -43,9 +43,11 @@ private class Games.CollectionView: Gtk.Bin, ApplicationView {
                }
        }
 
+       public bool loading_notification { get; set; }
        public bool search_mode { get; set; }
        public bool is_collection_empty { get; set; }
 
+       private Binding loading_notification_binding;
        private Binding box_search_binding;
        private Binding box_empty_collection_binding;
        private Binding header_bar_search_binding;
@@ -55,6 +57,10 @@ private class Games.CollectionView: Gtk.Bin, ApplicationView {
                header_bar.viewstack = box.viewstack;
                is_collection_empty = true;
 
+               loading_notification_binding = bind_property ("loading-notification", box,
+                                                             "loading-notification",
+                                                             BindingFlags.DEFAULT);
+
                box_search_binding = bind_property ("search-mode", box, "search-mode",
                                                    BindingFlags.BIDIRECTIONAL);
                header_bar_search_binding = bind_property ("search-mode", header_bar,


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