|
|
|
@ -1514,7 +1514,9 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
password="";
|
|
|
|
password="";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck))){
|
|
|
|
|
|
|
|
|
|
|
|
deactivate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck));
|
|
|
|
|
|
|
|
if (deactivate){
|
|
|
|
if (strlen(password)>1&&password[0]=='%'&&password[1]=='%'){
|
|
|
|
if (strlen(password)>1&&password[0]=='%'&&password[1]=='%'){
|
|
|
|
char *temp = yon_char_replace(password,"%%","!!");
|
|
|
|
char *temp = yon_char_replace(password,"%%","!!");
|
|
|
|
password = yon_char_replace(temp,"!!","%%!*");
|
|
|
|
password = yon_char_replace(temp,"!!","%%!*");
|
|
|
|
@ -1706,7 +1708,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model,&iter))
|
|
|
|
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model,&iter))
|
|
|
|
gtk_list_store_append(widgets->UsersList,&iter);
|
|
|
|
gtk_list_store_append(widgets->UsersList,&iter);
|
|
|
|
gtk_list_store_set(widgets->UsersList,&iter,
|
|
|
|
gtk_list_store_set(widgets->UsersList,&iter,
|
|
|
|
1,yon_char_return_if_exist(uid_string,AUTOMATICALLY_LABEL),
|
|
|
|
0,deactivate,
|
|
|
|
|
|
|
|
1,yon_char_return_if_exist(uid_string,""),
|
|
|
|
2,yon_char_return_if_exist(login,""),
|
|
|
|
2,yon_char_return_if_exist(login,""),
|
|
|
|
3,yon_char_return_if_exist(username,""),
|
|
|
|
3,yon_char_return_if_exist(username,""),
|
|
|
|
4,yon_char_return_if_exist(main_group,login),
|
|
|
|
4,yon_char_return_if_exist(main_group,login),
|
|
|
|
@ -2085,10 +2088,12 @@ void on_main_edit(GtkWidget *self, main_window *widgets){
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck),1);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck),1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_char_divide(strstr(parameters[5],"!*"),1);
|
|
|
|
yon_char_divide(strstr(parameters[5],"!*"),1);
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(parameters[5])){
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry),parameters[5]);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry),parameters[5]);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),2);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
int samba_sync = yon_samba_sync_get(name);
|
|
|
|
int samba_sync = yon_samba_sync_get(name);
|
|
|
|
if (samba_sync==1){
|
|
|
|
if (samba_sync==1){
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),1);
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),1);
|
|
|
|
|