mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-27 02:56:28 +00:00
apprt/gtk-ng: new tab button
This commit is contained in:
@@ -616,6 +616,10 @@ pub const Window = extern struct {
|
||||
//---------------------------------------------------------------
|
||||
// Signal handlers
|
||||
|
||||
fn btnNewTab(_: *adw.SplitButton, self: *Window) callconv(.c) void {
|
||||
self.performBindingAction(.new_tab);
|
||||
}
|
||||
|
||||
fn windowCloseRequest(
|
||||
_: *gtk.Window,
|
||||
self: *Self,
|
||||
@@ -1087,6 +1091,7 @@ pub const Window = extern struct {
|
||||
class.bindTemplateChildPrivate("toast_overlay", .{});
|
||||
|
||||
// Template Callbacks
|
||||
class.bindTemplateCallback("new_tab", &btnNewTab);
|
||||
class.bindTemplateCallback("close_request", &windowCloseRequest);
|
||||
class.bindTemplateCallback("close_page", &tabViewClosePage);
|
||||
class.bindTemplateCallback("page_attached", &tabViewPageAttached);
|
||||
|
||||
@@ -35,6 +35,7 @@ template $GhosttyWindow: Adw.ApplicationWindow {
|
||||
|
||||
[start]
|
||||
Adw.SplitButton {
|
||||
clicked => $new_tab();
|
||||
icon-name: "tab-new-symbolic";
|
||||
tooltip-text: _("New Tab");
|
||||
dropdown-tooltip: _("New Split");
|
||||
|
||||
Reference in New Issue
Block a user