mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Move resources to data
This commit is contained in:
parent
25eb7591f8
commit
3f1a9a5756
5 changed files with 19 additions and 17 deletions
18
data/res/meson.build
Normal file
18
data/res/meson.build
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
|
||||
gnome = import('gnome')
|
||||
|
||||
blueprints = custom_target('blueprints',
|
||||
input: files(
|
||||
'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,
|
||||
)
|
||||
6
data/res/musicus.gresource.xml
Normal file
6
data/res/musicus.gresource.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/de/johrpan/musicus">
|
||||
<file preprocess="xml-stripblanks">window.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
36
data/res/window.blp
Normal file
36
data/res/window.blp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusWindow : Adw.ApplicationWindow {
|
||||
default-width: 600;
|
||||
default-height: 300;
|
||||
|
||||
Box {
|
||||
orientation: vertical;
|
||||
|
||||
HeaderBar header_bar {
|
||||
[end]
|
||||
MenuButton {
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
}
|
||||
|
||||
Label label {
|
||||
label: _("Hello, World!");
|
||||
vexpand: true;
|
||||
styles ["title-1"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu primary_menu {
|
||||
item {
|
||||
label: _("_Preferences");
|
||||
action: "app.preferences";
|
||||
}
|
||||
item {
|
||||
label: _("_About Musicus");
|
||||
action: "app.about";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue