|
|
|
|
@ -1322,7 +1322,20 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model,&iter))
|
|
|
|
|
gtk_list_store_append(widgets->GroupsList,&iter);
|
|
|
|
|
char *passwor = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
|
|
|
|
|
gtk_list_store_set(widgets->GroupsList,&iter,0,strcmp(gid,"x")?gid:"",1,group_name,2,group_users,3,yon_char_append(non_unique,gsystem),4,gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordCombo))==0?PASSWORD_NO_SET_LABEL:check_is_password_hash(passwor)&&passwor[0]=='%'?UNENCRYPTED_LABEL:ENCRYPTED_LABEL,-1);
|
|
|
|
|
char *password_status=NULL;
|
|
|
|
|
int password_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordCombo));
|
|
|
|
|
if (password_active==0)
|
|
|
|
|
password_status=DEFAULT_USER_LABEL;
|
|
|
|
|
else if (password_active==1)
|
|
|
|
|
password_status = NO_PASSWORD_LABEL;
|
|
|
|
|
else if (password_active == 2){
|
|
|
|
|
if (check_is_password_hash(passwor)){
|
|
|
|
|
password_status=UNENCRYPTED_LABEL;
|
|
|
|
|
} else {
|
|
|
|
|
password_status=UNENCRYPTED_LABEL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gtk_list_store_set(widgets->GroupsList,&iter,0,strcmp(gid,"x")?gid:"",1,group_name,2,group_users,3,yon_char_append(non_unique,gsystem),4,password_status,-1);
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|