Example #1
0
void
NSDownloadWindow::Failure(const char* error)
{
	bar->LockLooper();
	bar->Update(0, NULL, error);
	bar->SetBarColor(ui_color(B_FAILURE_COLOR));
	bar->UnlockLooper();
}
Example #2
0
void
NSDownloadWindow::Success()
{
	bar->LockLooper();
	bar->SetBarColor(ui_color(B_SUCCESS_COLOR));
	bar->UnlockLooper();

	success = true;
}
Example #3
0
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();
}