From f01a4ca4e207801911f082719dd24e0f018edd67 Mon Sep 17 00:00:00 2001 From: sirius-m Date: Sat, 3 Oct 2009 11:52:21 +0000 Subject: Startup folder shortcut opens the program minimized. Restoring a minimized-to-tray window works correctly. --- ui.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui.cpp') diff --git a/ui.cpp b/ui.cpp index e69630d398..e7be55da3c 100644 --- a/ui.cpp +++ b/ui.cpp @@ -3002,6 +3002,7 @@ void CBitcoinTBIcon::OnMenuRestore(wxCommandEvent&) { void CBitcoinTBIcon::Restore() { pframeMain->Show(); + pframeMain->Iconize(false); pframeMain->Raise(); if (!alwaysShowTrayIcon) Hide(); @@ -3296,6 +3297,9 @@ bool CMyApp::OnInit2() taskBarIcon = new CBitcoinTBIcon(); ApplyUISettings(); + if (mapArgs.count("/min") && minimizeToTray) { + pframeMain->Iconize(true); + } return true; } @@ -3408,6 +3412,7 @@ void ApplyUISettings() { IPersistFile* ppf = NULL; // Set the path to the shortcut target psl->SetPath(exePath); + psl->SetArguments("/min"); // Query IShellLink for the IPersistFile interface for // saving the shortcut in persistent storage. hres = psl->QueryInterface(IID_IPersistFile, -- cgit v1.2.3