pull/364/head
parent 72e5fe4316
commit 5a07711dd7

@ -321,7 +321,9 @@ void yon_network_init(main_window *widgets){
config_str users = yon_config_get_all_by_key(NETWORK_parameter_search,&size); config_str users = yon_config_get_all_by_key(NETWORK_parameter_search,&size);
yon_config_remove_by_list(users,size); yon_config_remove_by_list(users,size);
yon_config_update_by_args(main_config.config_load_path, DOMAIN_parameter,DOMAIN_admanger_parameter,NTPSERVERS_parameter,hostname_parameter,NULL); yon_config_update_by_args(main_config.config_load_path, DOMAIN_parameter,DOMAIN_admanger_parameter,NTPSERVERS_parameter,hostname_parameter,NULL);
yon_config_load_config(YON_CONFIG_CUSTOM,ubconfig_load_command(main_config.config_load_path),NETWORK_parameter_all,NULL); char *command = yon_char_unite(ubconfig_load_command(main_config.config_load_path),NETWORK_parameter_all,NULL);
yon_config_load_config(YON_CONFIG_CUSTOM,command,NULL);
free(command);
} }
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox)); GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox));
GList *iter; GList *iter;

@ -241,11 +241,12 @@ void yon_user_init(main_window *widgets){
gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),"superadmin"); gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),"superadmin");
} }
user->changed=1; user->changed=1;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1);
if (yon_char_is_empty(default_passwd)){ if (yon_char_is_empty(default_passwd)){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),0); gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),0);
gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),yon_config_default_get_by_key(DEFAULTPASSWD_parameter)); gtk_entry_set_placeholder_text(GTK_ENTRY(widgets->UserRootPasswordEntry),yon_config_default_get_by_key(DEFAULTPASSWD_parameter));
} else { } else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(user->AdminCheck),1); gtk_combo_box_set_active(GTK_COMBO_BOX(user->PasswordCombo),1);
gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),config(DEFAULTPASSWD_system_parameter)); gtk_entry_set_text(GTK_ENTRY(widgets->UserRootPasswordEntry),config(DEFAULTPASSWD_system_parameter));
} }
} }

Loading…
Cancel
Save