void NSDownloadWindow::Failure(const char* error) { bar->LockLooper(); bar->Update(0, NULL, error); bar->SetBarColor(ui_color(B_FAILURE_COLOR)); bar->UnlockLooper(); }
void NSDownloadWindow::Success() { bar->LockLooper(); bar->SetBarColor(ui_color(B_SUCCESS_COLOR)); bar->UnlockLooper(); success = true; }
void NSDownloadWindow::Progress(int size) { progress += size; char* buffer = human_friendly_bytesize(progress); strcat(buffer, "/"); bar->LockLooper(); bar->Update(size, NULL, buffer); bar->Invalidate(); bar->UnlockLooper(); }