[gnome-games] ui: Add SidebarListItem



commit 1ac91ea4af158ff3a2fdd45131c4c189bc3afb1a
Author: Yetizone <andreii lisita gmail com>
Date:   Tue Jan 1 14:37:09 2019 +0200

    ui: Add SidebarListItem

 data/org.gnome.Games.gresource.xml |  1 +
 data/ui/sidebar-list-item.ui       | 15 +++++++++++++++
 src/meson.build                    |  1 +
 src/ui/sidebar-list-item.vala      |  9 +++++++++
 4 files changed, 26 insertions(+)
---
diff --git a/data/org.gnome.Games.gresource.xml b/data/org.gnome.Games.gresource.xml
index 9cf2e1bc..52bd409c 100644
--- a/data/org.gnome.Games.gresource.xml
+++ b/data/org.gnome.Games.gresource.xml
@@ -49,6 +49,7 @@
     <file preprocess="xml-stripblanks">ui/resume-failed-dialog.ui</file>
     <file preprocess="xml-stripblanks">ui/search-bar.ui</file>
     <file preprocess="xml-stripblanks">ui/shortcuts-window.ui</file>
+    <file preprocess="xml-stripblanks">ui/sidebar-list-item.ui</file>
     <file preprocess="xml-stripblanks">ui/sidebar-view.ui</file>
   </gresource>
 </gresources>
diff --git a/data/ui/sidebar-list-item.ui b/data/ui/sidebar-list-item.ui
new file mode 100644
index 00000000..a23e6ba8
--- /dev/null
+++ b/data/ui/sidebar-list-item.ui
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.16"/>
+  <template class="GamesSidebarListItem" parent="GtkListBoxRow">
+    <property name="visible">true</property>
+    <child>
+      <object class="GtkLabel" id="label">
+        <property name="visible">true</property>
+        <property name="margin">6</property>
+        <property name="wrap">true</property>
+        <property name="xalign">0</property>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/src/meson.build b/src/meson.build
index 0bfe554f..94bb1055 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -174,6 +174,7 @@ vala_sources = [
   'ui/resume-failed-dialog.vala',
   'ui/search-bar.vala',
   'ui/shortcuts-window.vala',
+  'ui/sidebar-list-item.vala',
   'ui/sidebar-view.vala',
   'ui/ui-state.vala',
 
diff --git a/src/ui/sidebar-list-item.vala b/src/ui/sidebar-list-item.vala
new file mode 100644
index 00000000..82633e65
--- /dev/null
+++ b/src/ui/sidebar-list-item.vala
@@ -0,0 +1,9 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+[GtkTemplate (ui = "/org/gnome/Games/ui/sidebar-list-item.ui")]
+private abstract class Games.SidebarListItem : Gtk.ListBoxRow {
+       [GtkChild]
+       protected Gtk.Label label;
+
+       public abstract bool has_game (Game game);
+}


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