[gnome-games] ui: Add PlatformListItem widget
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Add PlatformListItem widget
- Date: Fri, 3 Aug 2018 16:35:51 +0000 (UTC)
commit 61039def837534dc3a93c8635a81e86c8b938f16
Author: 1PunMan <saurabhsingh412 gmail com>
Date: Wed Aug 1 23:11:22 2018 +0530
ui: Add PlatformListItem widget
This widget will be later used to store rows in platforms list.
data/org.gnome.Games.gresource.xml | 1 +
data/ui/platform-list-item.ui | 10 ++++++++++
src/meson.build | 1 +
src/ui/platform-list-item.vala | 15 +++++++++++++++
4 files changed, 27 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index b3d4c526..73e9baf0 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -30,6 +30,7 @@
<file preprocess="xml-stripblanks">ui/keyboard-tester.ui</file>
<file preprocess="xml-stripblanks">ui/media-menu-button.ui</file>
<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-plugins.ui</file>
<file preprocess="xml-stripblanks">ui/preferences-page-plugins-item.ui</file>
diff --git a/data/ui/platform-list-item.ui b/data/ui/platform-list-item.ui
new file mode 100644
index 00000000..3d0d4702
--- /dev/null
+++ b/data/ui/platform-list-item.ui
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="GamesPlatformListItem" parent="GtkLabel">
+ <property name="visible">true</property>
+ <property name="vexpand">true</property>
+ <property name="margin">6</property>
+ <property name="wrap">true</property>
+ <property name="xalign">0</property>
+ </template>
+</interface>
\ No newline at end of file
diff --git a/src/meson.build b/src/meson.build
index e95b690e..e46f2f4c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -148,6 +148,7 @@ vala_sources = [
'ui/media-selector.vala',
'ui/media-menu-button.vala',
'ui/message-dialog.vala',
+ 'ui/platform-list-item.vala',
'ui/preferences-page.vala',
'ui/preferences-page-controllers.vala',
'ui/preferences-page-plugins.vala',
diff --git a/src/ui/platform-list-item.vala b/src/ui/platform-list-item.vala
new file mode 100644
index 00000000..9e0e5510
--- /dev/null
+++ b/src/ui/platform-list-item.vala
@@ -0,0 +1,15 @@
+[GtkTemplate (ui = "/org/gnome/Games/ui/platform-list-item.ui")]
+private class Games.PlatformListItem: Gtk.Label {
+ private Platform _platform;
+ public Platform platform {
+ get { return _platform; }
+ set {
+ _platform = value;
+ label = value.get_name ();
+ }
+ }
+
+ public PlatformListItem (Platform platform) {
+ Object (platform : platform);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]