#At file:///C:/Users/Reggie/work/wex/installer-updated/ based on revid:iggy@stripped
349 Reggie Burnett 2011-03-02
only show products in progresspanel that actually have changes to be made
modified:
WexInstaller.Core/Product.cs
WexInstaller.Core/ProductFeature.cs
WexInstaller/InstallWizard/InstallProgressPanel.cs
=== modified file 'WexInstaller.Core/Product.cs'
=== modified file 'WexInstaller.Core/Product.cs'
--- a/WexInstaller.Core/Product.cs 2011-02-21 16:37:13 +0000
+++ b/WexInstaller.Core/Product.cs 2011-03-02 14:57:43 +0000
@@ -162,6 +162,15 @@
get { return Name.StartsWith("mysql-server"); }
}
+ public bool HasChanges()
+ {
+ bool hasChanges;
+ hasChanges = Installed != ProposedInstalled;
+ foreach (ProductFeature feature in GetPackage().Features)
+ hasChanges |= feature.HasChanges();
+ return hasChanges;
+ }
+
public string GetUpgradeDisplayString()
{
string upgradeDisplayString = String.Empty;
=== modified file 'WexInstaller.Core/ProductFeature.cs'
--- a/WexInstaller.Core/ProductFeature.cs 2011-02-08 21:28:42 +0000
+++ b/WexInstaller.Core/ProductFeature.cs 2011-03-02 14:57:43 +0000
@@ -114,6 +114,15 @@
}
}
+ public bool HasChanges()
+ {
+ bool hasChanges;
+ hasChanges = Installed != ProposedInstalled;
+ foreach (ProductFeature feature in Features)
+ hasChanges |= feature.HasChanges();
+ return hasChanges;
+ }
+
internal void ProcessFeatures(List<ProductFeature> toAdd, List<ProductFeature> toRemove)
{
foreach (ProductFeature f in Features)
=== modified file 'WexInstaller/InstallWizard/InstallProgressPanel.cs'
--- a/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-02-09 14:52:59 +0000
+++ b/WexInstaller/InstallWizard/InstallProgressPanel.cs 2011-03-02 14:57:43 +0000
@@ -55,15 +55,18 @@
{
foreach (Product p in pc.Products)
{
- if (!p.ProposedInstalled) continue;
- ListViewItem item = new ListViewItem(String.Empty);
- item.Name = p.Name;
- item.Tag = p;
- item.SubItems.Add(p.TitleWithVersion);
- item.SubItems.Add(GetProductStateString(p.CurrentState));
- item.SubItems.Add(String.Empty);
- item.SubItems.Add(String.Empty);
- productList.Items.Add(item);
+ if (p.IsUpgrade ||
+ (p.ProposedInstalled && p.HasChanges()))
+ {
+ ListViewItem item = new ListViewItem(String.Empty);
+ item.Name = p.Name;
+ item.Tag = p;
+ item.SubItems.Add(p.TitleWithVersion);
+ item.SubItems.Add(GetProductStateString(p.CurrentState));
+ item.SubItems.Add(String.Empty);
+ item.SubItems.Add(String.Empty);
+ productList.Items.Add(item);
+ }
}
}
@@ -162,7 +165,7 @@
textStatus = "Remove started.";
break;
case ProductState.RemoveInProgress:
- textStatus = "Removeing.";
+ textStatus = "Removing.";
break;
case ProductState.RemoveSuccess:
textStatus = "Successfully removed.";
Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20110302145743-j4bhn4zyhx2cygl7.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (reggie.burnett:349) | Reggie Burnett | 2 Mar |