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.
This commit is contained in:
Jeffrey C. Ollie
2025-07-06 16:54:34 -05:00
parent 5219bc51e5
commit 28c7083876

View File

@ -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);