Commit 7fcca8d3 authored by Roman Alifanov's avatar Roman Alifanov

switching to blueprints

parent 9fad8533
......@@ -2,8 +2,17 @@ pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name()
moduledir = pkgdatadir / 'tuneit'
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('tuneit',
'tuneit.gresource.xml',
dependencies: blueprints,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
......
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<!DOCTYPE cambalache-project SYSTEM "cambalache-project.dtd">
<cambalache-project version="0.94.0" target_tk="gtk-4.0">
<ui>
(1,1,"window.ui","window..ui",None,None,None,None,None,None,None)
</ui>
<ui_library>
(1,"Adw","1.0",None),
(1,"gio","2.0",None),
(1,"gtk","4.0",None),
(1,"libadwaita","1.6",None)
</ui_library>
<object>
(1,1,"AdwApplicationWindow","TuneitWindow",None,None,None,None,0,None,None),
(1,2,"AdwToolbarView",None,1,None,None,None,0,None,None),
(1,3,"AdwHeaderBar",None,2,None,"top",None,0,None,None),
(1,4,"GtkMenuButton",None,3,None,"end",None,0,None,None),
(1,5,"AdwViewSwitcher",None,3,None,"title",None,1,None,None),
(1,6,"AdwViewStack","main_stack",2,None,None,None,1,None,None),
(1,7,"AdwViewStackPage",None,6,None,None,None,0,None,None),
(1,8,"GtkBox",None,7,None,None,None,0,None,None),
(1,9,"AdwNavigationSplitView",None,8,None,None,None,0,None,None),
(1,10,"AdwNavigationPage",None,9,None,None,None,0,None,None),
(1,11,"GtkStack","main_pagestack",10,None,None,None,0,None,None),
(1,12,"AdwNavigationPage",None,9,None,None,None,1,None,None),
(1,13,"AdwClampScrollable",None,12,None,None,None,0,None,None),
(1,14,"GtkStackSidebar",None,13,None,None,None,0,None,None),
(1,15,"(menu)","primary_menu",None,None,None,None,1,None,None),
(1,16,"(section)",None,15,None,None,None,0,None,None),
(1,17,"(item)",None,16,None,None,None,0,None,None),
(1,18,"(item)",None,16,None,None,None,1,None,None),
(1,19,"(item)",None,16,None,None,None,2,None,None)
</object>
<object_property>
(1,1,"AdwApplicationWindow","content",None,0,None,None,None,2,None,None,None,None),
(1,1,"GtkWindow","default-height","600",0,None,None,None,None,None,None,None,None),
(1,1,"GtkWindow","default-width","800",0,None,None,None,None,None,None,None,None),
(1,1,"GtkWindow","title","TuneIt",1,None,None,None,None,None,None,None,None),
(1,4,"GtkMenuButton","icon-name","open-menu-symbolic",0,None,None,None,None,None,None,None,None),
(1,4,"GtkMenuButton","menu-model","15",0,None,None,None,None,None,None,None,None),
(1,4,"GtkMenuButton","primary","True",0,None,None,None,None,None,None,None,None),
(1,4,"GtkWidget","tooltip-text","Main Menu",1,None,None,None,None,None,None,None,None),
(1,5,"AdwViewSwitcher","policy","wide",0,None,None,None,None,None,None,None,None),
(1,5,"AdwViewSwitcher","stack","6",0,None,None,None,None,None,None,None,None),
(1,7,"AdwViewStackPage","child",None,0,None,None,None,8,None,None,None,None),
(1,7,"AdwViewStackPage","icon-name","preferences-system",0,None,None,None,None,None,None,None,None),
(1,7,"AdwViewStackPage","name","main",0,None,None,None,None,None,None,None,None),
(1,7,"AdwViewStackPage","title","main",0,None,None,None,None,None,None,None,None),
(1,9,"AdwNavigationSplitView","content",None,0,None,None,None,10,None,None,None,None),
(1,9,"AdwNavigationSplitView","sidebar",None,0,None,None,None,12,None,None,None,None),
(1,9,"GtkWidget","hexpand","True",0,None,None,None,None,None,None,None,None),
(1,10,"AdwNavigationPage","title","content page",None,None,None,None,None,None,None,None,None),
(1,12,"AdwNavigationPage","title","sidebar page",None,None,None,None,None,None,None,None,None),
(1,13,"GtkWidget","margin-bottom","8",0,None,None,None,None,None,None,None,None),
(1,13,"GtkWidget","margin-end","8",0,None,None,None,None,None,None,None,None),
(1,13,"GtkWidget","margin-start","8",0,None,None,None,None,None,None,None,None),
(1,13,"GtkWidget","margin-top","8",0,None,None,None,None,None,None,None,None),
(1,14,"GtkStackSidebar","stack","11",0,None,None,None,None,None,None,None,None),
(1,17,"(item)","action","app.preferences",0,None,None,None,None,None,None,None,None),
(1,17,"(item)","label","_Preferences",1,None,None,None,None,None,None,None,None),
(1,18,"(item)","action","win.show-help-overlay",0,None,None,None,None,None,None,None,None),
(1,18,"(item)","label","_Keyboard Shortcuts",1,None,None,None,None,None,None,None,None),
(1,19,"(item)","action","app.about",0,None,None,None,None,None,None,None,None),
(1,19,"(item)","label","_About TuneIt",1,None,None,None,None,None,None,None,None)
</object_property>
</cambalache-project>
<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.94.1 -->
<interface>
<!-- interface-name window.ui -->
<requires lib="Adw" version="1.0"/>
<requires lib="gio" version="2.0"/>
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="1.6"/>
<template class="TuneitWindow" parent="AdwApplicationWindow">
<property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<child type="end">
<object class="GtkMenuButton">
<property name="icon-name">open-menu-symbolic</property>
<property name="menu-model">primary_menu</property>
<property name="primary">True</property>
<property name="tooltip-text" translatable="yes">Main Menu</property>
</object>
</child>
<child type="title">
<object class="AdwViewSwitcher">
<property name="policy">wide</property>
<property name="stack">main_stack</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwViewStack" id="main_stack">
<child>
<object class="AdwViewStackPage">
<property name="child">
<object class="GtkBox">
<child>
<object class="AdwNavigationSplitView">
<property name="content">
<object class="AdwNavigationPage">
<property name="title">content page</property>
<child>
<object class="GtkStack" id="main_pagestack"/>
</child>
</object>
</property>
<property name="hexpand">True</property>
<property name="sidebar">
<object class="AdwNavigationPage">
<property name="title">sidebar page</property>
<child>
<object class="AdwClampScrollable">
<property name="margin-bottom">8</property>
<property name="margin-end">8</property>
<property name="margin-start">8</property>
<property name="margin-top">8</property>
<child>
<object class="GtkStackSidebar">
<property name="stack">main_pagestack</property>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</child>
</object>
</property>
<property name="icon-name">preferences-system</property>
<property name="name">main</property>
<property name="title">main</property>
</object>
</child>
</object>
</child>
</object>
</property>
<property name="default-height">600</property>
<property name="default-width">800</property>
<property name="title" translatable="yes">TuneIt</property>
</template>
<menu id="primary_menu">
<section>
<item>
<attribute name="action">app.preferences</attribute>
<attribute name="label" translatable="yes">_Preferences</attribute>
</item>
<item>
<attribute name="action">win.show-help-overlay</attribute>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
</item>
<item>
<attribute name="action">app.about</attribute>
<attribute name="label" translatable="yes">_About TuneIt</attribute>
</item>
</section>
</menu>
</interface>
using Gtk 4.0;
using Adw 1;
template $TuneitWindow: Adw.ApplicationWindow {
content: Adw.ToolbarView {
[top]
Adw.HeaderBar {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
primary: true;
tooltip-text: _("Main Menu");
}
[title]
Adw.ViewSwitcher {
policy: wide;
stack: main_stack;
}
}
Adw.ViewStack main_stack {
Adw.ViewStackPage {
child: Box {
Adw.NavigationSplitView {
content: Adw.NavigationPage {
Stack main_pagestack {}
};
hexpand: true;
sidebar: Adw.NavigationPage {
Adw.ClampScrollable {
margin-bottom: 8;
margin-end: 8;
margin-start: 8;
margin-top: 8;
StackSidebar {
stack: main_pagestack;
}
}
};
}
};
icon-name: "preferences-system";
name: "main";
title: "main";
}
}
};
default-height: 600;
default-width: 800;
title: _("TuneIt");
}
menu primary_menu {
section {
item {
action: "app.preferences";
label: _("_Preferences");
}
item {
action: "win.show-help-overlay";
label: _("_Keyboard Shortcuts");
}
item {
action: "app.about";
label: _("_About TuneIt");
}
}
}
......@@ -20,6 +20,7 @@ BuildRequires(pre): rpm-build-python3
BuildRequires(pre): rpm-build-gir
BuildRequires: libadwaita-gir-devel
BuildRequires: blueprint-compiler
BuildRequires: meson
%add_python3_path %_datadir/%name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment