Skip to content

Commit

Permalink
ui: Begin blueprint port
Browse files Browse the repository at this point in the history
  • Loading branch information
mufeedali committed Nov 1, 2023
1 parent 08db1cf commit 3e9b126
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,5 @@ dmypy.json

# Pyre type checker
.pyre/

/subprojects/blueprint-compiler
15 changes: 14 additions & 1 deletion build-aux/flatpak/dev.mufeed.Wordbook.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,25 @@
"--socket=wayland"
],
"cleanup": [
"*blueprint*",
"*.a",
"*.la",
"/lib/pkgconfig",
"/include"
],
"modules": [
{
"name": "blueprint-compiler",
"buildsystem": "meson",
"cleanup": ["*"],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
"tag": "v0.10.0"
}
]
},
{
"name": "pcaudiolib",
"sources": [
Expand Down Expand Up @@ -100,4 +113,4 @@
]
}
]
}
}
9 changes: 9 additions & 0 deletions data/resources/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
blueprints = custom_target('blueprints',
input: files(
'ui/shortcuts_window.blp',
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
)

resources = gnome.compile_resources(
'resources',
'resources.gresource.xml',
dependencies: blueprints,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
Expand Down
39 changes: 39 additions & 0 deletions data/resources/ui/shortcuts_window.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Gtk 4.0;

ShortcutsWindow help_overlay {
modal: true;

ShortcutsSection {
section-name: 'shortcuts';
max-height: 10;

ShortcutsGroup {
title: C_('shortcut window', 'General');

ShortcutsShortcut {
title: C_('shortcut window', 'Show Shortcuts');
action-name: 'win.show-help-overlay';
}

ShortcutsShortcut {
title: C_('shortcut window', 'Preferences');
action-name: 'win.preferences';
}

ShortcutsShortcut {
title: C_('shortcut window', 'Paste and Search');
action-name: 'win.paste-search';
}

ShortcutsShortcut {
title: C_('shortcut window', 'Random Word');
action-name: 'win.random-word';
}

ShortcutsShortcut {
title: C_('shortcut window', 'Search Selected Text');
action-name: 'win.search-selected';
}
}
}
}
48 changes: 0 additions & 48 deletions data/resources/ui/shortcuts_window.ui

This file was deleted.

8 changes: 8 additions & 0 deletions subprojects/blueprint-compiler.wrap
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3e9b126

Please sign in to comment.