Add ability to set boot layout.
This commit is contained in:
@@ -9,6 +9,7 @@ const std = @import("std");
|
||||
const adw = @import("adw");
|
||||
const gio = @import("gio");
|
||||
|
||||
const Settings = @import("Settings.zig");
|
||||
const Window = @import("Window.zig");
|
||||
const appearance = @import("appearance.zig");
|
||||
|
||||
@@ -23,6 +24,10 @@ var gpa: std.heap.DebugAllocator(.{}) = .init;
|
||||
pub fn main() u8 {
|
||||
defer _ = gpa.deinit();
|
||||
|
||||
// Before the allocator's own teardown, since the settings arena comes out
|
||||
// of it. A no-op if the app never got as far as activating.
|
||||
defer Settings.deinit();
|
||||
|
||||
// Non-unique so every launch is its own process. The default GApplication
|
||||
// behavior hands off to an already-running instance over D-Bus, which for
|
||||
// a terminal means a second launch silently does nothing visible here and
|
||||
@@ -37,6 +42,10 @@ pub fn main() u8 {
|
||||
}
|
||||
|
||||
fn onActivate(app: *adw.Application, _: ?*anyopaque) callconv(.c) void {
|
||||
// The file both of the next two read from: the scheme, and the tabs the
|
||||
// window opens itself with.
|
||||
Settings.init(gpa.allocator());
|
||||
|
||||
// Before the window, so that the first frame is drawn in the scheme the
|
||||
// user chose rather than repainted into it a moment later.
|
||||
appearance.init();
|
||||
|
||||
Reference in New Issue
Block a user