mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-05 19:08:17 +00:00
gtk-ng: add TODOs about passing surface that toggled command palette
This commit is contained in:

committed by
Mitchell Hashimoto

parent
8af1230228
commit
3221421a74
@@ -551,6 +551,7 @@ pub const Surface = extern struct {
|
||||
}
|
||||
|
||||
pub fn toggleCommandPalette(self: *Self) bool {
|
||||
// TODO: pass the surface with the action
|
||||
return self.as(gtk.Widget).activateAction("win.toggle-command-palette", null) != 0;
|
||||
}
|
||||
|
||||
|
@@ -343,6 +343,7 @@ pub const Window = extern struct {
|
||||
.{ "paste", actionPaste, null },
|
||||
.{ "reset", actionReset, null },
|
||||
.{ "clear", actionClear, null },
|
||||
// TODO: accept the surface that toggled the command palette
|
||||
.{ "toggle-command-palette", actionToggleCommandPalette, null },
|
||||
};
|
||||
|
||||
@@ -1703,6 +1704,8 @@ pub const Window = extern struct {
|
||||
}
|
||||
|
||||
/// Toggle the command palette.
|
||||
///
|
||||
/// TODO: accept the surface that toggled the command palette as a parameter
|
||||
fn toggleCommandPalette(self: *Window) void {
|
||||
const priv = self.private();
|
||||
// Get a reference to a command palette. First check the weak reference
|
||||
@@ -1756,6 +1759,8 @@ pub const Window = extern struct {
|
||||
_: ?*glib.Variant,
|
||||
self: *Window,
|
||||
) callconv(.c) void {
|
||||
// TODO: accept the surface that toggled the command palette as a
|
||||
// parameter
|
||||
self.toggleCommandPalette();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user