|
|
|
@ -589,6 +589,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
char *gid = NULL;
|
|
|
|
char *gid = NULL;
|
|
|
|
char *non_unique = NULL;
|
|
|
|
char *non_unique = NULL;
|
|
|
|
char *gsystem = NULL;
|
|
|
|
char *gsystem = NULL;
|
|
|
|
|
|
|
|
char *admins = NULL;
|
|
|
|
char *password = NULL;
|
|
|
|
char *password = NULL;
|
|
|
|
int gid_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
|
|
|
|
int gid_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
|
|
|
|
if (gid_active){
|
|
|
|
if (gid_active){
|
|
|
|
@ -616,6 +617,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admins = (char*)gtk_entry_get_text(GTK_ENTRY(window->AdminGroupsEntry));
|
|
|
|
int non_unique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UnuniqueGIDCheck));
|
|
|
|
int non_unique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UnuniqueGIDCheck));
|
|
|
|
if(non_unique_active){
|
|
|
|
if(non_unique_active){
|
|
|
|
non_unique=" --non-unique";
|
|
|
|
non_unique=" --non-unique";
|
|
|
|
@ -631,6 +633,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
|
|
|
|
":",yon_char_return_if_exist(gid,"x"),
|
|
|
|
":",yon_char_return_if_exist(gid,"x"),
|
|
|
|
":",yon_char_return_if_exist(non_unique,""),
|
|
|
|
":",yon_char_return_if_exist(non_unique,""),
|
|
|
|
yon_char_return_if_exist(gsystem,""),
|
|
|
|
yon_char_return_if_exist(gsystem,""),
|
|
|
|
|
|
|
|
":",yon_char_return_if_exist(admins,"x"),
|
|
|
|
":",yon_char_return_if_exist(password,"x"),
|
|
|
|
":",yon_char_return_if_exist(password,"x"),
|
|
|
|
NULL);
|
|
|
|
NULL);
|
|
|
|
yon_config_register(GROUPADD(group_name),"users",final_string);
|
|
|
|
yon_config_register(GROUPADD(group_name),"users",final_string);
|
|
|
|
@ -661,6 +664,8 @@ ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group
|
|
|
|
window->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
|
|
|
|
window->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
|
|
|
|
window->ChangePasswordButton=yon_gtk_builder_get_widget(builder,"ChangePasswordButton");
|
|
|
|
window->ChangePasswordButton=yon_gtk_builder_get_widget(builder,"ChangePasswordButton");
|
|
|
|
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
|
|
|
|
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
|
|
|
|
|
|
|
|
window->AdminGroupsEntry=yon_gtk_builder_get_widget(builder,"AdminGroupsEntry");
|
|
|
|
|
|
|
|
window->AdminGroupsButton=yon_gtk_builder_get_widget(builder,"AdminGroupsButton");
|
|
|
|
|
|
|
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),GROUPS_TITLE_LABEL);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),GROUPS_TITLE_LABEL);
|
|
|
|
|
|
|
|
|
|
|
|
@ -674,6 +679,7 @@ ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group
|
|
|
|
g_signal_connect(G_OBJECT(window->PasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->ChangePasswordButton);
|
|
|
|
g_signal_connect(G_OBJECT(window->PasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->ChangePasswordButton);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserAdditionalGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->userGroupsEntry);
|
|
|
|
g_signal_connect(G_OBJECT(window->UserAdditionalGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->userGroupsEntry);
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->AdminGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->AdminGroupsEntry);
|
|
|
|
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(on_GID_update),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(on_GID_update),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->SystemGroupCheck),"toggled",G_CALLBACK(on_GID_update),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->SystemGroupCheck),"toggled",G_CALLBACK(on_GID_update),window);
|
|
|
|
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->SystemGroupCheck);
|
|
|
|
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->SystemGroupCheck);
|
|
|
|
@ -1555,8 +1561,13 @@ void on_main_edit(GtkWidget *self, main_window *widgets){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (size>3){
|
|
|
|
if (size>3){
|
|
|
|
if (strcmp(parsed[3],"")&&strcmp(parsed[3],"x")){
|
|
|
|
if (strcmp(parsed[3],"")&&strcmp(parsed[3],"x")){
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->PasswordEntry),parsed[3]);
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->AdminGroupsEntry),parsed[3]);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),3);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (size>4){
|
|
|
|
|
|
|
|
if (strcmp(parsed[4],"")&&strcmp(parsed[4],"x")){
|
|
|
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->PasswordEntry),parsed[4]);
|
|
|
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),4);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),1);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|