Create an interactive porting tool

`blueprint-compiler port` interactively ports a project to blueprint.
It will create the subproject wrap file, add it to .gitignore, decompile
your GtkBuilder XML files, emit code to copy and paste into your
meson.build file, and update POTFILES.in.

It can't quite handle all of the features the forward compiler can, so
it will skip those files.
This commit is contained in:
James Westman 2021-11-24 15:57:15 -06:00
parent 84dfe74755
commit 8e4433a487
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
19 changed files with 921 additions and 61 deletions

View file

@ -0,0 +1,12 @@
using Gtk 4.0;
Widget {
accessibility {
label: _("Hello, world!");
labelled_by: my_label;
checked: true;
}
}
Label my_label {
}

View file

@ -4,4 +4,5 @@ Scale {
adjustment: adj;
}
Adjustment adj {}
Adjustment adj {
}

View file

@ -0,0 +1,10 @@
using Gtk 4.0;
Grid {
Label {
layout {
column: "0";
row: "1";
}
}
}

View file

@ -25,4 +25,4 @@
</item>
</submenu>
</menu>
</interface>
</interface>

View file

@ -0,0 +1,31 @@
using Gtk 4.0;
menu {
label: _("menu label");
test-custom-attribute: "3.1415";
submenu {
section {
label: "test section";
}
item {
label: "test item";
}
item {
label: "test item shorthand 1";
}
item {
label: "test item shorthand 2";
action: "app.test-action";
}
item {
label: "test item shorthand 3";
action: "app.test-action";
icon: "test-symbolic";
}
}
}

View file

@ -0,0 +1,8 @@
using Gtk 4.0;
Label {
styles [
"class-1",
"class-2",
]
}

View file

@ -3,6 +3,7 @@ using Gtk 4.0;
Label {
label: _("Hello, world!");
}
Label {
label: C_("translation context", "Hello");
}

View file

@ -1,4 +1,5 @@
using Gtk 4.0;
using GObject 2.0;
GObject.Object {}
GObject.Object {
}