@@ -174,21 +174,23 @@ public class Terminal.Application : Gtk.Application {
174174 return ;
175175 }
176176
177- var process_string = _(" Process completed" );
178- var process_icon = new ThemedIcon (" process-completed-symbolic" );
177+ var notification_title = _(" Process completed" );
178+ var notification_icon = new ThemedIcon (" process-completed-symbolic" );
179+ var tab_state = TerminalWidget . TabState . COMPLETED ;
179180 if (exit_status != 0 ) {
180- process_string = _(" Process exited with errors" );
181- process_icon = new ThemedIcon (" process-error-symbolic" );
181+ notification_title = _(" Process exited with errors" );
182+ notification_icon = new ThemedIcon (" process-error-symbolic" );
183+ tab_state = ERROR ;
182184 }
183185
184186 if (terminal != terminal. main_window. current_terminal) {
185- terminal. tab . icon = process_icon ;
187+ terminal. tab_state = tab_state ;
186188 }
187189
188190 if (! (get_active_window (). is_active)) {
189- var notification = new Notification (process_string );
191+ var notification = new Notification (notification_title );
190192 notification. set_body (process);
191- notification. set_icon (process_icon );
193+ notification. set_icon (notification_icon );
192194 notification. set_default_action_and_target_value (" app.process-finished" , new Variant .string (id));
193195 send_notification (" process-finished-%s " . printf (id), notification);
194196
@@ -215,7 +217,7 @@ public class Terminal.Application : Gtk.Application {
215217 return ;
216218 }
217219
218- terminal. tab . icon = null ;
220+ terminal. tab_state = NONE ;
219221 withdraw_notification (" process-finished-%s " . printf (id));
220222
221223 terminal. main_window. disconnect (tab_change_handler);
0 commit comments