|
|
|
|
@ -1003,32 +1003,32 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
|
|
|
|
|
void on_additional_settings_save(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window){
|
|
|
|
|
const char *default_user = (char*)gtk_entry_get_text(GTK_ENTRY(window->DefaultUserNameEntry));
|
|
|
|
|
if (!yon_char_is_empty(default_user)){
|
|
|
|
|
yon_config_register(DEFAULTUSER_parameter,"users",yon_char_new((char*)default_user));
|
|
|
|
|
yon_config_register(DEFAULTUSER_parameter,DEFAULTUSER_parameter_command,yon_char_new((char*)default_user));
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_remove_by_key(DEFAULTUSER_parameter);
|
|
|
|
|
}
|
|
|
|
|
char *default_password = gtk_combo_box_get_active(GTK_COMBO_BOX(window->DefaultPasswordCombo))>1? (char*)gtk_entry_get_text(GTK_ENTRY(window->DefaultPasswordEntry)):NULL;
|
|
|
|
|
if (!yon_char_is_empty(default_password)){
|
|
|
|
|
yon_config_register(DEFAULTPASSWD_parameter,"users",default_password);
|
|
|
|
|
yon_config_register(DEFAULTPASSWD_parameter,DEFAULTPASSWD_parameter_command,default_password);
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_remove_by_key(DEFAULTPASSWD_parameter);
|
|
|
|
|
}
|
|
|
|
|
char *root_password = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RootPasswordCombo)) > 1 ? (char*)gtk_entry_get_text(GTK_ENTRY(window->RootPasswordEntry)) : NULL;
|
|
|
|
|
if (!yon_char_is_empty(root_password)){
|
|
|
|
|
yon_config_register(DEFAULTROOTPASSWD_parameter,"users",root_password);
|
|
|
|
|
yon_config_register(DEFAULTROOTPASSWD_parameter,DEFAULTROOTPASSWD_parameter_command,root_password);
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_remove_by_key(DEFAULTROOTPASSWD_parameter);
|
|
|
|
|
}
|
|
|
|
|
int user_k_admin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultUserAdministratorCheck));
|
|
|
|
|
if (user_k_admin){
|
|
|
|
|
yon_config_register(ADDADM_parameter,"users","yes");
|
|
|
|
|
yon_config_register(ADDADM_parameter,ADDADM_parameter_command,"yes");
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_register(ADDADM_parameter,"users","no");
|
|
|
|
|
yon_config_register(ADDADM_parameter,ADDADM_parameter_command,"no");
|
|
|
|
|
}
|
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordHashCombo))!=0){
|
|
|
|
|
char *hash = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->PasswordHashCombo));
|
|
|
|
|
if (!yon_char_is_empty(hash)){
|
|
|
|
|
yon_config_register(HASHPASSWD_parameter,"users",hash);
|
|
|
|
|
yon_config_register(HASHPASSWD_parameter,HASHPASSWD_parameter_command,hash);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
yon_config_remove_by_key(HASHPASSWD_parameter);
|
|
|
|
|
@ -1053,7 +1053,7 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
|
|
|
|
|
if (gtk_toggle_button_get_active(self)){
|
|
|
|
|
char *parameter = yon_config_get_by_key(USERADD_SYNC_parameter);
|
|
|
|
|
if (!parameter){
|
|
|
|
|
yon_config_register(USERADD_SYNC_parameter,"users","boot");
|
|
|
|
|
yon_config_register(USERADD_SYNC_parameter,USERADD_SYNC_parameter_command,"boot");
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_append(USERADD_SYNC_parameter,"boot",",");
|
|
|
|
|
}
|
|
|
|
|
@ -1066,7 +1066,7 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
|
|
|
|
|
if (gtk_toggle_button_get_active(self)){
|
|
|
|
|
char *parameter = yon_config_get_by_key(USERADD_SYNC_parameter);
|
|
|
|
|
if (!parameter){
|
|
|
|
|
yon_config_register(USERADD_SYNC_parameter,"users","shutdown");
|
|
|
|
|
yon_config_register(USERADD_SYNC_parameter,USERADD_SYNC_parameter_command,"shutdown");
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_append(USERADD_SYNC_parameter,"shutdown",",");
|
|
|
|
|
}
|
|
|
|
|
|