|
|
|
|
@ -32,6 +32,8 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
login = yon_char_divide_search(parameters[0],"=",-1);
|
|
|
|
|
login[strlen(login)-1]='\0';
|
|
|
|
|
}
|
|
|
|
|
if (!strcmp(parameters[1],"x")) parameters[1]=AUTOMATICALLY_LABEL;
|
|
|
|
|
if (!strcmp(parameters[2],"x")) parameters[2]=login;
|
|
|
|
|
gtk_list_store_set(widgets->UsersList,&iter,
|
|
|
|
|
2,login,
|
|
|
|
|
3,parameters_size>0?parameters[0]:"",
|
|
|
|
|
@ -55,6 +57,7 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
free(yon_char_divide(parameters[0],8));
|
|
|
|
|
char *login = yon_char_divide_search(parameters[i],"\"",-1);
|
|
|
|
|
login[strlen(login)-2]='\0';
|
|
|
|
|
if (!strcmp(parameters[1],"x")) parameters[1]=AUTOLIGIN_LABEL;
|
|
|
|
|
gtk_list_store_set(widgets->GroupsList,&iter,
|
|
|
|
|
1,login,
|
|
|
|
|
0,parameters_size>1?parameters[1]:"",
|
|
|
|
|
@ -362,7 +365,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
char *password = NULL;
|
|
|
|
|
int gid_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
|
|
|
|
|
if (gid_active){
|
|
|
|
|
gid="x";
|
|
|
|
|
gid=AUTOMATICALLY_LABEL;
|
|
|
|
|
} else {
|
|
|
|
|
gid = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUIDEntry));
|
|
|
|
|
if (yon_char_is_empty(gid)){
|
|
|
|
|
@ -399,15 +402,15 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
|
|
|
|
|
}
|
|
|
|
|
final_string = yon_char_unite(yon_char_return_if_exist(group_users,"x"),
|
|
|
|
|
":",yon_char_return_if_exist(gid,"x"),
|
|
|
|
|
":",yon_char_return_if_exist(gid,AUTOMATICALLY_LABEL),
|
|
|
|
|
":",yon_char_return_if_exist(non_unique,""),
|
|
|
|
|
yon_char_return_if_exist(gsystem,""),
|
|
|
|
|
":",yon_char_return_if_exist(password,"x"),
|
|
|
|
|
":",yon_char_return_if_exist(password,DEFAULT_USER_LABEL),
|
|
|
|
|
NULL);
|
|
|
|
|
yon_config_register(GROUPADD(group_name),"users",final_string);
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList);
|
|
|
|
|
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsList)),&model,&iter))
|
|
|
|
|
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);
|
|
|
|
|
gtk_list_store_set(widgets->GroupsList,&iter,0,gid,1,group_name,2,group_users,3,yon_char_append(non_unique,gsystem),4,gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->PasswordCombo)),-1);
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
@ -789,7 +792,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
|
|
|
|
|
int uid_auto_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
|
|
|
|
|
if (uid_auto_active){
|
|
|
|
|
uid_string="x";
|
|
|
|
|
uid_string="";
|
|
|
|
|
} else {
|
|
|
|
|
uid_string = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUIDEntry));
|
|
|
|
|
if (yon_char_is_empty(uid_string)){
|
|
|
|
|
@ -834,7 +837,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
main_group = "x";
|
|
|
|
|
main_group = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
additional_groups = (char*)gtk_entry_get_text(GTK_ENTRY(window->userAdditionalGroupsEntry));
|
|
|
|
|
@ -965,7 +968,15 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
|
|
|
|
|
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_set(widgets->UsersList,&iter,1,yon_char_return_if_exist(uid_string,""),2,yon_char_return_if_exist(login,""),3,yon_char_return_if_exist(username,""),4,yon_char_return_if_exist(main_group,""),5,yon_char_return_if_exist(additional_groups,""),6,yon_char_unite(yon_char_return_if_exist(user_home,""),yon_char_return_if_exist(user_shell,""),yon_char_return_if_exist(create_system_user,""),yon_char_return_if_exist(create_ununique,""),yon_char_return_if_exist(do_not_check,""),NULL),7,yon_char_return_if_exist(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userPasswordCombo)),""),-1);
|
|
|
|
|
gtk_list_store_set(widgets->UsersList,&iter,
|
|
|
|
|
1,yon_char_return_if_exist(uid_string,AUTOMATICALLY_LABEL),
|
|
|
|
|
2,yon_char_return_if_exist(login,""),
|
|
|
|
|
3,yon_char_return_if_exist(username,""),
|
|
|
|
|
4,yon_char_return_if_exist(main_group,login),
|
|
|
|
|
5,yon_char_return_if_exist(additional_groups,""),
|
|
|
|
|
6,yon_char_unite(yon_char_return_if_exist(user_home,""),yon_char_return_if_exist(user_shell,""),yon_char_return_if_exist(create_system_user,""),yon_char_return_if_exist(create_ununique,""),yon_char_return_if_exist(do_not_check,""),NULL),
|
|
|
|
|
7,yon_char_return_if_exist(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userPasswordCombo)),""),
|
|
|
|
|
-1);
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|