changeset 90:f8058cca4c4d draft

Startup folder shortcut opens the program minimized. Restoring a minimized-to-tray window works correctly.
author sirius-m <sirius-m@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
date Sat, 03 Oct 2009 11:52:21 +0000
parents e63a43b47d91
children 7ef6a019cde8
files bugs.txt ui.cpp
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bugs.txt
+++ b/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?)
\ No newline at end of file
--- a/ui.cpp
+++ b/ui.cpp
@@ -3002,6 +3002,7 @@
 
 void CBitcoinTBIcon::Restore() {
     pframeMain->Show();
+    pframeMain->Iconize(false);
     pframeMain->Raise();
     if (!alwaysShowTrayIcon)
     	Hide();
@@ -3296,6 +3297,9 @@
 
     taskBarIcon = new CBitcoinTBIcon();
     ApplyUISettings();
+    if (mapArgs.count("/min") && minimizeToTray) {
+    	pframeMain->Iconize(true);
+    }
 
     return true;
 }
@@ -3408,6 +3412,7 @@
 			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,