[gnome-games/wip/exalm/platform-preferences: 31/36] preferences-window: Add platform pages



commit 7d56d6006d4f5c32e56568212b4ed40a8f08a581
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 20:13:58 2018 +0500

    preferences-window: Add platform pages

 src/ui/preferences-window.vala | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/ui/preferences-window.vala b/src/ui/preferences-window.vala
index 453ff9bf..1ff72570 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -68,9 +68,22 @@ private class Games.PreferencesWindow : Gtk.Window {
        private Binding selection_mode_binding;
 
        public PreferencesWindow () {
+               add_platform_pages ();
+
                update_ui ();
        }
 
+       private void add_platform_pages () {
+               var register = PlatformRegister.get_register ();
+               var platforms = register.get_all_platforms ();
+
+               foreach (var platform in platforms) {
+                       var page = platform.get_preferences ();
+
+                       stack.add (page);
+               }
+       }
+
        [GtkCallback]
        private void sidebar_row_selected () {
                content_box.visible_child = stack;


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