From 2868c2460e024de0826aa63d15a221c287e6fbc0 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 22 Nov 2024 17:37:12 +0600 Subject: [PATCH] Fixed exiting after bash terminal end of work --- source/libublsettings-gtk3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/libublsettings-gtk3.c b/source/libublsettings-gtk3.c index d5e424f..5a8bb57 100644 --- a/source/libublsettings-gtk3.c +++ b/source/libublsettings-gtk3.c @@ -53,7 +53,7 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi vte_terminal_set_size(VTE_TERMINAL(terminal),10,15); VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL); vte_terminal_set_pty(VTE_TERMINAL(terminal),pty); - char *install_command=yon_char_unite("clear;tput cup 0 0 && tput ed && ",command," ; stty -echo; unset PS1","\n",NULL); + char *install_command=yon_char_unite("clear;tput cup 0 0 && tput ed && ",command," ; stty -echo; unset PS1;exit 0","\n",NULL); if(endwork_function) g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument); vte_terminal_spawn_async(VTE_TERMINAL(terminal), @@ -86,8 +86,9 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi } - void __on_yon_terminal_done(GtkWidget *self, void *, GtkWidget *status_box){ - yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(status_box),"terminal_done","",BACKGROUND_IMAGE_SUCCESS_TYPE); + void __on_yon_terminal_done(GtkWidget *, int state, GtkWidget *status_box){ + if (state) yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(status_box),"terminal_done","",BACKGROUND_IMAGE_SUCCESS_TYPE); + else yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(status_box),"terminal_done","",BACKGROUND_IMAGE_FAIL_TYPE); } void yon_terminal_window_launch(GtkWindow *parent_window, char *command){