From d93ac19a86366990471d82187da77a75e86d91fb Mon Sep 17 00:00:00 2001 From: Jaex Date: Sun, 25 Jun 2023 00:37:24 +0300 Subject: [PATCH] Moved "AutoCheckUpdate" option to "General" tab --- ShareX/ApplicationConfig.cs | 7 +- .../Forms/ApplicationSettingsForm.Designer.cs | 32 ++++--- ShareX/Forms/ApplicationSettingsForm.cs | 8 ++ ShareX/Forms/ApplicationSettingsForm.resx | 88 ++++++++++++------- 4 files changed, 85 insertions(+), 50 deletions(-) diff --git a/ShareX/ApplicationConfig.cs b/ShareX/ApplicationConfig.cs index 067d5905a..1fa6576c2 100644 --- a/ShareX/ApplicationConfig.cs +++ b/ShareX/ApplicationConfig.cs @@ -72,6 +72,7 @@ public ApplicationConfig() public HotkeyType TrayLeftDoubleClickAction = HotkeyType.OpenMainWindow; public HotkeyType TrayMiddleClickAction = HotkeyType.ClipboardUploadWithContentViewer; + public bool AutoCheckUpdate = true; public bool CheckPreReleaseUpdates = false; #endregion General @@ -169,12 +170,6 @@ public ApplicationConfig() #region Advanced - [Category("Application"), DefaultValue(true), Description("Automatically check updates.")] -#if STEAM || MicrosoftStore - [Browsable(false)] -#endif - public bool AutoCheckUpdate { get; set; } - [Category("Application"), DefaultValue(false), Description("Calculate and show file sizes in binary units (KiB, MiB etc.)")] public bool BinaryUnits { get; set; } diff --git a/ShareX/Forms/ApplicationSettingsForm.Designer.cs b/ShareX/Forms/ApplicationSettingsForm.Designer.cs index 4ca87a153..cd606182e 100644 --- a/ShareX/Forms/ApplicationSettingsForm.Designer.cs +++ b/ShareX/Forms/ApplicationSettingsForm.Designer.cs @@ -75,6 +75,8 @@ private void InitializeComponent() this.cbSendToMenu = new System.Windows.Forms.CheckBox(); this.cbShellContextMenu = new System.Windows.Forms.CheckBox(); this.tpPaths = new System.Windows.Forms.TabPage(); + this.txtSaveImageSubFolderPatternWindow = new System.Windows.Forms.TextBox(); + this.lblSaveImageSubFolderPatternWindow = new System.Windows.Forms.Label(); this.btnPersonalFolderPathApply = new System.Windows.Forms.Button(); this.btnOpenScreenshotsFolder = new System.Windows.Forms.Button(); this.lblPreviewPersonalFolderPath = new System.Windows.Forms.Label(); @@ -179,8 +181,7 @@ private void InitializeComponent() this.tpAdvanced = new System.Windows.Forms.TabPage(); this.pgSettings = new System.Windows.Forms.PropertyGrid(); this.tttvMain = new ShareX.HelpersLib.TabToTreeView(); - this.lblSaveImageSubFolderPatternWindow = new System.Windows.Forms.Label(); - this.txtSaveImageSubFolderPatternWindow = new System.Windows.Forms.TextBox(); + this.cbAutoCheckUpdate = new System.Windows.Forms.CheckBox(); this.tcSettings.SuspendLayout(); this.tpGeneral.SuspendLayout(); this.tpTheme.SuspendLayout(); @@ -236,6 +237,7 @@ private void InitializeComponent() // tpGeneral // this.tpGeneral.BackColor = System.Drawing.SystemColors.Window; + this.tpGeneral.Controls.Add(this.cbAutoCheckUpdate); this.tpGeneral.Controls.Add(this.cbUseWhiteShareXIcon); this.tpGeneral.Controls.Add(this.btnCheckDevBuild); this.tpGeneral.Controls.Add(this.cbCheckPreReleaseUpdates); @@ -577,6 +579,17 @@ private void InitializeComponent() resources.ApplyResources(this.tpPaths, "tpPaths"); this.tpPaths.Name = "tpPaths"; // + // txtSaveImageSubFolderPatternWindow + // + resources.ApplyResources(this.txtSaveImageSubFolderPatternWindow, "txtSaveImageSubFolderPatternWindow"); + this.txtSaveImageSubFolderPatternWindow.Name = "txtSaveImageSubFolderPatternWindow"; + this.txtSaveImageSubFolderPatternWindow.TextChanged += new System.EventHandler(this.txtSaveImageSubFolderPatternWindow_TextChanged); + // + // lblSaveImageSubFolderPatternWindow + // + resources.ApplyResources(this.lblSaveImageSubFolderPatternWindow, "lblSaveImageSubFolderPatternWindow"); + this.lblSaveImageSubFolderPatternWindow.Name = "lblSaveImageSubFolderPatternWindow"; + // // btnPersonalFolderPathApply // resources.ApplyResources(this.btnPersonalFolderPathApply, "btnPersonalFolderPathApply"); @@ -1403,16 +1416,12 @@ private void InitializeComponent() this.tttvMain.TreeViewSize = 175; this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged); // - // lblSaveImageSubFolderPatternWindow + // cbAutoCheckUpdate // - resources.ApplyResources(this.lblSaveImageSubFolderPatternWindow, "lblSaveImageSubFolderPatternWindow"); - this.lblSaveImageSubFolderPatternWindow.Name = "lblSaveImageSubFolderPatternWindow"; - // - // txtSaveImageSubFolderPatternWindow - // - resources.ApplyResources(this.txtSaveImageSubFolderPatternWindow, "txtSaveImageSubFolderPatternWindow"); - this.txtSaveImageSubFolderPatternWindow.Name = "txtSaveImageSubFolderPatternWindow"; - this.txtSaveImageSubFolderPatternWindow.TextChanged += new System.EventHandler(this.txtSaveImageSubFolderPatternWindow_TextChanged); + resources.ApplyResources(this.cbAutoCheckUpdate, "cbAutoCheckUpdate"); + this.cbAutoCheckUpdate.Name = "cbAutoCheckUpdate"; + this.cbAutoCheckUpdate.UseVisualStyleBackColor = true; + this.cbAutoCheckUpdate.CheckedChanged += new System.EventHandler(this.cbAutoCheckUpdate_CheckedChanged); // // ApplicationSettingsForm // @@ -1632,5 +1641,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblClipboardFormatsTip; private System.Windows.Forms.TextBox txtSaveImageSubFolderPatternWindow; private System.Windows.Forms.Label lblSaveImageSubFolderPatternWindow; + private System.Windows.Forms.CheckBox cbAutoCheckUpdate; } } \ No newline at end of file diff --git a/ShareX/Forms/ApplicationSettingsForm.cs b/ShareX/Forms/ApplicationSettingsForm.cs index fdeafce7b..d2340fed7 100644 --- a/ShareX/Forms/ApplicationSettingsForm.cs +++ b/ShareX/Forms/ApplicationSettingsForm.cs @@ -120,16 +120,19 @@ private void UpdateControls() cbTrayMiddleClickAction.SelectedIndex = (int)Program.Settings.TrayMiddleClickAction; #if STEAM || MicrosoftStore + cbAutoCheckUpdate.Visible = false; cbCheckPreReleaseUpdates.Visible = false; btnCheckDevBuild.Visible = false; #else if (SystemOptions.DisableUpdateCheck) { + cbAutoCheckUpdate.Visible = false; cbCheckPreReleaseUpdates.Visible = false; btnCheckDevBuild.Visible = false; } else { + cbAutoCheckUpdate.Checked = Program.Settings.AutoCheckUpdate; cbCheckPreReleaseUpdates.Checked = Program.Settings.CheckPreReleaseUpdates; } #endif @@ -443,6 +446,11 @@ private void btnEditQuickTaskMenu_Click(object sender, EventArgs e) new QuickTaskMenuEditorForm().ShowDialog(); } + private void cbAutoCheckUpdate_CheckedChanged(object sender, EventArgs e) + { + Program.Settings.AutoCheckUpdate = cbAutoCheckUpdate.Checked; + } + private void cbCheckPreReleaseUpdates_CheckedChanged(object sender, EventArgs e) { Program.Settings.CheckPreReleaseUpdates = cbCheckPreReleaseUpdates.Checked; diff --git a/ShareX/Forms/ApplicationSettingsForm.resx b/ShareX/Forms/ApplicationSettingsForm.resx index ac0c7fb97..6ad54866c 100644 --- a/ShareX/Forms/ApplicationSettingsForm.resx +++ b/ShareX/Forms/ApplicationSettingsForm.resx @@ -122,13 +122,40 @@ Top, Bottom, Left, Right + + True + + + + 16, 248 + + + 162, 17 + + + 20 + + + Automatically check updates + + + cbAutoCheckUpdate + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpGeneral + + + 0 + True NoControl - 16, 120 @@ -151,13 +178,13 @@ tpGeneral - 0 + 1 NoControl - 16, 272 + 16, 296 288, 23 @@ -178,7 +205,7 @@ tpGeneral - 1 + 2 True @@ -187,7 +214,7 @@ NoControl - 16, 248 + 16, 272 168, 17 @@ -208,7 +235,7 @@ tpGeneral - 2 + 3 248, 188 @@ -229,7 +256,7 @@ tpGeneral - 3 + 4 True @@ -259,7 +286,7 @@ tpGeneral - 4 + 5 248, 164 @@ -280,7 +307,7 @@ tpGeneral - 5 + 6 True @@ -310,7 +337,7 @@ tpGeneral - 6 + 7 248, 140 @@ -331,7 +358,7 @@ tpGeneral - 7 + 8 True @@ -361,7 +388,7 @@ tpGeneral - 8 + 9 NoControl @@ -388,7 +415,7 @@ tpGeneral - 9 + 10 True @@ -418,7 +445,7 @@ tpGeneral - 10 + 11 True @@ -448,7 +475,7 @@ tpGeneral - 11 + 12 MiddleLeft @@ -487,13 +514,13 @@ btnLanguages - ShareX.HelpersLib.MenuButton, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MenuButton, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null tpGeneral - 12 + 13 True @@ -523,7 +550,7 @@ tpGeneral - 13 + 14 True @@ -553,7 +580,7 @@ tpGeneral - 14 + 15 True @@ -583,7 +610,7 @@ tpGeneral - 15 + 16 True @@ -613,7 +640,7 @@ tpGeneral - 16 + 17 True @@ -643,7 +670,7 @@ tpGeneral - 17 + 18 4, 22 @@ -841,7 +868,7 @@ eiTheme - ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null tpTheme @@ -998,7 +1025,6 @@ Steam - @Invariant gbSteam @@ -1221,7 +1247,6 @@ Windows - @Invariant gbWindows @@ -1381,7 +1406,6 @@ ... - @Invariant lblPreviewPersonalFolderPath @@ -1625,7 +1649,6 @@ ... - @Invariant lblSaveImageSubFolderPatternPreview @@ -2253,7 +2276,6 @@ x - @Invariant lblThumbnailViewThumbnailSizeX @@ -2745,7 +2767,7 @@ lvClipboardFormats - ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null tpClipboardFormats @@ -2796,7 +2818,7 @@ lvSecondaryFileUploaders - ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null gbSecondaryFileUploaders @@ -2877,7 +2899,7 @@ lvSecondaryImageUploaders - ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null gbSecondaryImageUploaders @@ -2928,7 +2950,7 @@ lvSecondaryTextUploaders - ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null gbSecondaryTextUploaders @@ -4038,7 +4060,7 @@ tttvMain - ShareX.HelpersLib.TabToTreeView, ShareX.HelpersLib, Version=13.6.2.0, Culture=neutral, PublicKeyToken=null + ShareX.HelpersLib.TabToTreeView, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null $this