[msitools: 8/11] wixl: load default user interface files when extension enabled
- From: Marc-André Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [msitools: 8/11] wixl: load default user interface files when extension enabled
- Date: Mon, 20 Sep 2021 08:48:08 +0000 (UTC)
commit a0a0d2cd58c259afd7cee69418b31a08570d9d53
Author: Brendon Jones <brendon jones gmail com>
Date: Sun Sep 19 23:36:01 2021 +1200
wixl: load default user interface files when extension enabled
tools/wixl/builder.vala | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
---
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index 83697f0..f9dbc86 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -19,6 +19,19 @@ namespace Wixl {
return enum_from_string<Extension> (s);
}
+ public string[] get_files () {
+ switch (this) {
+ case UI:
+ // these files are assumed to be available and aren't
+ // explicitly loaded by any of the other UI files
+ return new string[] {
+ "CancelDlg",
+ "Common",
+ };
+ default: return new string[] {};
+ };
+ }
+
public string get_dir () {
switch (this) {
case UI: return "ui";
@@ -47,6 +60,17 @@ namespace Wixl {
if (extensions.length > 0) {
add_path (File.new_for_path (extdir).get_path ());
}
+
+ foreach (var ext in this.extensions) {
+ try {
+ foreach (var file in ext.get_files ()) {
+ load_extension_file(ext, file);
+ }
+ } catch (GLib.Error error) {
+ printerr (error.message + "\n");
+ Posix.exit (1);
+ }
+ }
}
WixRoot root;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]