Fixed freeze; changed gap fix parameters section

pull/97/head
Ivan Dmitrievich Yartsev 10 months ago
parent 1898a5c5cf
commit 8654e81918

@ -36,7 +36,7 @@ void on_terminal_destroy(GtkWidget *, main_window *widgets){
} }
gboolean on_command_execute_success(GtkWidget *,gint status,main_window *){ gboolean on_command_execute_success(GtkWidget *self,gint status,main_window *){
g_mutex_lock(&main_config.progress_mutex); g_mutex_lock(&main_config.progress_mutex);
main_config.progress_active=0; main_config.progress_active=0;
@ -47,6 +47,7 @@ gboolean on_command_execute_success(GtkWidget *,gint status,main_window *){
yon_ubl_status_box_render(yon_char_get_localised_from_lib(FAIL_LABEL),BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_render(yon_char_get_localised_from_lib(FAIL_LABEL),BACKGROUND_IMAGE_FAIL_TYPE);
} }
on_terminal_done(self,0,NULL);
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
@ -73,14 +74,14 @@ gboolean on_terminal_check_progress(main_window *widgets){
percentage = atof(last_match); percentage = atof(last_match);
yon_debug_output("%s\n", text); yon_debug_output("%s\n", text);
yon_debug_output("%s\n", last_match); yon_debug_output("%s\n", last_match);
g_free(text);
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel), percentage / 100); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel), percentage / 100);
g_free(last_match); g_free(last_match);
} }
g_match_info_unref(match); g_match_info_unref(match);
g_mutex_lock(&main_config.progress_mutex); g_mutex_lock(&main_config.progress_mutex);
if (percentage==100){ if (percentage==100||!main_config.progress_active){
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel),0); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel),0);
g_mutex_unlock(&main_config.progress_mutex); g_mutex_unlock(&main_config.progress_mutex);
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
@ -115,13 +116,11 @@ void yon_terminal_start(main_window *widgets, char *usr_command){
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->terminal),"opacited"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->terminal),"opacited");
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->terminal),"workingbg"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->terminal),"workingbg");
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->TerminalOverlay),widgets->TerminalRevealer); gtk_overlay_add_overlay(GTK_OVERLAY(widgets->TerminalOverlay),widgets->TerminalRevealer);
// g_signal_connect(G_OBJECT(widgets->terminal), "child-exited", G_CALLBACK(on_terminal_done), widgets);
// g_signal_connect(G_OBJECT(widgets->terminal), "contents-changed", G_CALLBACK(on_terminal_check_progress), widgets);
g_signal_connect(G_OBJECT(widgets->TerminalMoreButton), "clicked", G_CALLBACK(on_terminal_more), widgets); g_signal_connect(G_OBJECT(widgets->TerminalMoreButton), "clicked", G_CALLBACK(on_terminal_more), widgets);
g_signal_connect(G_OBJECT(widgets->terminal), "destroy", G_CALLBACK(on_terminal_destroy), widgets); g_signal_connect(G_OBJECT(widgets->terminal), "destroy", G_CALLBACK(on_terminal_destroy), widgets);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->TerminalRevealer),1); gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->TerminalRevealer),1);
vte_terminal_reset(VTE_TERMINAL(widgets->terminal),0,1); vte_terminal_reset(VTE_TERMINAL(widgets->terminal),0,1);
yon_terminal_integrated_start_shell(widgets->terminal,usr_command,on_terminal_done,widgets); yon_terminal_integrated_start(widgets->terminal,usr_command);
vte_terminal_set_scrollback_lines(VTE_TERMINAL(widgets->terminal), 100); vte_terminal_set_scrollback_lines(VTE_TERMINAL(widgets->terminal), 100);
vte_terminal_set_scroll_on_output(VTE_TERMINAL(widgets->terminal), TRUE); vte_terminal_set_scroll_on_output(VTE_TERMINAL(widgets->terminal), TRUE);
vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(widgets->terminal), TRUE); vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(widgets->terminal), TRUE);

@ -100,9 +100,9 @@
#define INTEGRATEDVGA "INTEGRATEDVGA" #define INTEGRATEDVGA "INTEGRATEDVGA"
#define GAPFIX1_parameter "ENVIRONMENT[profile:__GL_YIELD]" #define GAPFIX1_parameter "ENVIRONMENT[profile:__GL_YIELD]"
#define GAPFIX1_command "ubconfig --source global get [environment] ENVIRONMENT[profile:__GL_YIELD]" #define GAPFIX1_command "ubconfig --source global get [system] ENVIRONMENT[profile:__GL_YIELD]"
#define GAPFIX2_parameter "ENVIRONMENT[profile:KWIN_TRIPLE_BUFFER]" #define GAPFIX2_parameter "ENVIRONMENT[profile:KWIN_TRIPLE_BUFFER]"
#define GAPFIX2_command "ubconfig --source global get [environment] ENVIRONMENT[profile:KWIN_TRIPLE_BUFFER]" #define GAPFIX2_command "ubconfig --source global get [system] ENVIRONMENT[profile:KWIN_TRIPLE_BUFFER]"
#define VGADRV_AUTO_command "ubconfig --source global get [video] VGADRV_AUTO" #define VGADRV_AUTO_command "ubconfig --source global get [video] VGADRV_AUTO"
#define VGADRV_NOFREE_command "ubconfig --source global get [video] VGADRV_NOFREE" #define VGADRV_NOFREE_command "ubconfig --source global get [video] VGADRV_NOFREE"
@ -113,8 +113,6 @@
#define OPTIRUN_command "ubconfig --source global get [video] OPTIRUN" #define OPTIRUN_command "ubconfig --source global get [video] OPTIRUN"
#define PRIMUSRUN_command "ubconfig --source global get [video] PRIMUSRUN" #define PRIMUSRUN_command "ubconfig --source global get [video] PRIMUSRUN"
#define INTEGRATEDVGA_command "ubconfig --source global get [video] INTEGRATEDVGA" #define INTEGRATEDVGA_command "ubconfig --source global get [video] INTEGRATEDVGA"
#define KWIN_TRIPLE_BUFFER_command "ubconfig --source global get [/etc/profile.d/ublinux.sh] KWIN_TRIPLE_BUFFER"
#define GL_YIELD_command "ubconfig --source global get [/etc/profile.d/ublinux.sh] __GL_YIELD"
#define XORG_PARAMETER "XORG_MONITOR" #define XORG_PARAMETER "XORG_MONITOR"

Loading…
Cancel
Save