[gnome-games/wip/exalm/platform-preferences: 9/26] ui: Add PreferencesPageDummyPlatform



commit ae1a5f84c46fe0877c8514cb6d173c2caafbb383
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Sep 25 21:37:04 2018 +0500

    ui: Add PreferencesPageDummyPlatform
    
    This will be used to provide a preferences page for DummyPlatform.

 data/org.gnome.Games.gresource.xml          |  1 +
 data/ui/preferences-page-dummy-platform.ui  | 72 +++++++++++++++++++++++++++++
 po/POTFILES.in                              |  1 +
 src/meson.build                             |  1 +
 src/ui/preferences-page-dummy-platform.vala | 14 ++++++
 5 files changed, 89 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 114bea86..2691ba7e 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -31,6 +31,7 @@
     <file preprocess="xml-stripblanks">ui/media-selector.ui</file>
     <file preprocess="xml-stripblanks">ui/platform-list-item.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-page-controllers.ui</file>
+    <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-video.ui</file>
diff --git a/data/ui/preferences-page-dummy-platform.ui b/data/ui/preferences-page-dummy-platform.ui
new file mode 100644
index 00000000..a6013fa9
--- /dev/null
+++ b/data/ui/preferences-page-dummy-platform.ui
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.16 -->
+  <template class="GamesPreferencesPageDummyPlatform" 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">
+                            <property name="selection-mode">none</property>
+                            <property name="visible">true</property>
+                            <child>
+                              <object class="GtkBox">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <property name="margin">6</property>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0</property>
+                                    <property name="wrap">true</property>
+                                    <property name="label" translatable="true">This is a dummy preferences 
page</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel">
+                                    <property name="visible">true</property>
+                                    <property name="xalign">0</property>
+                                    <property name="wrap">true</property>
+                                    <property name="label" translatable="yes">If you see this, this is a 
bug. Please contact the developers.</property>
+                                    <style>
+                                      <class name="dim-label" />
+                                    </style>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                          </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 2b6893bb..c4aa492b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -12,6 +12,7 @@ data/ui/gamepad-mapper.ui
 data/ui/keyboard-mapper.ui
 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-video.ui
 data/ui/preferences-subpage-gamepad.ui
diff --git a/src/meson.build b/src/meson.build
index f5898c2a..827ea4e9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -156,6 +156,7 @@ vala_sources = [
   'ui/preferences-page.vala',
   'ui/preferences-page-category.vala',
   'ui/preferences-page-controllers.vala',
+  'ui/preferences-page-dummy-platform.vala',
   'ui/preferences-page-plugins.vala',
   'ui/preferences-page-plugins-item.vala',
   'ui/preferences-page-video.vala',
diff --git a/src/ui/preferences-page-dummy-platform.vala b/src/ui/preferences-page-dummy-platform.vala
new file mode 100644
index 00000000..8c26664b
--- /dev/null
+++ b/src/ui/preferences-page-dummy-platform.vala
@@ -0,0 +1,14 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/preferences-page-dummy-platform.ui")]
+private class Games.PreferencesPageDummyPlatform: Gtk.Bin, PreferencesPage {
+       public PreferencesSubpage subpage { get; protected set; }
+
+       public string title {
+               get { return _("Unknown"); }
+       }
+
+       public PreferencesPageCategory category {
+               get { return PreferencesPageCategory.PLATFORMS; }
+       }
+}


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