diff options
author | Satoshi Nakamoto <satoshin@gmx.com> | 2010-08-13 02:23:46 +0000 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2010-08-13 02:23:46 +0000 |
commit | 7f71fd13ae5c61bf844591d93e74803e85601931 (patch) | |
tree | a9cb89da3ab6261fc5fbf2cdeee70edce373c2e0 /ui.cpp | |
parent | 819adfff6fda7ba2ccf5c4b9fb8b5fdc7a1b535c (diff) |
fix -datadir=./subdir relative path,
autostart off by default except on windows,
fix occasional "vector iterator not dereferencable" assertion with msvc,
fix readlink compile warning on linux build,
use sys/param.h and BSD define instead of __BSD__,
-paytxfee switch
Diffstat (limited to 'ui.cpp')
-rw-r--r-- | ui.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -515,7 +515,7 @@ string SingleLine(const string& strIn) { string strOut; bool fOneSpace = false; - foreach(int c, strIn) + foreach(unsigned char c, strIn) { if (isspace(c)) { @@ -640,7 +640,7 @@ bool CMainFrame::InsertTransaction(const CWalletTx& wtx, bool fNew, int nIndex) { //strDescription += _("Received payment to "); //strDescription += _("Received with address "); - strDescription += _("From: unknown, Received with: "); + strDescription += _("Received with: "); string strAddress = PubKeyToAddress(vchPubKey); map<string, string>::iterator mi = mapAddressBook.find(strAddress); if (mi != mapAddressBook.end() && !(*mi).second.empty()) @@ -1559,6 +1559,11 @@ void SetStartOnSystemStartup(bool fAutoStart) } else { + char pszExePath[MAX_PATH+1]; + memset(pszExePath, 0, sizeof(pszExePath)); + if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) + return; + boost::filesystem::create_directories(GetAutostartDir()); boost::filesystem::ofstream optionFile(GetAutostartFilePath(), ios_base::out|ios_base::trunc); @@ -1568,9 +1573,6 @@ void SetStartOnSystemStartup(bool fAutoStart) return; } // Write a bitcoin.desktop file to the autostart directory: - char pszExePath[MAX_PATH+1]; - memset(pszExePath, 0, sizeof(pszExePath)); - readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1); optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; optionFile << "Name=Bitcoin\n"; @@ -1858,7 +1860,7 @@ void CSendDialog::OnTextAddress(wxCommandEvent& event) { strFromSave = m_textCtrlFrom->GetValue(); strMessageSave = m_textCtrlMessage->GetValue(); - m_textCtrlFrom->SetValue(_("Will appear as \"From: Unknown\"")); + m_textCtrlFrom->SetValue(_("n/a")); m_textCtrlMessage->SetValue(_("Can't include a message when sending to a Bitcoin address")); } else if (fEnable && !fEnabledPrev) |