Merge pull request #492 from gavinandresen/fasterinitialdownload
[novacoin.git] / src / ui.cpp
index 5ca6661..6b7ecdb 100644 (file)
@@ -1032,7 +1032,6 @@ void MainFrameRepaint()
         printf("MainFrameRepaint\n");
         wxPaintEvent event;
         pframeMain->fRefresh = true;
-        pframeMain->fRefreshListCtrl = true;
         pframeMain->GetEventHandler()->AddPendingEvent(event);
     }
 }
@@ -1391,7 +1390,9 @@ void CMainFrame::OnButtonNew(wxCommandEvent& event)
         return;
 
     // Generate new key
-    strAddress = CBitcoinAddress(pwalletMain->GetOrReuseKeyFromPool()).ToString();
+    std::vector<unsigned char> newKey;
+    pwalletMain->GetKeyFromPool(newKey, true);
+    strAddress = CBitcoinAddress(newKey).ToString();
 
     if (fWasLocked)
         pwalletMain->Lock();
@@ -1804,7 +1805,11 @@ void SetStartOnSystemStartup(bool fAutoStart)
 {
     if (!fAutoStart)
     {
+#if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION >= 3
+        unlink(GetAutostartFilePath().string().c_str());
+#else
         unlink(GetAutostartFilePath().native_file_string().c_str());
+#endif
     }
     else
     {
@@ -2171,7 +2176,10 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
                 strError = pwalletMain->SendMoney(scriptPubKey, nValue, wtx, true);
             }
             if (strError == "")
+            {
+                pframeMain->RefreshListCtrl();
                 wxMessageBox(_("Payment sent  "), _("Sending..."));
+            }
             else if (strError == "ABORTED")
             {
                 if (fWasLocked)
@@ -2826,7 +2834,9 @@ void CAddressBookDialog::OnButtonNew(wxCommandEvent& event)
             return;
 
         // Generate new key
-        strAddress = CBitcoinAddress(pwalletMain->GetOrReuseKeyFromPool()).ToString();
+        std::vector<unsigned char> newKey;
+        pwalletMain->GetKeyFromPool(newKey, true);
+        strAddress = CBitcoinAddress(newKey).ToString();
 
         if (fWasLocked)
             pwalletMain->Lock();