From 2c06be915de967494920bdbb3096bbb455ccf99f Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Tue, 3 Aug 2010 18:25:05 +0000 Subject: new safety feature displays a warning message and locks down RPC if it detects a problem that may require an upgrade -- version 0.3.8 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@122 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- ui.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ui.cpp') diff --git a/ui.cpp b/ui.cpp index 71455e672a..a2efa638b8 100644 --- a/ui.cpp +++ b/ui.cpp @@ -196,6 +196,8 @@ bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* pa void CalledSetStatusBar(const string& strText, int nField) { + if (nField == 0 && IsLockdown()) + return; if (pframeMain && pframeMain->m_statusBar) pframeMain->m_statusBar->SetStatusText(strText, nField); } @@ -376,7 +378,7 @@ void CMainFrame::OnIconize(wxIconizeEvent& event) // to get rid of the deprecated warning. Just ignore it. if (!event.Iconized()) fClosedToTray = false; -#ifdef __WXGTK__ +#if defined(__WXGTK__) || defined(__WXMAC_OSX__) if (mapArgs.count("-minimizetotray")) { #endif // The tray icon sometimes disappears on ubuntu karmic @@ -1011,6 +1013,13 @@ void CMainFrame::OnPaintListCtrl(wxPaintEvent& event) RefreshStatusColumn(); // Update status bar + static bool fPrevLockdown; + if (IsLockdown()) + m_statusBar->SetStatusText(string(" ") + _("WARNING: Displayed transactions may not be correct! You may need to upgrade."), 0); + else if (fPrevLockdown) + m_statusBar->SetStatusText("", 0); + fPrevLockdown = IsLockdown(); + string strGen = ""; if (fGenerateBitcoins) strGen = _(" Generating"); @@ -1598,7 +1607,7 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent) //m_listBox->Append(_("Test 2")); m_listBox->SetSelection(0); SelectPage(0); -#ifdef __WXGTK__ +#if defined(__WXGTK__) || defined(__WXMAC_OSX__) m_checkBoxStartOnSystemStartup->SetLabel(_("&Start Bitcoin on window system startup")); if (!mapArgs.count("-minimizetotray")) { @@ -2697,7 +2706,7 @@ void CreateMainWindow() pframeMain = new CMainFrame(NULL); if (mapArgs.count("-min")) pframeMain->Iconize(true); -#ifdef __WXGTK__ +#if defined(__WXGTK__) || defined(__WXMAC_OSX__) if (!mapArgs.count("-minimizetotray")) fMinimizeToTray = false; #endif -- cgit v1.2.3