Skip to content

Commit

Permalink
Startup folder shortcut opens the program minimized. Restoring a mini…
Browse files Browse the repository at this point in the history
…mized-to-tray window works correctly.

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@12 1a98c847-1fd6-4fd8-948a-caf3550aa51b
  • Loading branch information
non-github-bitcoin committed Oct 3, 2009
1 parent 6d97df0 commit 429187c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion bugs.txt
@@ -1,3 +1,2 @@
Known bugs:
- When the program is minimized to tray, double clicking the icon only restores it to the task bar
- Window flickers when blocks are added (problem with repainting?)
5 changes: 5 additions & 0 deletions ui.cpp
Expand Up @@ -3002,6 +3002,7 @@ void CBitcoinTBIcon::OnMenuRestore(wxCommandEvent&) {

void CBitcoinTBIcon::Restore() {
pframeMain->Show();
pframeMain->Iconize(false);
pframeMain->Raise();
if (!alwaysShowTrayIcon)
Hide();
Expand Down Expand Up @@ -3296,6 +3297,9 @@ bool CMyApp::OnInit2()

taskBarIcon = new CBitcoinTBIcon();
ApplyUISettings();
if (mapArgs.count("/min") && minimizeToTray) {
pframeMain->Iconize(true);
}

return true;
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 429187c

Please sign in to comment.