Terminal opens by default at installation; installation progress bar pulses if can't get installation progress

pull/116/head
parent be51ca4e57
commit f38a181713
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -72,17 +72,16 @@ gboolean on_terminal_check_progress(main_window *widgets){
if (last_match) { if (last_match) {
yon_char_remove_last_symbol(last_match,'%'); yon_char_remove_last_symbol(last_match,'%');
percentage = g_ascii_strtod(last_match,NULL); percentage = g_ascii_strtod(last_match,NULL);
yon_debug_output("%s\n", text);
yon_debug_output("%s\n", last_match);
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);
} else {
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel));
} }
if (text) g_free(text); if (text) g_free(text);
if (match) g_match_info_unref(match); if (match) g_match_info_unref(match);
g_mutex_lock(&main_config.progress_mutex); g_mutex_lock(&main_config.progress_mutex);
if (percentage>99||!main_config.progress_active){ if (percentage>99||!main_config.progress_active){
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;
} }
@ -139,6 +138,7 @@ void yon_terminal_start(main_window *widgets, char *usr_command){
g_mutex_lock(&main_config.progress_mutex); g_mutex_lock(&main_config.progress_mutex);
main_config.progress_active=1; main_config.progress_active=1;
g_mutex_unlock(&main_config.progress_mutex); g_mutex_unlock(&main_config.progress_mutex);
gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(widgets->TerminalInfoLabel),0.00001);
g_idle_add((GSourceFunc)on_terminal_check_progress,widgets); g_idle_add((GSourceFunc)on_terminal_check_progress,widgets);
} }
@ -1073,12 +1073,11 @@ gboolean yon_proprietary_connect(main_window *widgets){
void *yon_proprietary_local_get(main_window *widgets){ void *yon_proprietary_local_get(main_window *widgets){
g_idle_add((GSourceFunc)yon_proprietary_clear,widgets); g_idle_add((GSourceFunc)yon_proprietary_clear,widgets);
int kernels_size; int kernels_size;
config_str kernels_installed=yon_config_load(yon_debug_output("%s\n",yon_get_kernels_installed),&kernels_size); config_str kernels_installed=yon_config_load(yon_get_kernels_installed,&kernels_size);
if (!kernels_size){ if (!kernels_size){
yon_ubl_status_box_render_thread(KERNELS_SUPPORTED_UNFOUND_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_render_thread(KERNELS_SUPPORTED_UNFOUND_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} }
yon_debug_output("%s\n","Kernel add");
for (int i=0;i<kernels_size;i++){ for (int i=0;i<kernels_size;i++){
yon_char_remove_last_symbol(kernels_installed[i],'\n'); yon_char_remove_last_symbol(kernels_installed[i],'\n');
struct proprietary_kernel_append_struct *cur = malloc(sizeof(struct proprietary_kernel_append_struct)); struct proprietary_kernel_append_struct *cur = malloc(sizeof(struct proprietary_kernel_append_struct));

@ -93,6 +93,7 @@
<object class="GtkRevealer" id="TerminalMoreRevieler"> <object class="GtkRevealer" id="TerminalMoreRevieler">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="reveal-child">True</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>

Loading…
Cancel
Save