contribution-manager: No visual feedback of update progress #4105

This commit is contained in:
Utkarsh Tiwari
2015-11-17 17:31:25 +05:30
parent 09ee576af5
commit 07bef8b703
3 changed files with 16 additions and 1 deletions
@@ -443,6 +443,10 @@ public class ContributionTab extends JPanel {
contributionListPanel.panelByContribution.values();
for (DetailPanel detailPanel : collection) {
detailPanel.update();
// Refreshing the ContributionUpdateTab's status icons
contributionListPanel.updatePanelOrdering(contributionListPanel
.panelByContribution.keySet());
}
}
@@ -59,6 +59,7 @@ implements Scrollable, ContributionListing.ChangeListener {
static Icon updateAvailableIcon;
static Icon incompatibleIcon;
static Icon foundationIcon;
static Icon downloadingIcon;
static Font plainFont;
static Font boldFont;
@@ -74,6 +75,7 @@ implements Scrollable, ContributionListing.ChangeListener {
updateAvailableIcon = Toolkit.getLibIconX("manager/update-available");
incompatibleIcon = Toolkit.getLibIconX("manager/incompatible");
foundationIcon = Toolkit.getLibIconX("icons/foundation", 16);
downloadingIcon = Toolkit.getLibIconX("manager/downloading");
plainFont = Toolkit.getSansFont(14, Font.PLAIN);
boldFont = Toolkit.getSansFont(14, Font.BOLD);
@@ -316,7 +318,12 @@ implements Scrollable, ContributionListing.ChangeListener {
icon = incompatibleIcon;
}
}
label.setIcon(icon);
if ((panelByContribution.get(contribution)).updateInProgress) {
// Display "Loading icon" if download in progress
label.setIcon(downloadingIcon);
} else {
label.setIcon(icon);
}
label.setHorizontalAlignment(SwingConstants.CENTER);
if (isSelected) {
label.setBackground(new Color(0xe0fffd));
@@ -200,6 +200,10 @@ public class UpdateListPanel extends ListPanel {
icon = incompatibleIcon;
}
}
if ((panelByContribution.get(entry)).updateInProgress) {
// Display "Loading icon" if download in progress
icon = downloadingIcon;
}
model.addRow(new Object[] {
icon,
"<html>" + fontFace + entry.getName() + "</font></html>",