[gnome-games/wip/exalm/platform-preferences] ui: Add PreferencesPageRetroPlatform



commit d4529c2f1c24b75558494c3a3d99bfe4bfc509cc
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 23:08:16 2018 +0500

    ui: Add PreferencesPageRetroPlatform

 data/org.gnome.Games.gresource.xml          |  1 +
 data/ui/preferences-page-retro-platform.ui  | 46 +++++++++++++++++++++++++++++
 po/POTFILES.in                              |  1 +
 src/meson.build                             |  1 +
 src/ui/preferences-page-retro-platform.vala | 22 ++++++++++++++
 5 files changed, 71 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 2691ba7e..defa5cd5 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -34,6 +34,7 @@
     <file preprocess="xml-stripblanks">ui/preferences-page-dummy-platform.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-page-plugins.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-page-plugins-item.ui</file>
+    <file preprocess="xml-stripblanks">ui/preferences-page-retro-platform.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-page-video.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-sidebar.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-sidebar-item.ui</file>
diff --git a/data/ui/preferences-page-retro-platform.ui b/data/ui/preferences-page-retro-platform.ui
new file mode 100644
index 00000000..f7d0b091
--- /dev/null
+++ b/data/ui/preferences-page-retro-platform.ui
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.16 -->
+  <template class="GamesPreferencesPageRetroPlatform" parent="GtkBin">
+    <property name="visible">True</property>
+    <child>
+      <object class="GtkScrolledWindow">
+        <property name="visible">true</property>
+        <property name="hscrollbar-policy">never</property>
+        <child>
+          <object class="GtkViewport">
+            <property name="visible">true</property>
+            <child>
+              <object class="HdyColumn">
+                <property name="visible">True</property>
+                <property name="expand">True</property>
+                <property name="maximum_width">600</property>
+                <property name="linear-growth-width">300</property>
+                <child>
+                  <object class="GtkBox">
+                    <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
+                    <property name="margin">12</property>
+                    <property name="spacing">12</property>
+                    <child>
+                      <object class="GtkFrame">
+                        <property name="visible">true</property>
+                        <property name="shadow-type">in</property>
+                        <child>
+                          <object class="GtkListBox" id="list_box">
+                            <property name="selection-mode">none</property>
+                            <property name="visible">true</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c4aa492b..6140e3ec 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -14,6 +14,7 @@ data/ui/media-menu-button.ui
 data/ui/preferences-page-controllers.ui
 data/ui/preferences-page-dummy-platform.ui
 data/ui/preferences-page-plugins.ui
+data/ui/preferences-page-retro-platform.ui
 data/ui/preferences-page-video.ui
 data/ui/preferences-subpage-gamepad.ui
 data/ui/preferences-subpage-keyboard.ui
diff --git a/src/meson.build b/src/meson.build
index c04ac402..8cfb6ac2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -160,6 +160,7 @@ vala_sources = [
   'ui/preferences-page-dummy-platform.vala',
   'ui/preferences-page-plugins.vala',
   'ui/preferences-page-plugins-item.vala',
+  'ui/preferences-page-retro-platform.vala',
   'ui/preferences-page-video.vala',
   'ui/preferences-sidebar.vala',
   'ui/preferences-sidebar-item.vala',
diff --git a/src/ui/preferences-page-retro-platform.vala b/src/ui/preferences-page-retro-platform.vala
new file mode 100644
index 00000000..d8096b03
--- /dev/null
+++ b/src/ui/preferences-page-retro-platform.vala
@@ -0,0 +1,22 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/preferences-page-retro-platform.ui")]
+private class Games.PreferencesPageRetroPlatform: Gtk.Bin, PreferencesPage {
+       public Platform platform { get; construct set; }
+
+       public PreferencesSubpage subpage { get; protected set; }
+
+       private string _title;
+       public string title {
+               get { return _title; }
+       }
+
+       public PreferencesPageCategory category {
+               get { return PreferencesPageCategory.PLATFORMS; }
+       }
+
+       public PreferencesPageRetroPlatform (Platform platform) {
+               this.platform = platform;
+               _title = platform.get_name ();
+       }
+}


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