[gnome-games/wip/exalm/platform-preferences: 22/28] preferences-page: Add 'category' property



commit 9848950a19cd2d1b91b6ab8df481da415652bac5
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 19:48:08 2018 +0500

    preferences-page: Add 'category' property
    
    This will be used in subsequent commits to add separators between certain
    pages.

 src/ui/preferences-page-controllers.vala | 4 ++++
 src/ui/preferences-page-plugins.vala     | 4 ++++
 src/ui/preferences-page-video.vala       | 4 ++++
 src/ui/preferences-page.vala             | 1 +
 4 files changed, 13 insertions(+)
---
diff --git a/src/ui/preferences-page-controllers.vala b/src/ui/preferences-page-controllers.vala
index 30cfe95f..6ea3e88d 100644
--- a/src/ui/preferences-page-controllers.vala
+++ b/src/ui/preferences-page-controllers.vala
@@ -8,6 +8,10 @@ private class Games.PreferencesPageControllers: Gtk.Bin, PreferencesPage {
                get { return _("Controllers"); }
        }
 
+       public PreferencesPageCategory category {
+               get { return PreferencesPageCategory.GENERAL; }
+       }
+
        [GtkChild]
        private Gtk.Label gamepads_label;
        [GtkChild]
diff --git a/src/ui/preferences-page-plugins.vala b/src/ui/preferences-page-plugins.vala
index 28880efb..cbcfbd18 100644
--- a/src/ui/preferences-page-plugins.vala
+++ b/src/ui/preferences-page-plugins.vala
@@ -8,6 +8,10 @@ private class Games.PreferencesPagePlugins: Gtk.Bin, PreferencesPage {
                get { return _("Extensions"); }
        }
 
+       public PreferencesPageCategory category {
+               get { return PreferencesPageCategory.GENERAL; }
+       }
+
        [GtkChild]
        private Gtk.ListBox list_box;
 
diff --git a/src/ui/preferences-page-video.vala b/src/ui/preferences-page-video.vala
index 804a43a3..6dba3654 100644
--- a/src/ui/preferences-page-video.vala
+++ b/src/ui/preferences-page-video.vala
@@ -8,6 +8,10 @@ private class Games.PreferencesPageVideo: Gtk.Bin, PreferencesPage {
                get { return _("Video"); }
        }
 
+       public PreferencesPageCategory category {
+               get { return PreferencesPageCategory.GENERAL; }
+       }
+
        private string _filter_active;
        public string filter_active {
                set {
diff --git a/src/ui/preferences-page.vala b/src/ui/preferences-page.vala
index 508adea4..463418ad 100644
--- a/src/ui/preferences-page.vala
+++ b/src/ui/preferences-page.vala
@@ -3,4 +3,5 @@
 private interface Games.PreferencesPage: Gtk.Widget {
        public abstract PreferencesSubpage subpage { get; protected set; }
        public abstract string title { get; }
+       public abstract PreferencesPageCategory category { get; }
 }


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