Skip to content

Commit

Permalink
Don't set maximized config when minimizing
Browse files Browse the repository at this point in the history
Disable pause in right-click menu
  • Loading branch information
Olympic1 committed Nov 5, 2018
2 parents a6938aa + 4379f80 commit c8c8ae6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ protected override void OnLoad(EventArgs e)
CheckTrayState();
InitRefreshTimer();

var winReg = new Win32Registry();
pauseToolStripMenuItem.Enabled = winReg.RefreshRate != 0;

m_UpdateRepoWorker = new BackgroundWorker { WorkerReportsProgress = false, WorkerSupportsCancellation = true };

m_UpdateRepoWorker.RunWorkerCompleted += PostUpdateRepo;
Expand Down Expand Up @@ -1134,9 +1137,13 @@ private void UpdateTrayState()
{
minimizeNotifyIcon.Visible = true;

if (minimizeToTray && WindowState == FormWindowState.Minimized)
if (WindowState == FormWindowState.Minimized)
{
Hide();
if (minimizeToTray)
{
// Remove our taskbar entry
Hide();
}
}
else
{
Expand Down

0 comments on commit c8c8ae6

Please sign in to comment.