mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-22 19:56:08 +03:00
gtk: GtkBox not needed for show_child_exited
This commit is contained in:
@ -2507,11 +2507,6 @@ fn gtkStreamEnded(media_file: *gtk.MediaFile, _: *gobject.ParamSpec, _: ?*anyopa
|
|||||||
pub fn showChildExited(self: *Surface, info: apprt.surface.Message.ChildExited) error{}!bool {
|
pub fn showChildExited(self: *Surface, info: apprt.surface.Message.ChildExited) error{}!bool {
|
||||||
if (!adw_version.supportsBanner()) return false;
|
if (!adw_version.supportsBanner()) return false;
|
||||||
|
|
||||||
const warning_box = gtk.Box.new(.vertical, 0);
|
|
||||||
|
|
||||||
warning_box.as(gtk.Widget).setHalign(.fill);
|
|
||||||
warning_box.as(gtk.Widget).setValign(.end);
|
|
||||||
|
|
||||||
const warning_text = if (info.exit_code == 0)
|
const warning_text = if (info.exit_code == 0)
|
||||||
i18n._("Process exited normally. Press any key to close the terminal.")
|
i18n._("Process exited normally. Press any key to close the terminal.")
|
||||||
else
|
else
|
||||||
@ -2521,15 +2516,15 @@ pub fn showChildExited(self: *Surface, info: apprt.surface.Message.ChildExited)
|
|||||||
banner.setRevealed(1);
|
banner.setRevealed(1);
|
||||||
|
|
||||||
const banner_widget = banner.as(gtk.Widget);
|
const banner_widget = banner.as(gtk.Widget);
|
||||||
|
banner_widget.setHalign(.fill);
|
||||||
|
banner_widget.setValign(.end);
|
||||||
|
|
||||||
if (info.exit_code == 0)
|
if (info.exit_code == 0)
|
||||||
banner_widget.addCssClass("child_exited_normally")
|
banner_widget.addCssClass("child_exited_normally")
|
||||||
else
|
else
|
||||||
banner_widget.addCssClass("child_exited_abnormally");
|
banner_widget.addCssClass("child_exited_abnormally");
|
||||||
|
|
||||||
warning_box.append(banner_widget);
|
self.overlay.addOverlay(banner_widget);
|
||||||
|
|
||||||
self.overlay.addOverlay(warning_box.as(gtk.Widget));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user