|
|
@ -398,10 +398,16 @@ void get_add_gui_data_base(config_all* all_config) {
|
|
|
|
config_u_g_p* _config = malloc(sizeof(config_u_g_p));
|
|
|
|
config_u_g_p* _config = malloc(sizeof(config_u_g_p));
|
|
|
|
model_null_str_writing(_config);
|
|
|
|
model_null_str_writing(_config);
|
|
|
|
get_temp_gui_data_base(_config);
|
|
|
|
get_temp_gui_data_base(_config);
|
|
|
|
if (temp_vec_actors->vectorList.total != 0) {
|
|
|
|
char* str_user = (char*)gtk_entry_get_text(GTK_ENTRY(temp_widgets->entryUser));
|
|
|
|
_config->actors.pfVectorCopy(&_config->actors, temp_vec_actors);
|
|
|
|
if (strlen(str_user)>2) {
|
|
|
|
|
|
|
|
int size_str = 0;
|
|
|
|
|
|
|
|
char** name_disk = yon_char_parse(str_user, &size_str, ",");
|
|
|
|
|
|
|
|
vector t;
|
|
|
|
|
|
|
|
vector_init(&t);
|
|
|
|
|
|
|
|
for (int i=0; i< size_str; i++) {
|
|
|
|
|
|
|
|
t.pfVectorAdd(&t, yon_char_new(name_disk[i]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_config->actors.pfVectorCopy(&_config->actors, &t);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
vec_temp->pfVectorAdd(vec_temp, _config);
|
|
|
|
vec_temp->pfVectorAdd(vec_temp, _config);
|
|
|
|
|
|
|
|
|
|
|
@ -477,7 +483,8 @@ int wrapper_check_save() {
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (strcmp(set_add_edit, "add")==0 && temp_vec_actors->vectorList.total != 0) {
|
|
|
|
const char* str_user = gtk_entry_get_text(GTK_ENTRY(temp_widgets->entryUser));
|
|
|
|
|
|
|
|
if (strcmp(set_add_edit, "add")==0 && (temp_vec_actors->vectorList.total != 0 || strlen(str_user)>2)) {
|
|
|
|
if (check_save()) {
|
|
|
|
if (check_save()) {
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -575,6 +582,7 @@ config_u_g_p* get_temp_gui_data_base(config_u_g_p* _config) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
if (strcmp(set_add_edit, "add")==0) {
|
|
|
|
if (strcmp(set_add_edit, "add")==0) {
|
|
|
|
|
|
|
|
char* str_user = (char*)gtk_entry_get_text(GTK_ENTRY(temp_widgets->entryUser));
|
|
|
|
table_u_g_get_actors(&_config->actors);
|
|
|
|
table_u_g_get_actors(&_config->actors);
|
|
|
|
char* activ_disk = yon_char_new(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(temp_widgets->UserDeviceCombo)));
|
|
|
|
char* activ_disk = yon_char_new(gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(temp_widgets->UserDeviceCombo)));
|
|
|
|
activ_disk = yon_char_divide_search(activ_disk, " ", -1);
|
|
|
|
activ_disk = yon_char_divide_search(activ_disk, " ", -1);
|
|
|
|