|
|
|
|
@ -17,7 +17,22 @@ void on_remove_accept(GtkWidget *self, dictionary *dict){
|
|
|
|
|
const char *arch = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->ArchitectureCombo));
|
|
|
|
|
const char *sign = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->RepoSignCombo));
|
|
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(storage_path)){
|
|
|
|
|
if (yon_char_is_empty(storage_path)||yon_char_is_empty(repo)||yon_char_is_empty(arch)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->StorageCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(repo)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->RepositoryCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (yon_char_is_empty(arch)){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->ArchitectureCombo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(window->PackagesList);
|
|
|
|
|
int size;
|
|
|
|
|
@ -29,16 +44,18 @@ void on_remove_accept(GtkWidget *self, dictionary *dict){
|
|
|
|
|
char *filename = yon_char_divide(target,yon_char_find_last(target,'/'));
|
|
|
|
|
yon_char_parsed_add_or_create_if_exists(packages,&size,target);
|
|
|
|
|
}
|
|
|
|
|
if (size){
|
|
|
|
|
if (!size){
|
|
|
|
|
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PACKAGES_REMOVE_ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
yon_ubl_status_highlight_incorrect(window->PackagesTree);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
char *final = yon_char_parsed_to_string(packages,size," ");
|
|
|
|
|
char *command = remove_packages_command(storage_path,arch,repo,final,sign);
|
|
|
|
|
if (system(yon_debug_output("%s\n",command))){
|
|
|
|
|
yon_ubl_status_box_render(PACKAGES_REMOVE_ERROR_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
|
|
|
|
|
} else {
|
|
|
|
|
yon_ubl_status_box_render(PACKAGES_REMOVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
yon_ubl_status_box_render(PACKAGES_REMOVE_ERROR_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
} else {
|
|
|
|
|
yon_ubl_status_box_render(PACKAGES_REMOVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
|
|
|
|
|
}
|
|
|
|
|
gtk_widget_destroy(window->MainWindow);
|
|
|
|
|
free(window);
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
|
|