diff --git a/GUI/GUIMod.cs b/GUI/GUIMod.cs index 8018dac7bc..af7ce663c5 100644 --- a/GUI/GUIMod.cs +++ b/GUI/GUIMod.cs @@ -115,7 +115,7 @@ public GUIMod(CkanModule mod, IRegistryQuerier registry, KspVersionCriteria curr // KSP. if (latest_available_for_any_ksp != null) { - KSPCompatibility = KSPCompatibilityLong = latest_available_for_any_ksp.HighestCompatibleKSP(); + KSPCompatibility = KSPCompatibilityLong = registry.LatestCompatibleKSP(mod.identifier)?.ToString() ?? ""; // If the mod we have installed is *not* the mod we have installed, or we don't know // what we have installed, indicate that an upgrade would be needed. diff --git a/GUI/MainAllModVersions.Designer.cs b/GUI/MainAllModVersions.Designer.cs index a971b68c23..e23c76ed03 100644 --- a/GUI/MainAllModVersions.Designer.cs +++ b/GUI/MainAllModVersions.Designer.cs @@ -60,7 +60,7 @@ private void InitializeComponent() // // CompatibleKSPVersion // - this.CompatibleKSPVersion.Text = "Compatible KSP Version"; + this.CompatibleKSPVersion.Text = "Compatible KSP Versions"; this.CompatibleKSPVersion.Width = 248; // // VersionsListView diff --git a/GUI/MainAllModVersions.cs b/GUI/MainAllModVersions.cs index 021fe950f2..ef94731197 100644 --- a/GUI/MainAllModVersions.cs +++ b/GUI/MainAllModVersions.cs @@ -63,10 +63,13 @@ public GUIMod SelectedModule bool latestCompatibleVersionAlreadyFound = false; VersionsListView.Items.AddRange(allAvailableVersions.Select(module => { + ModuleVersion minMod = null, maxMod = null; + KspVersion minKsp = null, maxKsp = null; + Registry.GetMinMaxVersions(new List() {module}, out minMod, out maxMod, out minKsp, out maxKsp); ListViewItem toRet = new ListViewItem(new string[] { module.version.ToString(), - module.HighestCompatibleKSP() + KspVersionRange.VersionSpan(minKsp, maxKsp).ToString() }) { Tag = module diff --git a/GUI/MainInstall.cs b/GUI/MainInstall.cs index aad01580c8..d89e05a5f8 100644 --- a/GUI/MainInstall.cs +++ b/GUI/MainInstall.cs @@ -421,11 +421,18 @@ private void UpdateProvidedModsDialog(TooManyModsProvideKraken tooManyProvides, foreach (CkanModule module in tooManyProvides.modules) { - ListViewItem item = new ListViewItem {Tag = module, Checked = false, Text = module.name}; - - - ListViewItem.ListViewSubItem description = - new ListViewItem.ListViewSubItem {Text = module.@abstract}; + ListViewItem item = new ListViewItem() + { + Tag = module, + Checked = false, + Text = CurrentInstance.Cache.IsMaybeCachedZip(module) + ? $"{module.name} {module.version} (cached)" + : $"{module.name} {module.version} ({module.download.Host ?? ""}, {CkanModule.FmtSize(module.download_size)})" + }; + ListViewItem.ListViewSubItem description = new ListViewItem.ListViewSubItem() + { + Text = module.@abstract + }; item.SubItems.Add(description); ChooseProvidedModsListView.Items.Add(item);