[gnome-games/wip/exalm/platform-preferences: 30/36] platform: Add get_preferences()



commit 89a8e3dcc122f4fb79c0f80741cf0f510316a04f
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 22:06:10 2018 +0500

    platform: Add get_preferences()

 src/core/platform.vala            | 2 ++
 src/dummy/dummy-platform.vala     | 4 ++++
 src/generic/generic-platform.vala | 4 ++++
 src/retro/retro-platform.vala     | 4 ++++
 4 files changed, 14 insertions(+)
---
diff --git a/src/core/platform.vala b/src/core/platform.vala
index 9d907872..0b661772 100644
--- a/src/core/platform.vala
+++ b/src/core/platform.vala
@@ -5,6 +5,8 @@ public interface Games.Platform : Object {
 
        public abstract string get_name ();
 
+       public abstract PreferencesPage get_preferences ();
+
        public static uint hash (Platform platform) {
                return str_hash (platform.get_id ());
        }
diff --git a/src/dummy/dummy-platform.vala b/src/dummy/dummy-platform.vala
index 696d7b96..36f5d2a3 100644
--- a/src/dummy/dummy-platform.vala
+++ b/src/dummy/dummy-platform.vala
@@ -8,4 +8,8 @@ public class Games.DummyPlatform : Object, Platform {
        public string get_name () {
                return _("Unknown");
        }
+
+       public PreferencesPage get_preferences () {
+               return new PreferencesPageDummyPlatform ();
+       }
 }
diff --git a/src/generic/generic-platform.vala b/src/generic/generic-platform.vala
index 18c6e90f..b2ef5f03 100644
--- a/src/generic/generic-platform.vala
+++ b/src/generic/generic-platform.vala
@@ -16,4 +16,8 @@ public class Games.GenericPlatform : Object, Platform {
        public string get_name () {
                return name;
        }
+
+       public PreferencesPage get_preferences () {
+               return new PreferencesPageDummyPlatform ();
+       }
 }
diff --git a/src/retro/retro-platform.vala b/src/retro/retro-platform.vala
index 9e4a80ec..6d9de845 100644
--- a/src/retro/retro-platform.vala
+++ b/src/retro/retro-platform.vala
@@ -22,4 +22,8 @@ public class Games.RetroPlatform : Object, Platform {
        public string[] get_mime_types () {
                return mime_types;
        }
+
+       public PreferencesPage get_preferences () {
+               return new PreferencesPageDummyPlatform ();
+       }
 }


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