[gnome-games/wip/exalm/libhandy2: 3/9] ui: Add 'subpage' property to PreferencesPage



commit 6e05eabd40bcb8f13fc2cdc8513feae5a7829bda
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Wed Sep 12 00:54:04 2018 +0500

    ui: Add 'subpage' property to PreferencesPage
    
    This will be used in the next commits to open subpages from preferences
    pages.

 src/ui/preferences-page-controllers.vala | 1 +
 src/ui/preferences-page-plugins.vala     | 2 ++
 src/ui/preferences-page-video.vala       | 2 ++
 src/ui/preferences-page.vala             | 1 +
 4 files changed, 6 insertions(+)
---
diff --git a/src/ui/preferences-page-controllers.vala b/src/ui/preferences-page-controllers.vala
index 74441feb..ffdc5474 100644
--- a/src/ui/preferences-page-controllers.vala
+++ b/src/ui/preferences-page-controllers.vala
@@ -4,6 +4,7 @@
 private class Games.PreferencesPageControllers: Gtk.Stack, PreferencesPage {
        public Gtk.HeaderBar header_bar { get; protected set; }
        public bool immersive_mode { get; protected set; }
+       public PreferencesSubpage subpage { get; protected set; }
 
        [GtkChild]
        private Gtk.Label gamepads_label;
diff --git a/src/ui/preferences-page-plugins.vala b/src/ui/preferences-page-plugins.vala
index 5e85c30b..ed3478e7 100644
--- a/src/ui/preferences-page-plugins.vala
+++ b/src/ui/preferences-page-plugins.vala
@@ -14,6 +14,8 @@ private class Games.PreferencesPagePlugins: Gtk.Bin, PreferencesPage {
                protected set {}
        }
 
+       public PreferencesSubpage subpage { get; protected set; }
+
        [GtkChild]
        private Gtk.ListBox list_box;
 
diff --git a/src/ui/preferences-page-video.vala b/src/ui/preferences-page-video.vala
index 3ef3638e..756c00f1 100644
--- a/src/ui/preferences-page-video.vala
+++ b/src/ui/preferences-page-video.vala
@@ -14,6 +14,8 @@ private class Games.PreferencesPageVideo: Gtk.Bin, PreferencesPage {
                get { return false; }
        }
 
+       public PreferencesSubpage subpage { get; protected set; }
+
        private string _filter_active;
        public string filter_active {
                set {
diff --git a/src/ui/preferences-page.vala b/src/ui/preferences-page.vala
index b4d37fb1..1ef07a85 100644
--- a/src/ui/preferences-page.vala
+++ b/src/ui/preferences-page.vala
@@ -3,5 +3,6 @@
 private interface Games.PreferencesPage: Gtk.Widget {
        public abstract Gtk.HeaderBar header_bar { get; protected set; }
        public abstract bool immersive_mode { get; protected set; }
+       public abstract PreferencesSubpage subpage { get; protected set; }
        public virtual void visible_page_changed () {}
 }


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