[gnome-games/wip/exalm/platform-preferences: 56/76] ui: Add PreferencesPageDummyPlatform



commit 9530280f7352b89b79f2f114c0f8492f978875f6
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  | 45 +++++++++++++++++++++++++++++
 po/POTFILES.in                              |  1 +
 src/meson.build                             |  1 +
 src/ui/preferences-page-dummy-platform.vala |  9 ++++++
 5 files changed, 57 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 9cf2e1bc..7d3f8ecb 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -34,6 +34,7 @@
     <file preprocess="xml-stripblanks">ui/platform-list-item.ui</file>
     <file preprocess="xml-stripblanks">ui/preferences-page.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..6ccc9072
--- /dev/null
+++ b/data/ui/preferences-page-dummy-platform.ui
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.16 -->
+  <template class="GamesPreferencesPageDummyPlatform" parent="GamesPreferencesPage">
+    <property name="visible">True</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>
+  </template>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a30a8a13..5c605716 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,6 +13,7 @@ data/ui/input-mode-switcher.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 fe4f450d..e09003c2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -159,6 +159,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..a4df16b7
--- /dev/null
+++ b/src/ui/preferences-page-dummy-platform.vala
@@ -0,0 +1,9 @@
+// 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: PreferencesPage {
+       construct {
+               title = _("Unknown");
+               category = PreferencesPageCategory.PLATFORMS;
+       }
+}


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