gtk: cast to application window

This commit is contained in:
Jeffrey C. Ollie
2025-02-25 08:19:52 -06:00
parent d284146621
commit 3d08b1c4aa

View File

@ -482,8 +482,8 @@ fn toggleCssClass(
/// here. The string name binds them.
fn initActions(self: *Window) void {
// FIXME: when rest of file is converted to gobject
const window: *gtk.Window = @ptrCast(@alignCast(self.window));
const action_map = gobject.ext.cast(gio.ActionMap, window).?;
const window: *gtk.ApplicationWindow = @ptrCast(@alignCast(self.window));
const action_map = window.as(gio.ActionMap);
const actions = .{
.{ "about", gtkActionAbout },
.{ "close", gtkActionClose },