Fix more desktop shortcut button state weirdness

pull/35/head
Miepee 4 years ago
parent dd0e691525
commit e177266a72

@ -773,7 +773,6 @@ public partial class MainForm : Form
log.Info("SettingsProfileDropDown.SelectedIndex has been changed to " + modSettingsProfileDropDown.SelectedIndex + "."); log.Info("SettingsProfileDropDown.SelectedIndex has been changed to " + modSettingsProfileDropDown.SelectedIndex + ".");
if (modSettingsProfileDropDown.SelectedIndex <= 0 || modSettingsProfileDropDown.Items.Count == 0) if (modSettingsProfileDropDown.SelectedIndex <= 0 || modSettingsProfileDropDown.Items.Count == 0)
{ {
desktopShortcutButton.Enabled = false;
deleteModButton.Enabled = false; deleteModButton.Enabled = false;
deleteModButton.ToolTip = null; deleteModButton.ToolTip = null;
updateModButton.Enabled = false; updateModButton.Enabled = false;
@ -790,6 +789,7 @@ public partial class MainForm : Form
updateModButton.ToolTip = HelperMethods.GetText(Text.UpdateModButtonToolTip, profileName); updateModButton.ToolTip = HelperMethods.GetText(Text.UpdateModButtonToolTip, profileName);
} }
desktopShortcutButton.Enabled = Directory.Exists(Core.ProfilesPath + "/" + profileName);
profileButton.Enabled = Directory.Exists(Core.ProfilesPath + "/" + profileName); profileButton.Enabled = Directory.Exists(Core.ProfilesPath + "/" + profileName);
profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, profileName); profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, profileName);
saveButton.Enabled = true; saveButton.Enabled = true;

@ -187,6 +187,7 @@ public partial class MainForm
settingsProfileLabel.TextColor = colorGreen; settingsProfileLabel.TextColor = colorGreen;
modSettingsProfileDropDown.Enabled = enabled; modSettingsProfileDropDown.Enabled = enabled;
desktopShortcutButton.Enabled = enabled;
profileButton.Enabled = enabled; profileButton.Enabled = enabled;
profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, selectedProfileName); profileButton.ToolTip = HelperMethods.GetText(Text.OpenProfileFolderToolTip, selectedProfileName);
saveButton.Enabled = enabled; saveButton.Enabled = enabled;
@ -197,13 +198,14 @@ public partial class MainForm
// Only enable these, when we're not on the community updates // Only enable these, when we're not on the community updates
if (modSettingsProfileDropDown.SelectedIndex > 0) if (modSettingsProfileDropDown.SelectedIndex > 0)
{ {
desktopShortcutButton.Enabled = enabled;
updateModButton.Enabled = profileList[modSettingsProfileDropDown.SelectedIndex].Installable; updateModButton.Enabled = profileList[modSettingsProfileDropDown.SelectedIndex].Installable;
updateModButton.ToolTip = HelperMethods.GetText(Text.UpdateModButtonToolTip, selectedProfileName); updateModButton.ToolTip = HelperMethods.GetText(Text.UpdateModButtonToolTip, selectedProfileName);
deleteModButton.Enabled = enabled; deleteModButton.Enabled = enabled;
deleteModButton.ToolTip = HelperMethods.GetText(Text.DeleteModButtonToolTip, selectedProfileName); deleteModButton.ToolTip = HelperMethods.GetText(Text.DeleteModButtonToolTip, selectedProfileName);
} }
Color col = enabled ? colorGreen : colorInactive; Color col = enabled ? colorGreen : colorInactive;
if (OS.IsWindows) if (OS.IsWindows)

Loading…
Cancel
Save