Merge branch '0.5.0.x' into 0.5.x
[novacoin.git] / src / qt / bitcoin.cpp
index 311fab3..4fed781 100644 (file)
@@ -171,7 +171,7 @@ int main(int argc, char *argv[])
         {
             {
                 // Put this in a block, so that BitcoinGUI is cleaned up properly before
-                // calling Shutdown().
+                // calling Shutdown() in case of exceptions.
                 BitcoinGUI window;
                 if (splashref)
                     splash.finish(&window);
@@ -183,7 +183,15 @@ int main(int argc, char *argv[])
                 window.setClientModel(&clientModel);
                 window.setWalletModel(&walletModel);
 
-                window.show();
+                // If -min option passed, start window minimized.
+                if(GetBoolArg("-min"))
+                {
+                    window.showMinimized();
+                }
+                else
+                {
+                    window.show();
+                }
 
                 app.exec();