[bijiben] build: Move resources to data directory
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] build: Move resources to data directory
- Date: Wed, 8 Nov 2017 00:41:52 +0000 (UTC)
commit 604ecccb6d9926521802582490e23c5f01e1ebcd
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Thu Oct 26 08:06:55 2017 +0200
build: Move resources to data directory
This patch moves non source code files that reside in the src
directory into the data directory.
https://bugzilla.gnome.org/show_bug.cgi?id=780752
{src => data}/bjb.gresource.xml | 0
data/meson.build | 12 ++++++
{src => data}/resources/Adwaita.css | 0
{src => data}/resources/app-menu.ui | 0
{src => data}/resources/editor-toolbar.ui | 0
data/resources/empty-results-box.ui | 50 +++++++++++++++++++++++++++
{src => data}/resources/note-symbolic.svg | 0
{src => data}/resources/settings-dialog.ui | 0
{src => data}/resources/thumbnail-frame.png | Bin 832 -> 832 bytes
meson.build | 3 +-
src/meson.build | 12 +-----
11 files changed, 66 insertions(+), 11 deletions(-)
---
diff --git a/src/bjb.gresource.xml b/data/bjb.gresource.xml
similarity index 100%
rename from src/bjb.gresource.xml
rename to data/bjb.gresource.xml
diff --git a/data/meson.build b/data/meson.build
index 27da266..a8e45d1 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -62,6 +62,18 @@ install_data(
install_dir: join_paths(bijiben_datadir, 'gnome-shell', 'search-providers')
)
+resource_data = files(
+ 'resources/Adwaita.css',
+ 'resources/app-menu.ui',
+ 'resources/editor-toolbar.ui',
+ 'resources/empty-results-box.ui',
+ 'resources/note-symbolic.svg',
+ 'resources/settings-dialog.ui',
+ 'resources/thumbnail-frame.png'
+)
+
+gresource = files('bjb.gresource.xml')
+
search_provider_dbus_iface = files('shell-search-provider-dbus-interfaces.xml')
web_files = files(
diff --git a/src/resources/Adwaita.css b/data/resources/Adwaita.css
similarity index 100%
rename from src/resources/Adwaita.css
rename to data/resources/Adwaita.css
diff --git a/src/resources/app-menu.ui b/data/resources/app-menu.ui
similarity index 100%
rename from src/resources/app-menu.ui
rename to data/resources/app-menu.ui
diff --git a/src/resources/editor-toolbar.ui b/data/resources/editor-toolbar.ui
similarity index 100%
rename from src/resources/editor-toolbar.ui
rename to data/resources/editor-toolbar.ui
diff --git a/data/resources/empty-results-box.ui b/data/resources/empty-results-box.ui
new file mode 100644
index 0000000..0653a6c
--- /dev/null
+++ b/data/resources/empty-results-box.ui
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="BjbEmptyResultsBox" parent="GtkGrid">
+ <property name="visible">True</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="column-spacing">12</property>
+ <style>
+ <class name="dim-label" />
+ </style>
+
+ <child>
+ <object class="GtkImage" id="image">
+ <property name="visible">True</property>
+ <property name="icon-name">note-symbolic</property>
+ <property name="pixel-size">48</property>
+ </object>
+ </child>
+
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="row-spacing">0</property>
+ <property name="valign">start</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="primary_label">
+ <property name="visible">True</property>
+ <property name="halign">start</property>
+ <property name="vexpand">True</property>
+ <property name="label" translatable="yes">No notes</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ <attribute name="scale" value="1.2"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="details_label">
+ <property name="halign">start</property>
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+
+ </template>
+</interface>
diff --git a/src/resources/note-symbolic.svg b/data/resources/note-symbolic.svg
similarity index 100%
rename from src/resources/note-symbolic.svg
rename to data/resources/note-symbolic.svg
diff --git a/src/resources/settings-dialog.ui b/data/resources/settings-dialog.ui
similarity index 100%
rename from src/resources/settings-dialog.ui
rename to data/resources/settings-dialog.ui
diff --git a/meson.build b/meson.build
index 3c44b25..5fb08bc 100644
--- a/meson.build
+++ b/meson.build
@@ -126,8 +126,9 @@ bijiben_deps = [
gnome = import('gnome')
i18n = import('i18n')
-po_dir = join_paths(meson.source_root(), 'po')
+data_dir = join_paths(meson.source_root(), 'data')
its_dir = join_paths(meson.source_root(), 'gettext')
+po_dir = join_paths(meson.source_root(), 'po')
top_inc = include_directories('.')
diff --git a/src/meson.build b/src/meson.build
index 3bf660b..154ddf5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -22,19 +22,11 @@ sources = files(
'bjb-window-base.c'
)
-resource_data = files(
- 'resources/Adwaita.css',
- 'resources/app-menu.ui',
- 'resources/editor-toolbar.ui',
- 'resources/note-symbolic.svg',
- 'resources/settings-dialog.ui',
- 'resources/thumbnail-frame.png'
-)
-
sources += gnome.compile_resources(
'bjb-resources',
- 'bjb.gresource.xml',
+ gresource,
c_name: 'bjb',
+ source_dir: data_dir,
dependencies: resource_data,
export: true
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]