|
|
|
|
@ -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);
|
|
|
|
|
@ -1108,6 +1108,7 @@ void *on_setup_system_configuration(void * data){
|
|
|
|
|
if (widgets){};
|
|
|
|
|
int size;
|
|
|
|
|
config_str all_parameters = yon_config_get_selection_by_key(&size,
|
|
|
|
|
user_name_parameter,
|
|
|
|
|
user_gecos_parameter,
|
|
|
|
|
user_password_parameter,
|
|
|
|
|
root_password_parameter,
|
|
|
|
|
@ -1124,7 +1125,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);
|
|
|
|
|
@ -1138,6 +1139,37 @@ void on_log_closed(GtkWidget *, log_window *window){
|
|
|
|
|
window->Window=NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void *on_save_system_configuration(void *data);
|
|
|
|
|
void *on_save_system_configuration(void * data){
|
|
|
|
|
main_window *widgets = (main_window*)data;
|
|
|
|
|
if (widgets){};
|
|
|
|
|
int size;
|
|
|
|
|
config_str all_parameters = yon_config_get_selection_by_key(&size,
|
|
|
|
|
user_name_parameter,
|
|
|
|
|
user_gecos_parameter,
|
|
|
|
|
user_password_parameter,
|
|
|
|
|
root_password_parameter,
|
|
|
|
|
autologin_parameter,
|
|
|
|
|
xkbmodel_parameter,
|
|
|
|
|
xkblayout_parameter,
|
|
|
|
|
xkbvariant_parameter,
|
|
|
|
|
xkboptions_parameter,
|
|
|
|
|
hostname_parameter,
|
|
|
|
|
zone_parameter,
|
|
|
|
|
lang_parameter,
|
|
|
|
|
locale_parameter,
|
|
|
|
|
NULL);
|
|
|
|
|
if (all_parameters){
|
|
|
|
|
char *parameter_string = yon_char_parsed_to_string(all_parameters,size," ");
|
|
|
|
|
char *command = save_additional_config_command(parameter_string);
|
|
|
|
|
if (system(yon_debug_output("%s\n",command))){};
|
|
|
|
|
yon_char_parsed_free(all_parameters,size);
|
|
|
|
|
free(command);
|
|
|
|
|
if (parameter_string) free(parameter_string);
|
|
|
|
|
}
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log_window *yon_log_window_new();
|
|
|
|
|
log_window *yon_log_window_new(){
|
|
|
|
|
log_window *window = malloc(sizeof(log_window));
|
|
|
|
|
@ -1498,7 +1530,7 @@ void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
|
|
|
|
|
yon_config_register(user_gecos_parameter,user_gecos_parameter_command,username);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->UsernameSensitiveCheck))){
|
|
|
|
|
if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry)))||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LoginSensitiveCheck))){
|
|
|
|
|
yon_config_remove_by_key(user_name_parameter);
|
|
|
|
|
} else {
|
|
|
|
|
char *login = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->LoginEntry));
|
|
|
|
|
@ -1605,6 +1637,9 @@ 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);
|
|
|
|
|
} else {
|
|
|
|
|
pthread_t tid;
|
|
|
|
|
pthread_create(&tid,NULL,on_save_system_configuration,widgets);
|
|
|
|
|
}
|
|
|
|
|
main_config.save_done=1;
|
|
|
|
|
yon_debug_output("Save changed to: %s\n",yon_char_from_int(main_config.save_done));
|
|
|
|
|
@ -2321,7 +2356,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);
|
|
|
|
|
|