[gnome-games] ui: Add DeveloperListItem widget
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Add DeveloperListItem widget
- Date: Fri, 3 Aug 2018 16:35:46 +0000 (UTC)
commit 3d77852edbd09c461584344943b8f0883bdc4186
Author: 1PunMan <saurabhsingh412 gmail com>
Date: Wed Aug 1 23:08:28 2018 +0530
ui: Add DeveloperListItem widget
This widget will be later used to store rows in developers list.
data/org.gnome.Games.gresource.xml | 1 +
data/ui/developer-list-item.ui | 10 ++++++++++
src/meson.build | 1 +
src/ui/developer-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 e77d0db2..b3d4c526 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -14,6 +14,7 @@
<file preprocess="xml-stripblanks">ui/collection-box.ui</file>
<file preprocess="xml-stripblanks">ui/collection-header-bar.ui</file>
<file preprocess="xml-stripblanks">ui/collection-icon-view.ui</file>
+ <file preprocess="xml-stripblanks">ui/developer-list-item.ui</file>
<file preprocess="xml-stripblanks">ui/display-box.ui</file>
<file preprocess="xml-stripblanks">ui/display-header-bar.ui</file>
<file preprocess="xml-stripblanks">ui/dummy-display.ui</file>
diff --git a/data/ui/developer-list-item.ui b/data/ui/developer-list-item.ui
new file mode 100644
index 00000000..b80940bb
--- /dev/null
+++ b/data/ui/developer-list-item.ui
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="GamesDeveloperListItem" 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 a13573e9..e95b690e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -127,6 +127,7 @@ vala_sources = [
'ui/collection-box.vala',
'ui/collection-icon-view.vala',
'ui/collection-header-bar.vala',
+ 'ui/developer-list-item.vala',
'ui/display-box.vala',
'ui/display-header-bar.vala',
'ui/dummy-display.vala',
diff --git a/src/ui/developer-list-item.vala b/src/ui/developer-list-item.vala
new file mode 100644
index 00000000..ad510b31
--- /dev/null
+++ b/src/ui/developer-list-item.vala
@@ -0,0 +1,15 @@
+[GtkTemplate (ui = "/org/gnome/Games/ui/developer-list-item.ui")]
+private class Games.DeveloperListItem: Gtk.Label {
+ private Developer _developer;
+ public Developer developer {
+ get { return _developer; }
+ set {
+ _developer = value;
+ label = value.get_developer ();
+ }
+ }
+
+ public DeveloperListItem (Developer developer) {
+ Object (developer: developer);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]