|
|
|
@ -7,7 +7,7 @@ void yon_config_save_proceed(char *path, YON_CONFIG_TYPE type){
|
|
|
|
void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
if (type!=YON_CONFIG_CUSTOM){
|
|
|
|
if (type!=YON_CONFIG_CUSTOM){
|
|
|
|
yon_config_clean();
|
|
|
|
yon_config_clean();
|
|
|
|
if (main_config.config_load_path){
|
|
|
|
if (main_config.config_load_path&&!main_config.configure_mode){
|
|
|
|
if (main_config.startup_config){
|
|
|
|
if (main_config.startup_config){
|
|
|
|
yon_config_restore(NULL);
|
|
|
|
yon_config_restore(NULL);
|
|
|
|
yon_config_custom_clean(main_config.startup_config);
|
|
|
|
yon_config_custom_clean(main_config.startup_config);
|
|
|
|
@ -22,7 +22,9 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
case YON_CONFIG_LOCAL:
|
|
|
|
case YON_CONFIG_LOCAL:
|
|
|
|
main_config.config_load_path = yon_char_new("system");
|
|
|
|
main_config.config_load_path = yon_char_new("system");
|
|
|
|
main_config.config_save_path = main_config.config_load_path;
|
|
|
|
main_config.config_save_path = main_config.config_load_path;
|
|
|
|
|
|
|
|
if (!main_config.configure_mode){
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL);
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command("system"),NULL);
|
|
|
|
|
|
|
|
}
|
|
|
|
yon_config_load_config(type,config_get_command("system"),NULL);
|
|
|
|
yon_config_load_config(type,config_get_command("system"),NULL);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case YON_CONFIG_CUSTOM:
|
|
|
|
case YON_CONFIG_CUSTOM:
|
|
|
|
@ -30,7 +32,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
char *path = NULL;
|
|
|
|
char *path = NULL;
|
|
|
|
path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
|
|
path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
|
|
if (!yon_char_is_empty(path)){
|
|
|
|
if (!yon_char_is_empty(path)){
|
|
|
|
if (main_config.config_load_path){
|
|
|
|
if (main_config.config_load_path&&!main_config.configure_mode){
|
|
|
|
if (main_config.startup_config){
|
|
|
|
if (main_config.startup_config){
|
|
|
|
yon_config_restore(NULL);
|
|
|
|
yon_config_restore(NULL);
|
|
|
|
yon_config_custom_clean(main_config.startup_config);
|
|
|
|
yon_config_custom_clean(main_config.startup_config);
|
|
|
|
@ -41,13 +43,17 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
main_config.config_save_path = main_config.config_load_path;
|
|
|
|
main_config.config_save_path = main_config.config_load_path;
|
|
|
|
yon_config_clean();
|
|
|
|
yon_config_clean();
|
|
|
|
yon_config_load_config(type,config_get_command(path),NULL);
|
|
|
|
yon_config_load_config(type,config_get_command(path),NULL);
|
|
|
|
|
|
|
|
if (!main_config.configure_mode){
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command(path),NULL);
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command(path),NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
yon_config_clean();
|
|
|
|
yon_config_clean();
|
|
|
|
yon_config_load_config(type,config_get_command(main_config.force_ini),NULL);
|
|
|
|
yon_config_load_config(type,config_get_command(main_config.force_ini),NULL);
|
|
|
|
|
|
|
|
if (!main_config.configure_mode){
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command(main_config.force_ini),NULL);
|
|
|
|
yon_config_custom_load_config(&main_config.startup_config,config_get_command(main_config.force_ini),NULL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|