apprt/gtk: some stylistic changes

This commit is contained in:
Mitchell Hashimoto
2025-02-11 16:52:25 -08:00
parent cbf562ecb3
commit 927cb4e622

View File

@ -560,9 +560,14 @@ pub fn performAction(
.render_inspector, .render_inspector,
.renderer_health, .renderer_health,
.color_change, .color_change,
=> log.warn("unimplemented action={}", .{action}), => {
log.warn("unimplemented action={}", .{action});
return false;
},
} }
// We can assume it was handled because all unknown/unimplemented actions
// are caught above.
return true; return true;
} }
@ -602,9 +607,7 @@ fn closeTab(_: *App, target: apprt.Target) !void {
fn gotoTab(_: *App, target: apprt.Target, tab: apprt.action.GotoTab) bool { fn gotoTab(_: *App, target: apprt.Target, tab: apprt.action.GotoTab) bool {
switch (target) { switch (target) {
.app => { .app => return false,
return false;
},
.surface => |v| { .surface => |v| {
const window = v.rt_surface.container.window() orelse { const window = v.rt_surface.container.window() orelse {
log.info( log.info(
@ -675,9 +678,7 @@ fn gotoSplit(
direction: apprt.action.GotoSplit, direction: apprt.action.GotoSplit,
) bool { ) bool {
switch (target) { switch (target) {
.app => { .app => return false,
return false;
},
.surface => |v| { .surface => |v| {
const s = v.rt_surface.container.split() orelse return false; const s = v.rt_surface.container.split() orelse return false;
const map = s.directionMap(switch (v.rt_surface.container) { const map = s.directionMap(switch (v.rt_surface.container) {