From ba08b0cce51b61efd01c1d9634cbab7c5ddea6c3 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Wed, 23 Apr 2025 10:38:47 -0500 Subject: [PATCH] gtk custom bell audio: optional -> required --- src/apprt/gtk/Surface.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index d756925b3..bcb78e087 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -2408,9 +2408,9 @@ pub fn ringBell(self: *Surface) !void { if (features.audio) audio: { // Play a user-specified audio file. - const pathname, const optional = switch (self.app.config.@"bell-audio-path" orelse break :audio) { - .optional => |path| .{ path, true }, - .required => |path| .{ path, false }, + const pathname, const required = switch (self.app.config.@"bell-audio-path" orelse break :audio) { + .optional => |path| .{ path, false }, + .required => |path| .{ path, true }, }; const volume = std.math.clamp(self.app.config.@"bell-audio-volume", 0.0, 1.0); @@ -2418,7 +2418,7 @@ pub fn ringBell(self: *Surface) !void { std.debug.assert(std.fs.path.isAbsolute(pathname)); const media_file = gtk.MediaFile.newForFilename(pathname); - if (!optional) { + if (required) { _ = gobject.Object.signals.notify.connect( media_file, ?*anyopaque,