apprt/gtk-ng: new window menu action

Not sure why I skipped this one, its super easy.
This commit is contained in:
Mitchell Hashimoto
2025-07-26 07:29:12 -07:00
parent c24aa0e9be
commit fd1db0c8e6

View File

@ -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,