Skip to content

Commit

Permalink
Merge pull request #1060 from DinCahill/master
Browse files Browse the repository at this point in the history
Move KSP Install selection to File menu
  • Loading branch information
RichardLake committed Jun 4, 2015
2 parents b518094 + c893a86 commit b9eeb33
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 78 deletions.
34 changes: 22 additions & 12 deletions GUI/Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,15 @@ private void exportModListToolStripMenuItem_Click(object sender, EventArgs e)
File.Copy(Path.Combine(CurrentInstance.CkanDir(), "installed-default.ckan"), dlg.FileName);
}
}

private void selectKSPInstallMenuItem_Click(object sender, EventArgs e)
{
Main.Instance.Manager.ClearAutoStart();
var old_instance = Main.Instance.CurrentInstance;
var result = new ChooseKSPInstance().ShowDialog();
if (!Equals(old_instance, Main.Instance.CurrentInstance))
Main.Instance.CurrentInstanceUpdated();
}
}

public class GUIUser : NullUser
Expand Down
57 changes: 2 additions & 55 deletions GUI/SettingsDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 0 additions & 11 deletions GUI/SettingsDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public void UpdateDialog()
{
RefreshReposListBox();

KSPInstallPathLabel.Text = Main.Instance.CurrentInstance.GameDir();

LocalVersionLabel.Text = Meta.Version();

CheckUpdateOnLaunchCheckbox.Checked = Main.Instance.m_Configuration.CheckForUpdatesOnLaunch;
Expand Down Expand Up @@ -90,15 +88,6 @@ private void ClearCKANCacheButton_Click(object sender, EventArgs e)
UpdateCacheInfo();
}

private void ResetAutoStartChoice_Click(object sender, EventArgs e)
{
Main.Instance.Manager.ClearAutoStart();
var old_instance = Main.Instance.CurrentInstance;
var result = new ChooseKSPInstance().ShowDialog();
if(!Equals(old_instance, Main.Instance.CurrentInstance))
Main.Instance.CurrentInstanceUpdated();
}

private void ReposListBox_SelectedIndexChanged(object sender, EventArgs e)
{
DeleteRepoButton.Enabled = ReposListBox.SelectedItem != null;
Expand Down

0 comments on commit b9eeb33

Please sign in to comment.