|
|
|
|
@ -799,19 +799,24 @@ void on_filechooser_open(GtkWidget *, GtkEntry *output_target){
|
|
|
|
|
|
|
|
|
|
void on_groups_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*);
|
|
|
|
|
struct target_struct *output = yon_dictionary_get_data(dict->first->next,struct target_struct *);
|
|
|
|
|
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultCheck))){
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(window->list);
|
|
|
|
|
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->GroupsTree)),&model,&iter)){
|
|
|
|
|
char *name;
|
|
|
|
|
gtk_tree_model_get(model,&iter,1,&name,-1);
|
|
|
|
|
gtk_entry_set_text(output,name);
|
|
|
|
|
gtk_entry_set_text(output->target,name);
|
|
|
|
|
free(name);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
gtk_entry_set_text(output->target,"");
|
|
|
|
|
gtk_toggle_button_set_active(output->defaut_toggle,1);
|
|
|
|
|
}
|
|
|
|
|
on_subwindow_close(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_groups_clicked(GtkWidget *, GtkEntry *output_target){
|
|
|
|
|
void on_groups_clicked(GtkWidget *, struct target_struct *output_target){
|
|
|
|
|
ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(0);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),MAIN_GROUP_TITLE_LABEL);
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(window->HeaderLabel),MAIN_GROUP_TITLE_LABEL);
|
|
|
|
|
@ -837,7 +842,7 @@ void on_groups_clicked(GtkWidget *, GtkEntry *output_target){
|
|
|
|
|
gtk_tree_view_column_set_title(gtk_tree_view_get_column(GTK_TREE_VIEW(window->GroupsTree),1),GID_LABEL);
|
|
|
|
|
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->GroupsTree),0),0);
|
|
|
|
|
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->GroupsTree)),GTK_SELECTION_SINGLE);
|
|
|
|
|
const char *current_group=gtk_entry_get_text(output_target);
|
|
|
|
|
const char *current_group=gtk_entry_get_text(output_target->target);
|
|
|
|
|
size_t digits=0;
|
|
|
|
|
for (guint k=0;k<strlen(current_group);k++){
|
|
|
|
|
if (g_ascii_isdigit(current_group[k])){
|
|
|
|
|
|