|
|
|
|
@ -963,6 +963,7 @@ void on_groups_clicked(GtkWidget *, GtkEntry *output_target){
|
|
|
|
|
void on_groups_multiple_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
ubl_settings_usergroups_group_window *window = yon_dictionary_get_data(dict->first,ubl_settings_usergroups_group_window*);
|
|
|
|
|
GtkEntry *output = yon_dictionary_get_data(dict->first->next,GtkEntry*);
|
|
|
|
|
if (!gtk_widget_get_visible(window->DefaultCheck)||!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter);
|
|
|
|
|
char *full_groups="";
|
|
|
|
|
@ -978,6 +979,9 @@ void on_groups_multiple_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gtk_entry_set_text(output,full_groups);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_entry_set_text(output,config(USERGROUPS_parameter));
|
|
|
|
|
}
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1644,6 +1648,7 @@ return window;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_standard_groups_accept(GtkWidget *self, ubl_settings_usergroups_group_window *window){
|
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(window->list);
|
|
|
|
|
int valid = gtk_tree_model_get_iter_first(model,&iter);
|
|
|
|
|
@ -1660,11 +1665,17 @@ void on_standard_groups_accept(GtkWidget *self, ubl_settings_usergroups_group_wi
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
yon_config_register(USERGROUPS_parameter,USERGROUPS_get_command,standard_groups);
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_remove_by_key(USERGROUPS_parameter);
|
|
|
|
|
}
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_standard_groups_open(GtkWidget *, main_window *widgets){
|
|
|
|
|
ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(0);
|
|
|
|
|
if (yon_config_check_ignore(USERGROUPS_parameter)){
|
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultCheck),1);
|
|
|
|
|
}
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),DEFAULT_GROUPS_TITLE_LABEL);
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeaderLabel),DEFAULT_GROUPS_TITLE_LABEL);
|
|
|
|
|
gtk_tree_view_column_set_title(gtk_tree_view_get_column(GTK_TREE_VIEW(window->GroupsTree),1),GID_LABEL);
|
|
|
|
|
@ -2151,13 +2162,16 @@ void on_main_edit(GtkWidget *, main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (parsed_size>3){
|
|
|
|
|
if (strcmp(parameters[3],"x")){
|
|
|
|
|
if (!yon_char_is_empty(parameters[3])&&strcmp(parameters[3],"x")){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userAdditionalGroupsEntry), parameters[3]);
|
|
|
|
|
} else {
|
|
|
|
|
char *default_groups = yon_config_get_by_key(USERGROUPS_parameter);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userAdditionalGroupsEntry), default_groups);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
char *default_groups = yon_config_get_by_key(USERGROUPS_parameter);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userAdditionalGroupsEntry), default_groups);
|
|
|
|
|
}
|
|
|
|
|
if (parsed_size>4&&!yon_char_is_empty(parameters[4])&&strcmp(parameters[4],"")&&strcmp(parameters[4],"x")){
|
|
|
|
|
int params_size;
|
|
|
|
|
|