Skip to content

Commit

Permalink
Removed "DisableNotifications" option
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaex committed Jul 23, 2024
1 parent 38a02cc commit 8f23b55
Show file tree
Hide file tree
Showing 7 changed files with 3,008 additions and 5,497 deletions.
6 changes: 3 additions & 3 deletions ShareX/Forms/AutoCaptureForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 112,10 @@ private void TakeScreenshot()

if (bmp != null)
{
TaskSettings.UseDefaultAfterCaptureJob = false;
TaskSettings.AfterCaptureJob = TaskSettings.AfterCaptureJob.Remove(AfterCaptureTasks.AnnotateImage);
TaskSettings.UseDefaultAdvancedSettings = false;
TaskSettings.GeneralSettings.DisableNotifications = true;
TaskSettings.GeneralSettings.PlaySoundAfterUpload = false;
TaskSettings.GeneralSettings.PlaySoundAfterAction = false;
TaskSettings.GeneralSettings.ShowToastNotificationAfterTaskCompleted = false;

UploadManager.RunImageTask(bmp, TaskSettings, true, true);
}
Expand Down
88 changes: 39 additions & 49 deletions ShareX/Forms/TaskSettingsForm.Designer.cs

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

18 changes: 6 additions & 12 deletions ShareX/Forms/TaskSettingsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 207,7 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
cbToastWindowMiddleClickAction.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ToastClickAction>());
cbToastWindowMiddleClickAction.SelectedIndex = (int)TaskSettings.GeneralSettings.ToastWindowMiddleClickAction;
cbToastWindowAutoHide.Checked = TaskSettings.GeneralSettings.ToastWindowAutoHide;
cbDisableNotificationsOnFullscreen.Checked = TaskSettings.GeneralSettings.DisableNotificationsOnFullscreen;
cbUseCustomCaptureSound.Checked = TaskSettings.GeneralSettings.UseCustomCaptureSound;
txtCustomCaptureSoundPath.Enabled = btnCustomCaptureSoundPath.Enabled = TaskSettings.GeneralSettings.UseCustomCaptureSound;
txtCustomCaptureSoundPath.Text = TaskSettings.GeneralSettings.CustomCaptureSoundPath;
Expand All @@ -219,8 220,6 @@ public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false)
cbUseCustomErrorSound.Checked = TaskSettings.GeneralSettings.UseCustomErrorSound;
txtCustomErrorSoundPath.Enabled = btnCustomErrorSoundPath.Enabled = TaskSettings.GeneralSettings.UseCustomErrorSound;
txtCustomErrorSoundPath.Text = TaskSettings.GeneralSettings.CustomErrorSoundPath;
cbDisableNotifications.Checked = TaskSettings.GeneralSettings.DisableNotifications;
cbDisableNotificationsOnFullscreen.Checked = TaskSettings.GeneralSettings.DisableNotificationsOnFullscreen;

#endregion

Expand Down Expand Up @@ -887,6 886,11 @@ private void cbToastWindowAutoHide_CheckedChanged(object sender, EventArgs e)
TaskSettings.GeneralSettings.ToastWindowAutoHide = cbToastWindowAutoHide.Checked;
}

private void cbDisableNotificationsOnFullscreen_CheckedChanged(object sender, EventArgs e)
{
TaskSettings.GeneralSettings.DisableNotificationsOnFullscreen = cbDisableNotificationsOnFullscreen.Checked;
}

private void cbUseCustomCaptureSound_CheckedChanged(object sender, EventArgs e)
{
TaskSettings.GeneralSettings.UseCustomCaptureSound = cbUseCustomCaptureSound.Checked;
Expand Down Expand Up @@ -951,16 955,6 @@ private void btnCustomErrorSoundPath_Click(object sender, EventArgs e)
FileHelpers.BrowseFile(txtCustomErrorSoundPath, filter: "Audio file (*.wav)|*.wav");
}

private void cbDisableNotifications_CheckedChanged(object sender, EventArgs e)
{
TaskSettings.GeneralSettings.DisableNotifications = cbDisableNotifications.Checked;
}

private void cbDisableNotificationsOnFullscreen_CheckedChanged(object sender, EventArgs e)
{
TaskSettings.GeneralSettings.DisableNotificationsOnFullscreen = cbDisableNotificationsOnFullscreen.Checked;
}

#endregion General

#region Image
Expand Down
Loading

0 comments on commit 8f23b55

Please sign in to comment.