From fd1db0c8e60c3fb35b1d52c827b27c5e2689a718 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 26 Jul 2025 07:29:12 -0700 Subject: [PATCH] apprt/gtk-ng: new window menu action Not sure why I skipped this one, its super easy. --- src/apprt/gtk-ng/class/window.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/apprt/gtk-ng/class/window.zig b/src/apprt/gtk-ng/class/window.zig index 5e036b170..875fad9b6 100644 --- a/src/apprt/gtk-ng/class/window.zig +++ b/src/apprt/gtk-ng/class/window.zig @@ -178,6 +178,7 @@ pub const Window = extern struct { const actions = .{ .{ "about", actionAbout, null }, .{ "close", actionClose, null }, + .{ "new-window", actionNewWindow, null }, .{ "copy", actionCopy, null }, .{ "paste", actionPaste, null }, .{ "reset", actionReset, null }, @@ -468,6 +469,14 @@ pub const Window = extern struct { self.as(gtk.Window).close(); } + fn actionNewWindow( + _: *gio.SimpleAction, + _: ?*glib.Variant, + self: *Window, + ) callconv(.c) void { + self.performBindingAction(.new_window); + } + fn actionCopy( _: *gio.SimpleAction, _: ?*glib.Variant,