Default password and default root password saving fix

pull/247/head
parent 0ed982a469
commit 51fb99f6c5

@ -43,23 +43,23 @@ void on_additional_settings_changed(GtkWidget *self, ubl_settings_usergroups_add
default_password="!*";
}
if (!yon_char_is_empty(default_password)){
if (window->default_password)
// if (window->default_password)
yon_config_register(DEFAULTPASSWD_parameter,DEFAULTPASSWD_parameter_command,default_password);
} else {
if (window->default_password)
// if (window->default_password)
yon_config_remove_by_key(DEFAULTPASSWD_parameter);
}
char *root_password = NULL;
int root_password_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RootPasswordCombo));
if (root_password_active==1)
root_password=(char*)gtk_entry_get_text(GTK_ENTRY(window->RootPasswordCombo));
root_password=(char*)gtk_entry_get_text(GTK_ENTRY(window->RootPasswordEntry));
else if (root_password_active==2)
root_password=" ";
if (!yon_char_is_empty(root_password)){
if (window->default_root_password)
// if (window->default_root_password)
yon_config_register(DEFAULTROOTPASSWD_parameter,DEFAULTROOTPASSWD_parameter_command,root_password);
} else {
if (window->default_root_password)
// if (window->default_root_password)
yon_config_remove_by_key(DEFAULTROOTPASSWD_parameter);
}
int user_k_admin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultUserAdministratorCheck));
@ -689,7 +689,7 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RootPasswordCombo),2);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RootPasswordCombo),1);
gtk_entry_set_text(GTK_ENTRY(window->DefaultPasswordEntry),root_password);
gtk_entry_set_text(GTK_ENTRY(window->RootPasswordEntry),root_password);
}
}
char *is_k_admin = yon_config_get_by_key(ADDADM_parameter);

@ -300,7 +300,7 @@ msgstr "Пароль не требуется"
#: source/ubl-strings.h:72
msgid "Set a password"
msgstr "Задать пароль"
msgstr "Установить пароль"
#: source/ubl-strings.h:73 source/ubl-strings.h:124
msgid "Encrypted"

Loading…
Cancel
Save