diff --git a/Cargo.toml b/Cargo.toml
index 8786865..c1a2ae2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
adw = { package = "libadwaita", version = "0.4", features = ["v1_4"]}
gettext-rs = { version = "0.7", features = ["gettext-system"] }
-gtk = { package = "gtk4", version = "0.6", features = ["v4_10"]}
+gtk = { package = "gtk4", version = "0.6", features = ["v4_10", "blueprint"]}
log = "0.4"
once_cell = "1"
tracing-subscriber = "0.3"
\ No newline at end of file
diff --git a/README.md b/README.md
index 256e6e3..199bf0f 100644
--- a/README.md
+++ b/README.md
@@ -4,17 +4,7 @@ The classical music player and organizer.
## Hacking
-## Blueprint files
-
-When adding a new Blueprint file in `data/res/`, remember to add it to the
-following file lists:
-
- - list of bluprint sources in `data/res/meson.build`
- - list of resources in `data/res/musicus.gresource.xml` (`.blp` replaced with
- `.ui`)
- - list of translatable files in `po/POTFILES`
-
-## Internationalization
+### Internationalization
Execute the following commands from the project root directory to update
translation files whenever translatable strings have been changed.
diff --git a/data/res/meson.build b/data/res/meson.build
index 188af4b..643e53d 100644
--- a/data/res/meson.build
+++ b/data/res/meson.build
@@ -1,21 +1,8 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
gnome = import('gnome')
-blueprints = custom_target('blueprints',
- input: files(
- 'home_page.blp',
- 'playlist_page.blp',
- 'tile.blp',
- 'welcome_page.blp',
- 'window.blp'
- ),
- output: '.',
- command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
-)
-
gnome.compile_resources('musicus',
'musicus.gresource.xml',
- dependencies: blueprints,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
diff --git a/data/res/musicus.gresource.xml b/data/res/musicus.gresource.xml
index 4eff1e1..987ec29 100644
--- a/data/res/musicus.gresource.xml
+++ b/data/res/musicus.gresource.xml
@@ -2,11 +2,6 @@
icons/scalable/actions/playlist-symbolic.svg
- home_page.ui
- playlist_page.ui
- tile.ui
- welcome_page.ui
- window.ui
style.css
diff --git a/data/res/home_page.blp b/data/ui/home_page.blp
similarity index 100%
rename from data/res/home_page.blp
rename to data/ui/home_page.blp
diff --git a/data/res/playlist_page.blp b/data/ui/playlist_page.blp
similarity index 100%
rename from data/res/playlist_page.blp
rename to data/ui/playlist_page.blp
diff --git a/data/res/tile.blp b/data/ui/tile.blp
similarity index 100%
rename from data/res/tile.blp
rename to data/ui/tile.blp
diff --git a/data/res/welcome_page.blp b/data/ui/welcome_page.blp
similarity index 100%
rename from data/res/welcome_page.blp
rename to data/ui/welcome_page.blp
diff --git a/data/res/window.blp b/data/ui/window.blp
similarity index 100%
rename from data/res/window.blp
rename to data/ui/window.blp
diff --git a/src/home_page.rs b/src/home_page.rs
index fa11d6d..7c03995 100644
--- a/src/home_page.rs
+++ b/src/home_page.rs
@@ -7,7 +7,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, gtk::CompositeTemplate)]
- #[template(resource = "/de/johrpan/musicus/home_page.ui")]
+ #[template(file = "data/ui/home_page.blp")]
pub struct MusicusHomePage {
#[template_child]
pub search_entry: TemplateChild,
diff --git a/src/playlist_page.rs b/src/playlist_page.rs
index dfc0e32..6a9ac66 100644
--- a/src/playlist_page.rs
+++ b/src/playlist_page.rs
@@ -6,7 +6,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, gtk::CompositeTemplate)]
- #[template(resource = "/de/johrpan/musicus/playlist_page.ui")]
+ #[template(file = "data/ui/playlist_page.blp")]
pub struct MusicusPlaylistPage {}
#[glib::object_subclass]
diff --git a/src/tile.rs b/src/tile.rs
index 399a117..3ee36cc 100644
--- a/src/tile.rs
+++ b/src/tile.rs
@@ -4,7 +4,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, gtk::CompositeTemplate)]
- #[template(resource = "/de/johrpan/musicus/tile.ui")]
+ #[template(file = "data/ui/tile.blp")]
pub struct MusicusTile {}
#[glib::object_subclass]
diff --git a/src/welcome_page.rs b/src/welcome_page.rs
index 65090fa..68d1dee 100644
--- a/src/welcome_page.rs
+++ b/src/welcome_page.rs
@@ -7,7 +7,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, gtk::CompositeTemplate)]
- #[template(resource = "/de/johrpan/musicus/welcome_page.ui")]
+ #[template(file = "data/ui/welcome_page.blp")]
pub struct MusicusWelcomePage {}
#[glib::object_subclass]
diff --git a/src/window.rs b/src/window.rs
index c51ae66..cac9092 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -10,7 +10,7 @@ mod imp {
use super::*;
#[derive(Debug, Default, gtk::CompositeTemplate)]
- #[template(resource = "/de/johrpan/musicus/window.ui")]
+ #[template(file = "data/ui/window.blp")]
pub struct MusicusWindow {
#[template_child]
pub stack: TemplateChild,