[gnome-games/wip/exalm/platform-preferences: 39/46] ui: Add PreferencesPageDummyPlatform



commit 655c9240cc24ebdcc744e51f28199682b308295f
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 789498a1..3c48ada7 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -32,6 +32,7 @@
     <file preprocess="xml-stripblanks">ui/media-selector.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 22a67ecf..75dccb32 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -162,6 +162,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]