mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-20 18:56:08 +03:00
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:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user