summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Westman <james@jwestman.net>2023-05-16 14:30:14 -0500
committerJames Westman <james@jwestman.net>2023-08-31 11:50:38 -0500
commit8c9f2d95a8d6b625b8e348451f52eb237872024f (patch)
tree1a2373fee5b868443d201ee85b8ed532164b15ad
parentb05d7a1bb7b62fcb1ba4b8baaa000774aa780636 (diff)
Add mimetype for Blueprint source code
See https://gitlab.gnome.org/jwestman/blueprint-compiler/
-rw-r--r--data/freedesktop.org.xml.in5
-rw-r--r--tests/mime-detection/blueprint.blp14
-rw-r--r--tests/mime-detection/list3
3 files changed, 22 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 780fa10..6353724 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -6268,6 +6268,11 @@ command to generate the output files.
</magic>
<glob pattern="*.bib"/>
</mime-type>
+ <mime-type type="text/x-blueprint">
+ <comment>Blueprint source code</comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.blp"/>
+ </mime-type>
<mime-type type="text/x-c++hdr">
<comment>C++ header</comment>
<sub-class-of type="text/x-chdr"/>
diff --git a/tests/mime-detection/blueprint.blp b/tests/mime-detection/blueprint.blp
new file mode 100644
index 0000000..88e7ca9
--- /dev/null
+++ b/tests/mime-detection/blueprint.blp
@@ -0,0 +1,14 @@
+using Gtk 4.0;
+using Adw 1;
+
+Box {
+ Label label {
+ label: "Hello, World!";
+ margin-top: 12;
+ visible: bind button.visible;
+ }
+
+ Button button {
+ clicked => $on_button_clicked() swapped;
+ }
+}
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 5386068..95eef7a 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -959,3 +959,6 @@ nuscript.nu application/x-nuscript
# Perf Data file
perf.data application/x-perf-data
+
+# Blueprint (https://gitlab.gnome.org/jwestman/blueprint-compiler)
+blueprint.blp text/x-blueprint ox