mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
apprt/gtk-ng: new tab button
This commit is contained in:
@ -616,6 +616,10 @@ pub const Window = extern struct {
|
|||||||
//---------------------------------------------------------------
|
//---------------------------------------------------------------
|
||||||
// Signal handlers
|
// Signal handlers
|
||||||
|
|
||||||
|
fn btnNewTab(_: *adw.SplitButton, self: *Window) callconv(.c) void {
|
||||||
|
self.performBindingAction(.new_tab);
|
||||||
|
}
|
||||||
|
|
||||||
fn windowCloseRequest(
|
fn windowCloseRequest(
|
||||||
_: *gtk.Window,
|
_: *gtk.Window,
|
||||||
self: *Self,
|
self: *Self,
|
||||||
@ -1087,6 +1091,7 @@ pub const Window = extern struct {
|
|||||||
class.bindTemplateChildPrivate("toast_overlay", .{});
|
class.bindTemplateChildPrivate("toast_overlay", .{});
|
||||||
|
|
||||||
// Template Callbacks
|
// Template Callbacks
|
||||||
|
class.bindTemplateCallback("new_tab", &btnNewTab);
|
||||||
class.bindTemplateCallback("close_request", &windowCloseRequest);
|
class.bindTemplateCallback("close_request", &windowCloseRequest);
|
||||||
class.bindTemplateCallback("close_page", &tabViewClosePage);
|
class.bindTemplateCallback("close_page", &tabViewClosePage);
|
||||||
class.bindTemplateCallback("page_attached", &tabViewPageAttached);
|
class.bindTemplateCallback("page_attached", &tabViewPageAttached);
|
||||||
|
@ -35,6 +35,7 @@ template $GhosttyWindow: Adw.ApplicationWindow {
|
|||||||
|
|
||||||
[start]
|
[start]
|
||||||
Adw.SplitButton {
|
Adw.SplitButton {
|
||||||
|
clicked => $new_tab();
|
||||||
icon-name: "tab-new-symbolic";
|
icon-name: "tab-new-symbolic";
|
||||||
tooltip-text: _("New Tab");
|
tooltip-text: _("New Tab");
|
||||||
dropdown-tooltip: _("New Split");
|
dropdown-tooltip: _("New Split");
|
||||||
|
@ -146,8 +146,8 @@
|
|||||||
GDK GLArea
|
GDK GLArea
|
||||||
Memcheck:Leak
|
Memcheck:Leak
|
||||||
match-leak-kinds: possible
|
match-leak-kinds: possible
|
||||||
fun:malloc
|
fun:*alloc
|
||||||
fun:g_malloc
|
...
|
||||||
fun:gdk_memory_texture_from_texture
|
fun:gdk_memory_texture_from_texture
|
||||||
fun:gdk_gl_texture_release
|
fun:gdk_gl_texture_release
|
||||||
fun:delete_one_texture
|
fun:delete_one_texture
|
||||||
|
Reference in New Issue
Block a user