@ -126,11 +126,11 @@ void yon_load_proceed(YON_CONFIG_TYPE type);
void yon_load_proceed ( YON_CONFIG_TYPE type ) {
yon_config_clean ( ) ;
if ( ! yon_char_is_empty ( config_get_default_command ) )
yon_config_load_config ( YON_CONFIG_DEFAULT , config_get_default_command , NULL ) ;
yon_config_load_config ( YON_CONFIG_DEFAULT , yon_debug_output ( " %s \n " , config_get_default_command ) , NULL ) ;
if ( type = = YON_CONFIG_GLOBAL ) {
yon_config_load_config ( type , config_get_global_command , NULL ) ;
yon_config_load_config ( type , yon_debug_output ( " %s \n " , config_get_global_command ) , NULL ) ;
} else if ( type = = YON_CONFIG_LOCAL ) {
yon_config_load_config ( type , config_get_local_command , NULL ) ;
yon_config_load_config ( type , yon_debug_output ( " %s \n " , config_get_local_command ) , NULL ) ;
} else if ( type = = YON_CONFIG_CUSTOM ) {
char * path = " " ;
GtkWidget * dialog = gtk_file_chooser_dialog_new ( TITLE_LABEL , NULL , GTK_FILE_CHOOSER_ACTION_SAVE , CANCEL_LABEL , GTK_RESPONSE_CANCEL , OPEN_LABEL , GTK_RESPONSE_ACCEPT , NULL ) ;
@ -154,7 +154,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
} else {
gtk_widget_destroy ( dialog ) ;
}
yon_config_load_config ( type , yon_ config_get_custom_command( path ) , NULL ) ;
yon_config_load_config ( type , yon_ debug_output( " %s \n " , yon_ config_get_custom_command( path ) ) , NULL ) ;
if ( path ) free ( path ) ;
}
}
@ -430,15 +430,15 @@ void yon_interface_update(main_window *widgets){
gtk_entry_set_text ( GTK_ENTRY ( widgets - > UserNameEntry ) , " " ) ;
gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widgets - > UsernameSensitiveCheck ) , 0 ) ;
}
int def_size ;
int def_size = 0 ;
config_str default_password = NULL ;
if ( ! getuid ( ) ) {
default_password = yon_config_load ( get_default_password_command , & def_size ) ;
if ( def_size ) {
default_password = yon_config_load ( yon_debug_output ( " %s \n " , get_default_password_command ) , & def_size ) ;
if ( def_size > 0 & & default_password ) {
yon_char_remove_last_symbol ( default_password [ 0 ] , ' \n ' ) ;
}
}
if ( ( def_size && ! strcmp ( default_password [ 0 ] , user_password ) ) | | yon_char_is_empty ( user_password ) ) {
if ( ( def_size >0 && ! strcmp ( default_password [ 0 ] , user_password ) ) | | yon_char_is_empty ( user_password ) ) {
gtk_combo_box_set_active ( GTK_COMBO_BOX ( widgets - > PasswordCombo ) , 0 ) ;
gtk_entry_set_text ( GTK_ENTRY ( widgets - > PasswordEntry ) , " " ) ;
gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widgets - > PasswordSensitiveCheck ) , 0 ) ;
@ -447,7 +447,7 @@ void yon_interface_update(main_window *widgets){
gtk_entry_set_text ( GTK_ENTRY ( widgets - > PasswordEntry ) , user_password ) ;
gtk_combo_box_set_active ( GTK_COMBO_BOX ( widgets - > PasswordCombo ) , 1 ) ;
}
if ( ( def_size && ! strcmp ( default_password [ 0 ] , user_password ) ) | | yon_char_is_empty ( user_password ) ) {
if ( ( def_size >0 && ! strcmp ( default_password [ 0 ] , user_password ) ) | | yon_char_is_empty ( user_password ) ) {
gtk_combo_box_set_active ( GTK_COMBO_BOX ( widgets - > AdminPasswordCombo ) , 0 ) ;
gtk_entry_set_text ( GTK_ENTRY ( widgets - > AdminPasswordEntry ) , " " ) ;
gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON ( widgets - > RootPasswordSensitiveCheck ) , 0 ) ;
@ -2097,7 +2097,7 @@ void on_separate_installation_changed(GtkWidget *self, main_window *widgets){
gtk_tree_model_get ( model , & iter , 0 , & disk_path , - 1 ) ;
int size ;
config_str parsed ;
parsed = yon_config_load ( get_parts_and_devices_command , & size ) ;
parsed = yon_config_load ( yon_debug_output ( " %s \n " , get_parts_and_devices_command ) , & size ) ;
char * string = yon_char_parsed_to_string ( parsed , size , " " ) ;
struct json_object * root ;
struct json_object * blockdevices ;
@ -2163,7 +2163,7 @@ void on_near_installation_device_changed(GtkWidget *self, main_window *widgets){
gtk_tree_model_get ( model , & iter , 0 , & disk_path , - 1 ) ;
int size ;
config_str parsed ;
parsed = yon_config_load ( get_parts_and_devices_command , & size ) ;
parsed = yon_config_load ( ( get_parts_and_devices_command ) , & size ) ;
char * string = yon_char_parsed_to_string ( parsed , size , " " ) ;
struct json_object * root ;
struct json_object * blockdevices ;
@ -2232,7 +2232,7 @@ void on_same_installation_device_changed(GtkWidget *, main_window *widgets){
gtk_tree_model_get ( model , & iter , 0 , & disk_path , - 1 ) ;
int size ;
config_str parsed ;
parsed = yon_config_load ( get_parts_and_devices_command , & size ) ;
parsed = yon_config_load ( yon_debug_output ( " %s \n " , get_parts_and_devices_command ) , & size ) ;
char * string = yon_char_parsed_to_string ( parsed , size , " " ) ;
struct json_object * root ;
struct json_object * blockdevices ;
@ -2667,7 +2667,7 @@ main_window *yon_main_window_complete(){
}
gtk_combo_box_set_active ( GTK_COMBO_BOX ( widgets - > RegionCombo ) , 0 ) ;
yon_char_parsed_free ( parsed , size ) ;
parsed = yon_config_load ( get_layouts_command , & size ) ;
parsed = yon_config_load ( yon_debug_output ( " %s \n " , get_layouts_command ) , & size ) ;
GtkTreeIter itar ;
for ( int i = 0 ; i < size ; i + + ) {
yon_char_remove_last_symbol ( parsed [ i ] , ' \n ' ) ;
@ -2679,7 +2679,7 @@ main_window *yon_main_window_complete(){
gtk_tree_store_set ( widgets - > LayoutList , & iter , 0 , layout [ 0 ] , 1 , _ ( layout [ 1 ] ) , 2 , 1 , - 1 ) ;
yon_char_parsed_free ( layout , layout_size ) ;
char * command = get_layouts_local_command ( layout_id ) ;
config_str layout_local = yon_config_load ( command , & layout_size ) ;
config_str layout_local = yon_config_load ( yon_debug_output ( " %s \n " , command ) , & layout_size ) ;
free ( command ) ;
free ( layout_id ) ;
for ( int j = 0 ; j < layout_size ; j + + ) {
@ -2700,7 +2700,7 @@ main_window *yon_main_window_complete(){
}
yon_char_parsed_free ( parsed , size ) ;
{
parsed = yon_config_load ( get_devices_command , & size ) ;
parsed = yon_config_load ( yon_debug_output ( " %s \n " , get_devices_command ) , & size ) ;
char * string = yon_char_parsed_to_string ( parsed , size , " " ) ;
struct json_object * root ;
struct json_object * blockdevices ;
@ -2736,7 +2736,7 @@ main_window *yon_main_window_complete(){
}
if ( size ) yon_char_parsed_free ( parsed , size ) ;
config_str models = yon_config_load ( get_models_command , & size ) ;
config_str models = yon_config_load ( yon_debug_output ( " %s \n " , get_models_command ) , & size ) ;
for ( int i = 0 ; i < size ; i + = 2 ) {
models [ i ] = yon_char_divide_search ( models [ i ] , " \n " , - 1 ) ;
models [ i + 1 ] = yon_char_divide_search ( models [ i + 1 ] , " \n " , - 1 ) ;