From 98bda4e4077e9d75030497e15b3d7b23aaee158e Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 2 Aug 2024 17:25:00 +0600 Subject: [PATCH] added debug messages --- source/ubinstall-gtk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 3730671..590b3ac 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -577,7 +577,7 @@ void on_config_custom_save(GtkWidget *, main_window *widgets){ if (!strstr(file,".ini")) file = yon_char_append(file,".ini"); if (access(file,0)!=F_OK){ char *command_creation = ubconfig_file_create(file); - int a = system(command_creation); + int a = system(yon_debug_output("%s\n",command_creation)); if (access(file,0)!=F_OK||a){ yon_ubl_status_box_render(CUSTOM_CONFIG_CREATION_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); return; @@ -921,7 +921,7 @@ void *on_config_save(void *data){ fclose(file); char *command = save_config_command(yon_char_parsed_to_string(parameters,size," ")); yon_char_parsed_free(parameters,size); - if (system(command)){ + if (system(yon_debug_output("%s\n",command))){ gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_ERROR); }; free(command); @@ -955,7 +955,7 @@ gboolean yon_installation_progress_update(void *data) { char *percentage = yon_char_divide_search(current_copy, ")", -1); yon_char_parsed_free(text, size); - if (strcmp(percentage, "#pb")) { + if (!strstr(percentage, "#pb")) { double fraction = atof(percentage); gtk_label_set_text(GTK_LABEL(widgets->InstallationLabel), current_copy); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->InstallationProgress), fraction / 100); @@ -1124,7 +1124,7 @@ void *on_setup_system_configuration(void * data){ if (all_parameters){ char *parameter_string = yon_char_parsed_to_string(all_parameters,size," "); char *command = set_user_config_command(parameter_string); - if (system(command)){}; + if (system(yon_debug_output("$s\n",command))){}; yon_char_parsed_free(all_parameters,size); free(command); if (parameter_string) free(parameter_string); @@ -2354,7 +2354,6 @@ main_window *yon_main_window_complete(){ if (layout_size){ char *layout_id = yon_char_new(layout[0]); gtk_tree_store_append(widgets->LayoutList,&iter,NULL); - yon_debug_output("%s\n",parsed[i]); gtk_tree_store_set(widgets->LayoutList,&iter,0,layout[0],1,_(layout[1]),2,1,-1); yon_char_parsed_free(layout,layout_size); layout = yon_config_load(get_layouts_local_command(layout_id),&layout_size);