gtk: use simpler method for passing overrides around

As discussed in Discord, this commit drops the `ConfigOverride` object
in favor of a simpler method of passing the overrides around. Completely
avoiding changes to the core wasn't possible but it's very minimal now.
This commit is contained in:
Jeffrey C. Ollie
2026-03-04 00:00:03 -06:00
parent f2ce7c348e
commit 002a6cc765
17 changed files with 300 additions and 432 deletions

View File

@@ -165,6 +165,16 @@ pub const Command = union(enum) {
};
}
pub fn deinit(self: *const Self, alloc: Allocator) void {
switch (self.*) {
.shell => |v| alloc.free(v),
.direct => |l| {
for (l) |v| alloc.free(v);
alloc.free(l);
},
}
}
pub fn formatEntry(self: Self, formatter: formatterpkg.EntryFormatter) !void {
switch (self) {
.shell => |v| try formatter.formatEntry([]const u8, v),