From cba52f00f40fcae805286e7a390bfe1a82ccee3c Mon Sep 17 00:00:00 2001 From: Jaex Date: Thu, 10 Sep 2015 00:23:52 +0300 Subject: [PATCH] Don't show Steam settings in other builds --- ShareX/ApplicationConfig.cs | 2 ++ ShareX/Forms/ApplicationSettingsForm.cs | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/ShareX/ApplicationConfig.cs b/ShareX/ApplicationConfig.cs index ec521cc74..fa2d037f2 100644 --- a/ShareX/ApplicationConfig.cs +++ b/ShareX/ApplicationConfig.cs @@ -128,8 +128,10 @@ public ApplicationConfig() [Category("Application"), DefaultValue(false), Description("Show only customized tasks in main window workflows.")] public bool WorkflowsOnlyShowEdited { get; set; } +#if !STEAM [Category("Application"), DefaultValue(true), Description("Automatically check updates.")] public bool AutoCheckUpdate { get; set; } +#endif [Category("Application"), DefaultValue(true), Description("Automatically expand capture menu when you open the tray menu.")] public bool TrayAutoExpandCaptureMenu { get; set; } diff --git a/ShareX/Forms/ApplicationSettingsForm.cs b/ShareX/Forms/ApplicationSettingsForm.cs index 3581c8e63..cc81ed61e 100644 --- a/ShareX/Forms/ApplicationSettingsForm.cs +++ b/ShareX/Forms/ApplicationSettingsForm.cs @@ -76,7 +76,12 @@ private void LoadSettings() cbStartWithWindows.Checked = ShortcutHelpers.CheckShortcut(Environment.SpecialFolder.Startup); //RegistryHelper.CheckStartWithWindows(); cbShellContextMenu.Checked = RegistryHelpers.CheckShellContextMenu(); cbSendToMenu.Checked = ShortcutHelpers.CheckShortcut(Environment.SpecialFolder.SendTo); + +#if STEAM cbSteamShowInApp.Checked = File.Exists(Helpers.GetAbsolutePath("Steam")); +#else + gbSteam.Visible = false; +#endif // Paths txtPersonalFolderPath.Text = Program.ReadPersonalPathConfig(); @@ -359,6 +364,8 @@ private void cbSteamShowInApp_CheckedChanged(object sender, EventArgs e) { File.Delete(path); } + + MessageBox.Show("For settings to take effect ShareX need to be reopened from Steam.", "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information); } }