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



commit 9deb4939f427815322168fd5d8d91b4e445a846e
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sun Oct 21 19:35:59 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 | 1 +
 src/ui/preferences-page-plugins.vala     | 1 +
 src/ui/preferences-page-video.vala       | 1 +
 src/ui/preferences-page.vala             | 1 +
 4 files changed, 4 insertions(+)
---
diff --git a/src/ui/preferences-page-controllers.vala b/src/ui/preferences-page-controllers.vala
index 93561000..0414bdde 100644
--- a/src/ui/preferences-page-controllers.vala
+++ b/src/ui/preferences-page-controllers.vala
@@ -22,6 +22,7 @@ private class Games.PreferencesPageControllers: PreferencesPage {
                build_gamepad_list ();
                build_keyboard_list ();
                title = _("Controllers");
+               category = PreferencesPageCategory.GENERAL;
        }
 
        private void rebuild_gamepad_list () {
diff --git a/src/ui/preferences-page-plugins.vala b/src/ui/preferences-page-plugins.vala
index 667af5df..fe10ebf9 100644
--- a/src/ui/preferences-page-plugins.vala
+++ b/src/ui/preferences-page-plugins.vala
@@ -10,6 +10,7 @@ private class Games.PreferencesPagePlugins: PreferencesPage {
                foreach (var plugin_registrar in register)
                        add_plugin_registrar (plugin_registrar);
                title = _("Extensions");
+               category = PreferencesPageCategory.GENERAL;
        }
 
        private void add_plugin_registrar (PluginRegistrar plugin_registrar) {
diff --git a/src/ui/preferences-page-video.vala b/src/ui/preferences-page-video.vala
index 72d9f1fc..c087aec3 100644
--- a/src/ui/preferences-page-video.vala
+++ b/src/ui/preferences-page-video.vala
@@ -34,6 +34,7 @@ private class Games.PreferencesPageVideo: PreferencesPage {
                settings.bind ("video-filter", this, "filter-active",
                               SettingsBindFlags.DEFAULT);
                title = _("Video");
+               category = PreferencesPageCategory.GENERAL;
        }
 
        [GtkCallback]
diff --git a/src/ui/preferences-page.vala b/src/ui/preferences-page.vala
index efa52abe..d10ddc73 100644
--- a/src/ui/preferences-page.vala
+++ b/src/ui/preferences-page.vala
@@ -4,6 +4,7 @@
 private class Games.PreferencesPage: Gtk.Bin, Gtk.Buildable {
        public PreferencesSubpage subpage { get; protected set; }
        public string title { get; construct set; }
+       public PreferencesPageCategory category { get; construct set; }
 
        [GtkChild]
        private Gtk.Box box;


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