|
|
|
@ -153,7 +153,6 @@ void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonito
|
|
|
|
double fraction = atof(parsed[3]) / 100;
|
|
|
|
double fraction = atof(parsed[3]) / 100;
|
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), fraction);
|
|
|
|
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(widgets->PackageInstallationProgress), fraction);
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), yon_char_parsed_to_string(parsed, size, " "));
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->PackageInstallationLabel), yon_char_parsed_to_string(parsed, size, " "));
|
|
|
|
// yon_char_parsed_free(parsed,size);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!yon_char_is_empty(current_copy)) free(current_copy);
|
|
|
|
if (!yon_char_is_empty(current_copy)) free(current_copy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -170,10 +169,10 @@ gboolean yon_progress_bar_start(main_window *widgets){
|
|
|
|
widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,&err);
|
|
|
|
widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,&err);
|
|
|
|
if (err){
|
|
|
|
if (err){
|
|
|
|
printf("%s\n",err->message);
|
|
|
|
printf("%s\n",err->message);
|
|
|
|
|
|
|
|
yon_ubl_status_box_spawn(widgets->StatusBox,err->message,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
return G_SOURCE_REMOVE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets);
|
|
|
|
g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets);
|
|
|
|
// g_thread_new("progress",(GThreadFunc)yon_progress_thread_test,widgets);
|
|
|
|
|
|
|
|
g_object_unref(file_desc);
|
|
|
|
g_object_unref(file_desc);
|
|
|
|
if (access(progress_path,F_OK)){
|
|
|
|
if (access(progress_path,F_OK)){
|
|
|
|
FILE *file = fopen(progress_path,"w");
|
|
|
|
FILE *file = fopen(progress_path,"w");
|
|
|
|
|