| 703 | } |
| 704 | |
| 705 | void LightscreenWindow::updateStatus() |
| 706 | { |
| 707 | int uploadCount = Uploader::instance()->uploading(); |
| 708 | int activeCount = ScreenshotManager::instance()->activeCount(); |
| 709 | |
| 710 | if (mHasTaskbarButton) { |
| 711 | mTaskbarButton->progress()->setPaused(true); |
| 712 | mTaskbarButton->progress()->setVisible(true); |
| 713 | } |
| 714 | |
| 715 | if (uploadCount > 0) { |
| 716 | setStatus(tr("%1 uploading").arg(uploadCount)); |
| 717 | |
| 718 | if (mHasTaskbarButton) { |
| 719 | mTaskbarButton->progress()->setRange(0, 100); |
| 720 | mTaskbarButton->progress()->resume(); |
| 721 | } |
| 722 | |
| 723 | emit uploading(true); |
| 724 | } else { |
| 725 | if (activeCount > 1) { |
| 726 | setStatus(tr("%1 processing").arg(activeCount)); |
| 727 | } else if (activeCount == 1) { |
| 728 | setStatus(tr("processing")); |
| 729 | } else { |
| 730 | setStatus(); |
| 731 | |
| 732 | if (mHasTaskbarButton) { |
| 733 | mTaskbarButton->progress()->setVisible(false); |
| 734 | } |
| 735 | } |
| 736 | |
| 737 | emit uploading(false); |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | void LightscreenWindow::updaterDone(bool result) |
| 742 | { |
nothing calls this directly
no test coverage detected