[gnome-games/wip/exalm/platform-preferences: 12/26] preferences-window: Add platform pages



commit c692694e24a5f285a3208733e2866ef2c0ad30a3
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 7d24e394..f9576b14 100644
--- a/src/ui/preferences-window.vala
+++ b/src/ui/preferences-window.vala
@@ -66,9 +66,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]