Last connit return

pull/132/head
parent 1f0e084012
commit 19d16fa88d
No known key found for this signature in database
GPG Key ID: FF1D842BF4DDE92B

@ -53,12 +53,12 @@ void on_storage_open(GtkWidget *self, storage_config_window *window){
int exist_size=0;
config_str exist_storages = (config_str)g_hash_table_get_keys_as_array(main_config.storages,&exist_size);
for (int i=0;i<exist_size;i++){
printf("%s -- %s\n",filename,exist_storages[i]);
if (strstr(filename,exist_storages[i])){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),INSIDE_STORAGE_ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
}
yon_char_parsed_free(exist_storages,exist_size);
storage_struct *storage = yon_storage_struct_new();
storage->path=dialog->last_success_selection;
storage->name = yon_char_new(storage->path);
@ -71,6 +71,7 @@ void on_storage_open(GtkWidget *self, storage_config_window *window){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->StoragePathCombo),storage->path);
yon_config_register(storage->path,STORAGE_command,"");
yon_storage_open_add_repos(storage->path,window);
yon_storage_config_update(window);
}
}
@ -254,11 +255,13 @@ void on_storage_accept(GtkWidget *self, dictionary *dict){
for (int i=0;i<size;i++){
int repos_size;
config_str repos = yon_char_parse(config(keys[i]),&repos_size,",");
if (repos_size){
qsort(repos,repos_size,sizeof(char*),yon_char_parsed_compare);
char *repos_string = yon_char_parsed_to_string(repos,repos_size,",");
yon_config_set(keys[i],repos_string);
free(repos_string);
yon_char_parsed_free(repos,repos_size);
}
yon_storage_remove(keys[i],g_hash_table_lookup(window->storages_copy,keys[i]),NULL);
}
g_hash_table_remove_all(window->storages_copy);

Loading…
Cancel
Save