From 28c7083876353d4f584c2b3be0885baf8c4fd741 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sun, 6 Jul 2025 16:54:34 -0500 Subject: [PATCH] gtk show_child_edit: use different text for normal/abnormal exit Without this, the only indication would be the difference between a red or a green background which would be problematic for users with limited vision or color blindness. --- src/apprt/gtk/Surface.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index 5d835b4b3..14a1538ab 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -2512,7 +2512,11 @@ pub fn showChildExited(self: *Surface, info: apprt.surface.Message.ChildExited) warning_box.as(gtk.Widget).setHalign(.fill); warning_box.as(gtk.Widget).setValign(.end); - const warning_text = i18n._("⚠️ Process exited. Press any key to close the terminal."); + const warning_text = if (info.exit_code == 0) + i18n._("⚠️ Process exited normally. Press any key to close the terminal.") + else + i18n._("⚠️ Process exited abnormally. Press any key to close the terminal."); + const banner = adw.Banner.new(warning_text); banner.setRevealed(1);