|
|
|
|
@ -956,7 +956,7 @@ gboolean yon_installation_progress_update(void *data) {
|
|
|
|
|
yon_char_parsed_free(text, size);
|
|
|
|
|
|
|
|
|
|
if (!strstr(percentage, "#pb")) {
|
|
|
|
|
double fraction = atof(percentage);
|
|
|
|
|
double fraction = atof(percentage+1);
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel), current_copy);
|
|
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100);
|
|
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), 0);
|
|
|
|
|
@ -1028,6 +1028,8 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
|
|
|
|
|
case YON_PAGE_INSTALLATION:{
|
|
|
|
|
yon_switch_page_render(widgets,3);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->BackButton,0);
|
|
|
|
|
if ((!main_config.configure_mode))
|
|
|
|
|
gtk_widget_set_sensitive(widgets->CancelInstallButton,0);
|
|
|
|
|
if (main_config.config_save_thread&&!main_config.configure_mode)
|
|
|
|
|
g_thread_join(main_config.config_save_thread);
|
|
|
|
|
if (!main_config.progress_thread&&!main_config.configure_mode)
|
|
|
|
|
@ -1044,9 +1046,24 @@ void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
|
|
|
|
|
gtk_widget_hide(widgets->SaveButton);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case YON_PAGE_INSTALL_ERROR:
|
|
|
|
|
case YON_PAGE_INSTALL_ERROR:{
|
|
|
|
|
on_summary_log_view((GtkWidget*)NULL);
|
|
|
|
|
[[fallthrough]];
|
|
|
|
|
|
|
|
|
|
yon_switch_page_render(widgets,7);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->BackButton,0);
|
|
|
|
|
gtk_widget_hide(gtk_widget_get_parent(widgets->PackageInstallationProgress));
|
|
|
|
|
gtk_widget_hide(widgets->InstallationLabel);
|
|
|
|
|
gtk_widget_hide(widgets->PackageInstallationLabel);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->NextButton,1);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
|
|
|
|
|
main_config.install_complete=0;
|
|
|
|
|
main_config.save_done=0;
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL);
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL);
|
|
|
|
|
gtk_image_set_from_icon_name(GTK_IMAGE(gtk_button_get_image(GTK_BUTTON(widgets->NextButton))),
|
|
|
|
|
"com.ublinux.ubinstall-gtk.sync-symbolic",GTK_ICON_SIZE_BUTTON);
|
|
|
|
|
|
|
|
|
|
} break;
|
|
|
|
|
case YON_PAGE_COMPLETION:{
|
|
|
|
|
yon_switch_page_render(widgets,7);
|
|
|
|
|
gtk_widget_set_sensitive(widgets->BackButton,0);
|
|
|
|
|
@ -1196,7 +1213,6 @@ if (window->Window){
|
|
|
|
|
main_config.log_progress_buzy=0;
|
|
|
|
|
if (size){
|
|
|
|
|
char *final = yon_char_parsed_to_string(parsed,size,"");
|
|
|
|
|
// char *prev = (char*)gtk_label_get_text(GTK_LABEL(window->LogLabel));
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->LogLabel),final);
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){
|
|
|
|
|
gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow)),gtk_adjustment_get_upper(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->ScrollWindow))));
|
|
|
|
|
@ -1637,9 +1653,11 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
if (gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress))>0.9){
|
|
|
|
|
pthread_t tid;
|
|
|
|
|
pthread_create(&tid,NULL,on_setup_system_configuration,widgets);
|
|
|
|
|
yon_debug_output("%s\n","installation ending configuration startup");
|
|
|
|
|
} else {
|
|
|
|
|
pthread_t tid;
|
|
|
|
|
pthread_create(&tid,NULL,on_save_system_configuration,widgets);
|
|
|
|
|
yon_debug_output("%s\n","installation process configuration startup");
|
|
|
|
|
}
|
|
|
|
|
main_config.save_done=1;
|
|
|
|
|
yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done));
|
|
|
|
|
@ -1831,6 +1849,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
switch (page){
|
|
|
|
|
case YON_PAGE_COMPLETION:
|
|
|
|
|
case YON_PAGE_INSTALL_ERROR:{
|
|
|
|
|
// GtkWidget *dialog = gtk_dialog_new();
|
|
|
|
|
gtk_main_quit();
|
|
|
|
|
}break;
|
|
|
|
|
default:{
|
|
|
|
|
@ -2153,8 +2172,8 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
widgets->GpartedSameButton = yon_gtk_builder_get_widget(builder,"GpartedSameButton");
|
|
|
|
|
|
|
|
|
|
widgets->ConfigurationModeMenuItem = yon_gtk_builder_get_widget(builder,"ConfigurationModeMenuItem");
|
|
|
|
|
widgets->DocumentationMenuItem = yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
|
|
|
|
|
widgets->AboutMenuItem = yon_gtk_builder_get_widget(builder,"AboutMenuItem");
|
|
|
|
|
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
|
|
|
|
|
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
|
|
|
|
|
|
|
|
|
|
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
|
|
|
|
|
widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
|
|
|
|
|
@ -2224,6 +2243,12 @@ main_window *yon_main_window_complete(){
|
|
|
|
|
widgets->SameFSTypeSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameFSTypeSensitiveCheck");
|
|
|
|
|
widgets->SameLabelSensitiveCheck = yon_gtk_builder_get_widget(builder,"SameLabelSensitiveCheck");
|
|
|
|
|
|
|
|
|
|
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
|
|
|
|
|
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
|
|
|
|
|
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
|
|
|
|
|
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadLocalConfigurationMenuItem),"activate",G_CALLBACK(on_config_local_load),widgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(widgets->LoadExternalConfigurationMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets);
|
|
|
|
|
|