|
|
|
@ -46,9 +46,10 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
|
|
|
|
vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
|
|
|
|
vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
|
|
|
|
VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
|
|
|
|
VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
|
|
|
|
vte_terminal_set_pty(VTE_TERMINAL(terminal),pty);
|
|
|
|
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;exit 0; exit 0","\n",NULL);
|
|
|
|
char *install_command=yon_char_unite("tput reset; tput cup 0 0; tput ed; ",command,"; STATUS=$?; stty -echo; unset PS1; exit ${STATUS}","\n",NULL);
|
|
|
|
if(endwork_function)
|
|
|
|
if(endwork_function)
|
|
|
|
g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument);
|
|
|
|
g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument);
|
|
|
|
|
|
|
|
printf("%s\n",install_command);
|
|
|
|
vte_terminal_spawn_async(VTE_TERMINAL(terminal),
|
|
|
|
vte_terminal_spawn_async(VTE_TERMINAL(terminal),
|
|
|
|
VTE_PTY_DEFAULT,
|
|
|
|
VTE_PTY_DEFAULT,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
@ -203,6 +204,13 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
|
|
|
|
val-=2;
|
|
|
|
val-=2;
|
|
|
|
if (val<lower) val=lower;
|
|
|
|
if (val<lower) val=lower;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GDK_SCROLL_SMOOTH:{
|
|
|
|
|
|
|
|
gdouble y;
|
|
|
|
|
|
|
|
gdk_event_get_scroll_deltas((GdkEvent*)event,NULL,&y);
|
|
|
|
|
|
|
|
val +=y;
|
|
|
|
|
|
|
|
if (val<lower) val=lower;
|
|
|
|
|
|
|
|
if (val>upper) val=upper;
|
|
|
|
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gtk_adjustment_set_value(adjustment,val);
|
|
|
|
gtk_adjustment_set_value(adjustment,val);
|
|
|
|
|