|
|
|
@ -97,9 +97,7 @@ void on_storage_remove(GtkWidget *self, storage_config_window *window){
|
|
|
|
storage_struct *storage = g_hash_table_lookup(window->storages_copy,storage_target);
|
|
|
|
storage_struct *storage = g_hash_table_lookup(window->storages_copy,storage_target);
|
|
|
|
if (storage){
|
|
|
|
if (storage){
|
|
|
|
const char *path = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->StoragePathCombo));
|
|
|
|
const char *path = gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->StoragePathCombo));
|
|
|
|
if (!config((char*)path)){
|
|
|
|
|
|
|
|
yon_config_register((char*)path,STORAGE_command,"-");
|
|
|
|
yon_config_register((char*)path,STORAGE_command,"-");
|
|
|
|
}
|
|
|
|
|
|
|
|
yon_config_set_status((char*)path,-2);
|
|
|
|
yon_config_set_status((char*)path,-2);
|
|
|
|
gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(window->StoragePathCombo),gtk_combo_box_get_active(GTK_COMBO_BOX(window->StoragePathCombo)));
|
|
|
|
gtk_combo_box_text_remove(GTK_COMBO_BOX_TEXT(window->StoragePathCombo),gtk_combo_box_get_active(GTK_COMBO_BOX(window->StoragePathCombo)));
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->StoragePathCombo),0);
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->StoragePathCombo),0);
|
|
|
|
@ -183,13 +181,15 @@ void yon_storage_remove(char *key, storage_struct *storage,void*){
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int size;
|
|
|
|
int size;
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(parameter)&&strcmp(parameter,"-")){
|
|
|
|
config_str parsed = yon_char_parse(parameter,&size,",");
|
|
|
|
config_str parsed = yon_char_parse(parameter,&size,",");
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
char *sign = config(parsed[i]);
|
|
|
|
char *sign = config(parsed[i]);
|
|
|
|
char *repo_name = parsed[i]+yon_char_find_last(parsed[i],'/')+1;
|
|
|
|
char *repo_name = parsed[i]+yon_char_find_last(parsed[i],'/')+1;
|
|
|
|
char *command = create_storage_command(key,repo_name,sign);
|
|
|
|
char *command = create_storage_command(key,repo_name,sign);
|
|
|
|
yon_launch(yon_debug_output("%s\n",command));
|
|
|
|
yon_launch(yon_debug_output("%s\n",command));
|
|
|
|
free(command);
|
|
|
|
free(command);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
yon_storage_sturct_free_full(storage);
|
|
|
|
yon_storage_sturct_free_full(storage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|