mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
Revert "apprt/gtk: add menu button for opening scrollback file"
This reverts commit 44dda62d68620937aa6de01ff0097df0b4ff9696.
This commit is contained in:
@ -358,7 +358,6 @@ fn syncActionAccelerators(self: *App) !void {
|
|||||||
try self.syncActionAccelerator("app.quit", .{ .quit = {} });
|
try self.syncActionAccelerator("app.quit", .{ .quit = {} });
|
||||||
try self.syncActionAccelerator("app.open_config", .{ .open_config = {} });
|
try self.syncActionAccelerator("app.open_config", .{ .open_config = {} });
|
||||||
try self.syncActionAccelerator("app.reload_config", .{ .reload_config = {} });
|
try self.syncActionAccelerator("app.reload_config", .{ .reload_config = {} });
|
||||||
try self.syncActionAccelerator("win.open_scrollback", .{ .write_scrollback_file = .open });
|
|
||||||
try self.syncActionAccelerator("win.toggle_inspector", .{ .inspector = .toggle });
|
try self.syncActionAccelerator("win.toggle_inspector", .{ .inspector = .toggle });
|
||||||
try self.syncActionAccelerator("win.close", .{ .close_surface = {} });
|
try self.syncActionAccelerator("win.close", .{ .close_surface = {} });
|
||||||
try self.syncActionAccelerator("win.new_window", .{ .new_window = {} });
|
try self.syncActionAccelerator("win.new_window", .{ .new_window = {} });
|
||||||
@ -773,7 +772,6 @@ fn initMenu(self: *App) void {
|
|||||||
defer c.g_object_unref(section);
|
defer c.g_object_unref(section);
|
||||||
c.g_menu_append_section(menu, null, @ptrCast(@alignCast(section)));
|
c.g_menu_append_section(menu, null, @ptrCast(@alignCast(section)));
|
||||||
c.g_menu_append(section, "Terminal Inspector", "win.toggle_inspector");
|
c.g_menu_append(section, "Terminal Inspector", "win.toggle_inspector");
|
||||||
c.g_menu_append(section, "Open Scrollback", "win.open_scrollback");
|
|
||||||
c.g_menu_append(section, "Open Configuration", "app.open_config");
|
c.g_menu_append(section, "Open Configuration", "app.open_config");
|
||||||
c.g_menu_append(section, "Reload Configuration", "app.reload_config");
|
c.g_menu_append(section, "Reload Configuration", "app.reload_config");
|
||||||
c.g_menu_append(section, "About Ghostty", "win.about");
|
c.g_menu_append(section, "About Ghostty", "win.about");
|
||||||
|
@ -173,7 +173,6 @@ fn initActions(self: *Window) void {
|
|||||||
.{ "split_right", >kActionSplitRight },
|
.{ "split_right", >kActionSplitRight },
|
||||||
.{ "split_down", >kActionSplitDown },
|
.{ "split_down", >kActionSplitDown },
|
||||||
.{ "toggle_inspector", >kActionToggleInspector },
|
.{ "toggle_inspector", >kActionToggleInspector },
|
||||||
.{ "open_scrollback", >kActionOpenScrollback },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline for (actions) |entry| {
|
inline for (actions) |entry| {
|
||||||
@ -581,19 +580,6 @@ fn gtkActionToggleInspector(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn gtkActionOpenScrollback(
|
|
||||||
_: *c.GSimpleAction,
|
|
||||||
_: *c.GVariant,
|
|
||||||
ud: ?*anyopaque,
|
|
||||||
) callconv(.C) void {
|
|
||||||
const self: *Window = @ptrCast(@alignCast(ud orelse return));
|
|
||||||
const surface = self.actionSurface() orelse return;
|
|
||||||
_ = surface.performBindingAction(.{ .write_scrollback_file = .open }) catch |err| {
|
|
||||||
log.warn("error performing binding action error={}", .{err});
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the surface to use for an action.
|
/// Returns the surface to use for an action.
|
||||||
fn actionSurface(self: *Window) ?*CoreSurface {
|
fn actionSurface(self: *Window) ?*CoreSurface {
|
||||||
const page_idx = c.gtk_notebook_get_current_page(self.notebook);
|
const page_idx = c.gtk_notebook_get_current_page(self.notebook);
|
||||||
|
Reference in New Issue
Block a user