Skip to content

Install old versions of mods on double click from version list #2364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

HebaruSan
Copy link
Member

Background

Currently GUI can only install the latest compatible version of a given mod. So while there may be versions 1.0, 1.1, 1.2, and 1.3 of a mod in the registry, you can only install 1.3.

It may be desirable to install older versions of a mod in some cases. For example, I need to do this to investigate a bug report involving upgrades; if I can only install the latest versions, then I would have to install a bunch of mods and then wait for one of them to upgrade, and repeating such a test would involve more waiting. (Yes, there's a way to do it in Cmdline, but it's nice to have in GUI as well.)

There's a Versions tab that lists all versions of the mod and indicates which are compatible with the current game version. It's not interactive at the moment.

image

Changes

Now if you double click one of the green versions, CKAN prompts you to confirm that you want to install it:

image

If you click yes, then off to the install flow you go:

image

And when it finishes, the mod appears as installed and upgradeable in the mod list, as expected:

image

From a code perspective, the "import from .ckan file" code is refactored to a standalone function in MainInstall.cs, which is now shared with the newly added double click handler for the versions list view. To get the CkanModule from the list view, we now set them into the .Tag properties of the list view items.

Fixes #2077.

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI labels Mar 16, 2018
@HebaruSan HebaruSan force-pushed the feature/install-from-version-list branch from 0957bab to 0f8b204 Compare March 17, 2018 20:18
@Olympic1
Copy link
Member

Olympic1 commented Mar 17, 2018

This is the thing I was working on after the right-click menu, but couldn't it it to work. Glad you figured it out.

This will need a rebase.

@HebaruSan
Copy link
Member Author

Rebased on latest master since both were changing installFromckanToolStripMenuItem_Click.

Sorry, something went wrong.

@politas politas merged commit 0f8b204 into KSP-CKAN:master Mar 18, 2018
politas added a commit that referenced this pull request Mar 18, 2018

Verified

This commit was signed with the committer’s verified signature.
… list
@politas politas removed the Enhancement New features or functionality label Mar 18, 2018
@HebaruSan HebaruSan deleted the feature/install-from-version-list branch March 18, 2018 16:16
@HebaruSan HebaruSan mentioned this pull request Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants