diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f8c9ff8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target +/subprojects/blueprint-compiler diff --git a/src/meson.build b/src/meson.build index 5cd93cd..71ba490 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,11 +1,20 @@ pkgdatadir = 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('boostcontroller', 'boostcontroller.gresource.xml', gresource_bundle: true, install: true, install_dir: pkgdatadir, + dependencies: blueprints, ) conf = configuration_data() diff --git a/src/window.blp b/src/window.blp new file mode 100644 index 0000000..ad2cb5a --- /dev/null +++ b/src/window.blp @@ -0,0 +1,33 @@ +using Gtk 4.0; +using Adw 1; + +template BoostcontrollerWindow : Adw.ApplicationWindow { + default-width: 600; + default-height: 300; + title: _("Boost Controller"); + + Adw.ToolbarView { + [top] + Adw.HeaderBar { + [end] + MenuButton button_menu { + menu-model: menu_app; + icon-name: "open-menu-symbolic"; + primary: true; + } + } + + content: Label label { + label: "Yay, blueprint is setup!"; + }; + } +} + +menu menu_app { + section { + item { + label: _("About My App"); + action: "app.about"; + } + } +} diff --git a/src/window.ui b/src/window.ui deleted file mode 100644 index c63d2ab..0000000 --- a/src/window.ui +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - -
- - _Keyboard Shortcuts - win.show-help-overlay - - - _About Boostcontroller - app.about - -
-
-
diff --git a/subprojects/blueprint-compiler.wrap b/subprojects/blueprint-compiler.wrap new file mode 100644 index 0000000..5c978d6 --- /dev/null +++ b/subprojects/blueprint-compiler.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory = blueprint-compiler +url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git +revision = main +depth = 1 + +[provide] +program_names = blueprint-compiler