Browse Source

UI tweaks, use BindListenPort to detect instance already running, setsockopt(SO_REUSEADDR) so can bind during TIME_WAIT after exit and restart

0.8
s_nakamoto 15 years ago
parent
commit
1a01afab23
  1. 2
      db.cpp
  2. 8
      main.cpp
  3. 1
      main.h
  4. 98
      net.cpp
  5. 6
      net.h
  6. 122
      ui.cpp
  7. 2
      ui.h
  8. 83
      uibase.cpp
  9. 2
      uibase.h
  10. 87
      uiproject.fbp
  11. 11
      util.cpp

2
db.cpp

@ -139,7 +139,7 @@ void DBFlush(bool fShutdown) @@ -139,7 +139,7 @@ void DBFlush(bool fShutdown)
{
// Flush log data to the actual data file
// on all files that are not in use
printf("DBFlush(%s)\n", fShutdown ? "true" : "false");
printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started");
if (!fDbEnvInit)
return;
CRITICAL_BLOCK(cs_db)

8
main.cpp

@ -42,8 +42,6 @@ map<uint160, vector<unsigned char> > mapPubKeys; @@ -42,8 +42,6 @@ map<uint160, vector<unsigned char> > mapPubKeys;
CCriticalSection cs_mapKeys;
CKey keyUser;
int nDropMessagesTest = 0;
// Settings
int fGenerateBitcoins = false;
int64 nTransactionFee = 0;
@ -1721,9 +1719,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -1721,9 +1719,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
static map<unsigned int, vector<unsigned char> > mapReuseKey;
RandAddSeedPerfmon();
printf("received: %s (%d bytes)\n", strCommand.c_str(), vRecv.size());
if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0)
if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
{
printf("dropmessages DROPPING RECV MESSAGE\n");
printf("dropmessagestest DROPPING RECV MESSAGE\n");
return true;
}
@ -2315,6 +2313,8 @@ void BitcoinMiner() @@ -2315,6 +2313,8 @@ void BitcoinMiner()
Sleep(1000);
if (fShutdown)
return;
if (!fGenerateBitcoins)
return;
}
unsigned int nTransactionsUpdatedLast = nTransactionsUpdated;

1
main.h

@ -34,7 +34,6 @@ extern int nBestHeight; @@ -34,7 +34,6 @@ extern int nBestHeight;
extern uint256 hashBestChain;
extern CBlockIndex* pindexBest;
extern unsigned int nTransactionsUpdated;
extern int nDropMessagesTest;
// Settings
extern int fGenerateBitcoins;

98
net.cpp

@ -511,11 +511,6 @@ void ThreadSocketHandler(void* parg) @@ -511,11 +511,6 @@ void ThreadSocketHandler(void* parg)
PrintException(NULL, "ThreadSocketHandler()");
}
foreach(CNode* pnode, vNodes)
closesocket(pnode->hSocket);
if (closesocket(hListenSocket) == SOCKET_ERROR)
printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
printf("ThreadSocketHandler exiting\n");
}
@ -989,15 +984,13 @@ void ThreadMessageHandler2(void* parg) @@ -989,15 +984,13 @@ void ThreadMessageHandler2(void* parg)
bool StartNode(string& strError)
bool BindListenPort(string& strError)
{
if (pnodeLocalHost == NULL)
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress("127.0.0.1", nLocalServices));
strError = "";
int nOne = 1;
#ifdef __WXMSW__
// Sockets startup
// Initialize Windows Sockets
WSADATA wsadata;
int ret = WSAStartup(MAKEWORD(2,2), &wsadata);
if (ret != NO_ERROR)
@ -1008,33 +1001,6 @@ bool StartNode(string& strError) @@ -1008,33 +1001,6 @@ bool StartNode(string& strError)
}
#endif
// Get local host ip
char pszHostName[255];
if (gethostname(pszHostName, sizeof(pszHostName)) == SOCKET_ERROR)
{
strError = strprintf("Error: Unable to get IP address of this computer (gethostname returned error %d)", WSAGetLastError());
printf("%s\n", strError.c_str());
return false;
}
struct hostent* phostent = gethostbyname(pszHostName);
if (!phostent)
{
strError = strprintf("Error: Unable to get IP address of this computer (gethostbyname returned error %d)", WSAGetLastError());
printf("%s\n", strError.c_str());
return false;
}
// Take the first IP that isn't loopback 127.x.x.x
for (int i = 0; phostent->h_addr_list[i] != NULL; i++)
printf("host ip %d: %s\n", i, CAddress(*(unsigned int*)phostent->h_addr_list[i]).ToStringIP().c_str());
for (int i = 0; phostent->h_addr_list[i] != NULL; i++)
{
addrLocalHost = CAddress(*(unsigned int*)phostent->h_addr_list[i], DEFAULT_PORT, nLocalServices);
if (addrLocalHost.IsValid() && addrLocalHost.GetByte(3) != 127)
break;
}
printf("addrLocalHost = %s\n", addrLocalHost.ToString().c_str());
// Create socket for listening for incoming connections
hListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (hListenSocket == INVALID_SOCKET)
@ -1043,15 +1009,21 @@ bool StartNode(string& strError) @@ -1043,15 +1009,21 @@ bool StartNode(string& strError)
printf("%s\n", strError.c_str());
return false;
}
#if defined(__BSD__) || defined(__WXOSX__)
int set = 1;
setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int));
// Different way of disabling SIGPIPE on BSD
setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int));
#endif
#ifndef __WXMSW__
// Allow binding if the port is still in TIME_WAIT state after
// the program was closed and restarted. Not an issue on windows.
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
#endif
// Set to nonblocking, incoming connections will also inherit this
#ifdef __WXMSW__
u_long nOne = 1;
if (ioctlsocket(hListenSocket, FIONBIO, &nOne) == SOCKET_ERROR)
// Set to nonblocking, incoming connections will also inherit this
if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR)
#else
if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
#endif
@ -1072,7 +1044,7 @@ bool StartNode(string& strError) @@ -1072,7 +1044,7 @@ bool StartNode(string& strError)
{
int nErr = WSAGetLastError();
if (nErr == WSAEADDRINUSE)
strError = strprintf("Error: Unable to bind to port %d on this computer. The program is probably already running.", ntohs(sockaddr.sin_port));
strError = strprintf("Unable to bind to port %d on this computer. Bitcoin may be running already.", ntohs(sockaddr.sin_port));
else
strError = strprintf("Error: Unable to bind to port %d on this computer (bind returned error %d)", ntohs(sockaddr.sin_port), nErr);
printf("%s\n", strError.c_str());
@ -1088,6 +1060,42 @@ bool StartNode(string& strError) @@ -1088,6 +1060,42 @@ bool StartNode(string& strError)
return false;
}
return true;
}
bool StartNode(string& strError)
{
strError = "";
if (pnodeLocalHost == NULL)
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress("127.0.0.1", nLocalServices));
// Get local host ip
char pszHostName[255];
if (gethostname(pszHostName, sizeof(pszHostName)) == SOCKET_ERROR)
{
strError = strprintf("Error: Unable to get IP address of this computer (gethostname returned error %d)", WSAGetLastError());
printf("%s\n", strError.c_str());
return false;
}
struct hostent* phostent = gethostbyname(pszHostName);
if (!phostent)
{
strError = strprintf("Error: Unable to get IP address of this computer (gethostbyname returned error %d)", WSAGetLastError());
printf("%s\n", strError.c_str());
return false;
}
// Take the first IP that isn't loopback 127.x.x.x
for (int i = 0; phostent->h_addr_list[i] != NULL; i++)
printf("host ip %d: %s\n", i, CAddress(*(unsigned int*)phostent->h_addr_list[i]).ToStringIP().c_str());
for (int i = 0; phostent->h_addr_list[i] != NULL; i++)
{
addrLocalHost = CAddress(*(unsigned int*)phostent->h_addr_list[i], DEFAULT_PORT, nLocalServices);
if (addrLocalHost.IsValid() && addrLocalHost.GetByte(3) != 127)
break;
}
printf("addrLocalHost = %s\n", addrLocalHost.ToString().c_str());
// Get our external IP address for incoming connections
if (fUseProxy)
{
@ -1158,9 +1166,5 @@ bool StopNode() @@ -1158,9 +1166,5 @@ bool StopNode()
Sleep(20);
Sleep(50);
// Sockets shutdown
#ifdef __WXMSW__
WSACleanup();
#endif
return true;
}

6
net.h

@ -28,6 +28,7 @@ CNode* FindNode(unsigned int ip); @@ -28,6 +28,7 @@ CNode* FindNode(unsigned int ip);
CNode* ConnectNode(CAddress addrConnect, int64 nTimeout=0);
void AbandonRequests(void (*fn)(void*, CDataStream&), void* param1);
bool AnySubscribed(unsigned int nChannel);
bool BindListenPort(string& strError=REF(string()));
bool StartNode(string& strError=REF(string()));
bool StopNode();
@ -456,6 +457,8 @@ extern CNode* pnodeLocalHost; @@ -456,6 +457,8 @@ extern CNode* pnodeLocalHost;
extern uint64 nLocalHostNonce;
extern bool fShutdown;
extern array<int, 10> vnThreadsRunning;
extern SOCKET hListenSocket;
extern vector<CNode*> vNodes;
extern CCriticalSection cs_vNodes;
extern map<vector<unsigned char>, CAddress> mapAddresses;
@ -647,8 +650,7 @@ public: @@ -647,8 +650,7 @@ public:
void EndMessage()
{
extern int nDropMessagesTest;
if (nDropMessagesTest > 0 && GetRand(nDropMessagesTest) == 0)
if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
{
printf("dropmessages DROPPING SEND MESSAGE\n");
AbortMessage();

122
ui.cpp

@ -181,17 +181,30 @@ void AddToMyProducts(CProduct product) @@ -181,17 +181,30 @@ void AddToMyProducts(CProduct product)
"");
}
void StringMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
void CalledMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y, int* pnRet, bool* pfDone)
{
wxMessageBox(message, caption, style, parent, x, y);
*pnRet = wxMessageBox(message, caption, style, parent, x, y);
*pfDone = true;
}
int ThreadSafeMessageBox(const string& message, const string& caption, int style, wxWindow* parent, int x, int y)
{
#ifdef __WXMSW__
wxMessageBox(message, caption, style, parent, x, y);
return wxMessageBox(message, caption, style, parent, x, y);
#else
UIThreadCall(bind(StringMessageBox, message, caption, style, parent, x, y));
if (wxThread::IsMain())
{
return wxMessageBox(message, caption, style, parent, x, y);
}
else
{
int nRet = 0;
bool fDone = false;
UIThreadCall(bind(CalledMessageBox, message, caption, style, parent, x, y, &nRet, &fDone));
while (!fDone)
Sleep(100);
return nRet;
}
#endif
}
@ -303,6 +316,18 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent) @@ -303,6 +316,18 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
fOnSetFocusAddress = false;
fRefresh = false;
m_choiceFilter->SetSelection(0);
#ifndef __WXMSW__
wxFont fontTmp = m_staticTextBalance->GetFont();
fontTmp.SetPointSize(10);
fontTmp.SetFamily(wxFONTFAMILY_TELETYPE);
m_staticTextBalance->SetFont(fontTmp);
m_staticTextBalance->SetSize(140, 17);
// ampersand underlines aren't working on gtk
m_toolBar->ClearTools();
m_toolBar->AddTool(wxID_BUTTONSEND, "Send Coins", wxBitmap(send20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);
m_toolBar->AddTool(wxID_BUTTONRECEIVE, "Address Book", wxBitmap(addressbook20_xpm), wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString);
m_toolBar->Realize();
#endif
m_staticTextBalance->SetLabel(FormatMoney(GetBalance()) + " ");
m_listCtrl->SetFocus();
SetIcon(wxICON(bitcoin));
@ -998,7 +1023,7 @@ void CMainFrame::OnPaintListCtrl(wxPaintEvent& event) @@ -998,7 +1023,7 @@ void CMainFrame::OnPaintListCtrl(wxPaintEvent& event)
}
void UIThreadCall(boost::function<void ()> fn)
void UIThreadCall(boost::function0<void> fn)
{
// Call this with a function object created with bind.
// bind needs all parameters to match the function's expected types
@ -1009,14 +1034,14 @@ void UIThreadCall(boost::function<void ()> fn) @@ -1009,14 +1034,14 @@ void UIThreadCall(boost::function<void ()> fn)
if (pframeMain)
{
wxCommandEvent event(wxEVT_UITHREADCALL);
event.SetClientData((void*)new boost::function<void ()>(fn));
event.SetClientData((void*)new boost::function0<void>(fn));
pframeMain->GetEventHandler()->AddPendingEvent(event);
}
}
void CMainFrame::OnUIThreadCall(wxCommandEvent& event)
{
boost::function<void ()>* pfn = (boost::function<void ()>*)event.GetClientData();
boost::function0<void>* pfn = (boost::function0<void>*)event.GetClientData();
(*pfn)();
delete pfn;
}
@ -1630,7 +1655,14 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi @@ -1630,7 +1655,14 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi
m_choiceTransferType->SetSelection(0);
m_bitmapCheckMark->Show(false);
fEnabledPrev = true;
m_textCtrlAddress->SetFocus();
//// todo: should add a display of your balance for convenience
#ifndef __WXMSW__
wxFont fontTmp = m_staticTextInstructions->GetFont();
fontTmp.SetPointSize(fontTmp.GetPointSize()-1);
m_staticTextInstructions->SetFont(fontTmp);
SetSize(725, wxDefaultCoord);
#endif
// Set Icon
wxIcon iconSend;
@ -1801,7 +1833,7 @@ CSendingDialog::CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 n @@ -1801,7 +1833,7 @@ CSendingDialog::CSendingDialog(wxWindow* parent, const CAddress& addrIn, int64 n
fUIDone = false;
fWorkDone = false;
SetTitle(strprintf("Sending %s to %s...", FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));
SetTitle(strprintf("Sending %s to %s", FormatMoney(nPrice).c_str(), wtx.mapValue["to"].c_str()));
m_textCtrlStatus->SetValue("");
_beginthread(SendingDialogStartTransfer, 0, this);
@ -3344,16 +3376,19 @@ IMPLEMENT_APP(CMyApp) @@ -3344,16 +3376,19 @@ IMPLEMENT_APP(CMyApp)
bool CMyApp::OnInit()
{
bool fRet = false;
try
{
return OnInit2();
fRet = OnInit2();
}
catch (std::exception& e) {
PrintException(&e, "OnInit()");
} catch (...) {
PrintException(NULL, "OnInit()");
}
return false;
if (!fRet)
Shutdown(NULL);
return fRet;
}
bool CMyApp::OnInit2()
@ -3374,6 +3409,9 @@ bool CMyApp::OnInit2() @@ -3374,6 +3409,9 @@ bool CMyApp::OnInit2()
SetAppName("bitcoin");
#endif
//
// Parameters
//
ParseParameters(argc, argv);
if (mapArgs.count("-?") || mapArgs.count("--help"))
{
@ -3389,7 +3427,27 @@ bool CMyApp::OnInit2() @@ -3389,7 +3427,27 @@ bool CMyApp::OnInit2()
" -connect=<ip>\t Connect only to the specified node\n"
" -?\t\t This help message\n";
wxMessageBox(strUsage, "Bitcoin", wxOK);
exit(0);
return false;
}
if (mapArgs.count("-datadir"))
strlcpy(pszSetDataDir, mapArgs["-datadir"].c_str(), sizeof(pszSetDataDir));
if (mapArgs.count("-debug"))
fDebug = true;
if (mapArgs.count("-printtodebugger"))
fPrintToDebugger = true;
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version %d, OS version %s\n", VERSION, wxGetOsDescription().mb_str());
if (mapArgs.count("-loadblockindextest"))
{
CTxDB txdb("r");
txdb.LoadBlockIndex();
PrintBlockTree();
return false;
}
//
@ -3434,41 +3492,20 @@ bool CMyApp::OnInit2() @@ -3434,41 +3492,20 @@ bool CMyApp::OnInit2()
}
#endif
//
// Parameters
//
if (mapArgs.count("-datadir"))
strlcpy(pszSetDataDir, mapArgs["-datadir"].c_str(), sizeof(pszSetDataDir));
if (mapArgs.count("-debug"))
fDebug = true;
if (mapArgs.count("-printtodebugger"))
fPrintToDebugger = true;
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version %d, OS version %s\n", VERSION, wxGetOsDescription().mb_str());
if (mapArgs.count("-dropmessages"))
{
nDropMessagesTest = atoi(mapArgs["-dropmessages"]);
if (nDropMessagesTest == 0)
nDropMessagesTest = 20;
}
if (mapArgs.count("-loadblockindextest"))
// Bind to the port early so we can tell if another instance is already running.
// This is a backup to wxSingleInstanceChecker, which doesn't work on Linux.
string strErrors;
if (!BindListenPort(strErrors))
{
CTxDB txdb("r");
txdb.LoadBlockIndex();
PrintBlockTree();
exit(0);
wxMessageBox(strErrors, "Bitcoin");
return false;
}
//
// Load data files
//
bool fFirstRun;
string strErrors;
strErrors = "";
int64 nStart;
printf("Loading addresses...\n");
@ -3502,7 +3539,6 @@ bool CMyApp::OnInit2() @@ -3502,7 +3539,6 @@ bool CMyApp::OnInit2()
if (!strErrors.empty())
{
wxMessageBox(strErrors, "Bitcoin");
OnExit();
return false;
}
@ -3515,7 +3551,6 @@ bool CMyApp::OnInit2() @@ -3515,7 +3551,6 @@ bool CMyApp::OnInit2()
if (mapArgs.count("-printblockindex") || mapArgs.count("-printblocktree"))
{
PrintBlockTree();
OnExit();
return false;
}
@ -3539,7 +3574,6 @@ bool CMyApp::OnInit2() @@ -3539,7 +3574,6 @@ bool CMyApp::OnInit2()
}
if (nFound == 0)
printf("No blocks matching %s were found\n", strMatch.c_str());
OnExit();
return false;
}
@ -3558,7 +3592,6 @@ bool CMyApp::OnInit2() @@ -3558,7 +3592,6 @@ bool CMyApp::OnInit2()
if (!addrProxy.IsValid())
{
wxMessageBox("Invalid -proxy address", "Bitcoin");
OnExit();
return false;
}
}
@ -3588,10 +3621,7 @@ bool CMyApp::OnInit2() @@ -3588,10 +3621,7 @@ bool CMyApp::OnInit2()
_beginthread(ThreadDelayedRepaint, 0, NULL);
if (!CheckDiskSpace())
{
OnExit();
return false;
}
RandAddSeedPerfmon();

2
ui.h

@ -24,7 +24,7 @@ extern int fMinimizeOnClose; @@ -24,7 +24,7 @@ extern int fMinimizeOnClose;
extern void HandleCtrlA(wxKeyEvent& event);
extern string FormatTxStatus(const CWalletTx& wtx);
extern void UIThreadCall(boost::function<void ()>);
extern void UIThreadCall(boost::function0<void>);
extern void MainFrameRepaint();
extern void Shutdown(void* parg);
extern int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);

83
uibase.cpp

@ -116,7 +116,7 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString& @@ -116,7 +116,7 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString&
m_staticTextBalance = new wxStaticText( m_panel14, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 120,15 ), wxALIGN_RIGHT|wxST_NO_AUTORESIZE );
m_staticTextBalance->Wrap( -1 );
m_staticTextBalance->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
m_staticTextBalance->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
m_staticTextBalance->SetBackgroundColour( wxColour( 255, 255, 255 ) );
bSizer66->Add( m_staticTextBalance, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
@ -341,10 +341,10 @@ CTxDetailsDialogBase::CTxDetailsDialogBase( wxWindow* parent, wxWindowID id, con @@ -341,10 +341,10 @@ CTxDetailsDialogBase::CTxDetailsDialogBase( wxWindow* parent, wxWindowID id, con
bSizer64->Add( bSizer66, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer65;
bSizer65 = new wxBoxSizer( wxVERTICAL );
bSizer65 = new wxBoxSizer( wxHORIZONTAL );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer65->Add( m_buttonOK, 0, wxALL, 5 );
bSizer65->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer64->Add( bSizer65, 0, wxALIGN_RIGHT, 5 );
@ -521,13 +521,13 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w @@ -521,13 +521,13 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w
bSizer58 = new wxBoxSizer( wxHORIZONTAL );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer58->Add( m_buttonOK, 0, wxALL, 5 );
bSizer58->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer58->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer58->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonApply = new wxButton( this, wxID_APPLY, wxT("&Apply"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer58->Add( m_buttonApply, 0, wxALL, 5 );
bSizer58->Add( m_buttonApply, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer55->Add( bSizer58, 0, wxALIGN_RIGHT, 5 );
@ -619,7 +619,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr @@ -619,7 +619,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr
bSizer61->Add( 0, 0, 1, wxEXPAND, 5 );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer61->Add( m_buttonOK, 0, wxALL, 5 );
bSizer61->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer60->Add( bSizer61, 0, wxALIGN_RIGHT|wxEXPAND, 5 );
@ -655,9 +655,9 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin @@ -655,9 +655,9 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin
fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 );
m_staticText14 = new wxStaticText( this, wxID_ANY, wxT("Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, \nor Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText14->Wrap( -1 );
fgSizer1->Add( m_staticText14, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticTextInstructions = new wxStaticText( this, wxID_ANY, wxT("Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, \nor Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInstructions->Wrap( -1 );
fgSizer1->Add( m_staticTextInstructions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer47;
bSizer47 = new wxBoxSizer( wxHORIZONTAL );
@ -681,11 +681,16 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin @@ -681,11 +681,16 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin
m_textCtrlAddress = new wxTextCtrl( this, wxID_TEXTCTRLPAYTO, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer19->Add( m_textCtrlAddress, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxBoxSizer* bSizer66;
bSizer66 = new wxBoxSizer( wxHORIZONTAL );
m_buttonPaste = new wxButton( this, wxID_BUTTONPASTE, wxT("&Paste"), wxDefaultPosition, wxSize( -1,-1 ), wxBU_EXACTFIT );
bSizer19->Add( m_buttonPaste, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizer66->Add( m_buttonPaste, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
m_buttonAddress = new wxButton( this, wxID_BUTTONADDRESSBOOK, wxT(" Address &Book..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer19->Add( m_buttonAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizer66->Add( m_buttonAddress, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND, 5 );
bSizer19->Add( bSizer66, 0, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer1->Add( bSizer19, 1, wxEXPAND|wxRIGHT, 5 );
@ -764,10 +769,10 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin @@ -764,10 +769,10 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin
m_buttonSend = new wxButton( this, wxID_BUTTONSEND, wxT("&Send"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_buttonSend->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
bSizer23->Add( m_buttonSend, 0, wxALL, 5 );
bSizer23->Add( m_buttonSend, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer23->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer23->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer21->Add( bSizer23, 0, wxEXPAND, 5 );
@ -827,10 +832,10 @@ CSendingDialogBase::CSendingDialogBase( wxWindow* parent, wxWindowID id, const w @@ -827,10 +832,10 @@ CSendingDialogBase::CSendingDialogBase( wxWindow* parent, wxWindowID id, const w
m_buttonOK = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->Enable( false );
bSizer69->Add( m_buttonOK, 0, wxALL, 5 );
bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer69->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer68->Add( bSizer69, 0, wxEXPAND, 5 );
@ -877,21 +882,21 @@ CYourAddressDialogBase::CYourAddressDialogBase( wxWindow* parent, wxWindowID id, @@ -877,21 +882,21 @@ CYourAddressDialogBase::CYourAddressDialogBase( wxWindow* parent, wxWindowID id,
bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
m_buttonRename = new wxButton( this, wxID_BUTTONRENAME, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_buttonRename, 0, wxALL, 5 );
bSizer69->Add( m_buttonRename, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonNew = new wxButton( this, wxID_BUTTONNEW, wxT(" &New Address... "), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer69->Add( m_buttonNew, 0, wxALL, 5 );
bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCopy = new wxButton( this, wxID_BUTTONCOPY, wxT(" &Copy to Clipboard "), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer69->Add( m_buttonCopy, 0, wxALL, 5 );
bSizer69->Add( m_buttonCopy, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_buttonOK, 0, wxALL, 5 );
bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_buttonCancel->Hide();
bSizer69->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer68->Add( bSizer69, 0, wxEXPAND, 5 );
@ -950,19 +955,19 @@ CAddressBookDialogBase::CAddressBookDialogBase( wxWindow* parent, wxWindowID id, @@ -950,19 +955,19 @@ CAddressBookDialogBase::CAddressBookDialogBase( wxWindow* parent, wxWindowID id,
bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
m_buttonEdit = new wxButton( this, wxID_BUTTONEDIT, wxT("&Edit..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_buttonEdit, 0, wxALL, 5 );
bSizer69->Add( m_buttonEdit, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonNew = new wxButton( this, wxID_BUTTONNEW, wxT(" &New Address... "), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_buttonNew, 0, wxALL, 5 );
bSizer69->Add( m_buttonNew, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonDelete = new wxButton( this, wxID_BUTTONDELETE, wxT("&Delete"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_buttonDelete, 0, wxALL, 5 );
bSizer69->Add( m_buttonDelete, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer69->Add( m_buttonOK, 0, wxALL, 5 );
bSizer69->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer69->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer69->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer68->Add( bSizer69, 0, wxEXPAND, 5 );
@ -1360,13 +1365,13 @@ CEditProductDialogBase::CEditProductDialogBase( wxWindow* parent, wxWindowID id, @@ -1360,13 +1365,13 @@ CEditProductDialogBase::CEditProductDialogBase( wxWindow* parent, wxWindowID id,
bSizer26 = new wxBoxSizer( wxHORIZONTAL );
m_buttonOK = new wxButton( this, wxID_BUTTONSEND, wxT("&Send"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonOK, 0, wxALL, 5 );
bSizer26->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonPreview = new wxButton( this, wxID_BUTTONPREVIEW, wxT("&Preview"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonPreview, 0, wxALL, 5 );
bSizer26->Add( m_buttonPreview, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer26->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 );
@ -1551,10 +1556,10 @@ CViewProductDialogBase::CViewProductDialogBase( wxWindow* parent, wxWindowID id, @@ -1551,10 +1556,10 @@ CViewProductDialogBase::CViewProductDialogBase( wxWindow* parent, wxWindowID id,
bSizer25 = new wxBoxSizer( wxHORIZONTAL );
m_buttonSubmitForm = new wxButton( m_scrolledWindow, wxID_BUTTONSAMPLE, wxT("&Submit"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer25->Add( m_buttonSubmitForm, 0, wxALL, 5 );
bSizer25->Add( m_buttonSubmitForm, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancelForm = new wxButton( m_scrolledWindow, wxID_CANCEL2, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer25->Add( m_buttonCancelForm, 0, wxALL, 5 );
bSizer25->Add( m_buttonCancelForm, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer21->Add( bSizer25, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
@ -1571,13 +1576,13 @@ CViewProductDialogBase::CViewProductDialogBase( wxWindow* parent, wxWindowID id, @@ -1571,13 +1576,13 @@ CViewProductDialogBase::CViewProductDialogBase( wxWindow* parent, wxWindowID id,
m_buttonBack = new wxButton( this, wxID_BUTTONBACK, wxT("< &Back "), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonBack->Enable( false );
bSizer26->Add( m_buttonBack, 0, wxALL, 5 );
bSizer26->Add( m_buttonBack, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonNext = new wxButton( this, wxID_BUTTONNEXT, wxT(" &Next >"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonNext, 0, wxALL, 5 );
bSizer26->Add( m_buttonNext, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer26->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 );
@ -1622,7 +1627,7 @@ CViewOrderDialogBase::CViewOrderDialogBase( wxWindow* parent, wxWindowID id, con @@ -1622,7 +1627,7 @@ CViewOrderDialogBase::CViewOrderDialogBase( wxWindow* parent, wxWindowID id, con
bSizer26 = new wxBoxSizer( wxHORIZONTAL );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer26->Add( m_buttonOK, 0, wxALL, 5 );
bSizer26->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer20->Add( bSizer26, 0, wxALIGN_RIGHT, 5 );
@ -1678,10 +1683,10 @@ CEditReviewDialogBase::CEditReviewDialogBase( wxWindow* parent, wxWindowID id, c @@ -1678,10 +1683,10 @@ CEditReviewDialogBase::CEditReviewDialogBase( wxWindow* parent, wxWindowID id, c
bSizer113 = new wxBoxSizer( wxHORIZONTAL );
m_buttonSubmit = new wxButton( this, wxID_SUBMIT, wxT("&Submit"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer113->Add( m_buttonSubmit, 0, wxALL, 5 );
bSizer113->Add( m_buttonSubmit, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer113->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer113->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer112->Add( bSizer113, 0, wxALIGN_RIGHT, 5 );
@ -1745,10 +1750,10 @@ CGetTextFromUserDialogBase::CGetTextFromUserDialogBase( wxWindow* parent, wxWind @@ -1745,10 +1750,10 @@ CGetTextFromUserDialogBase::CGetTextFromUserDialogBase( wxWindow* parent, wxWind
bSizer80->Add( 0, 0, 1, wxEXPAND, 5 );
m_buttonOK = new wxButton( this, wxID_OK, wxT("OK"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
bSizer80->Add( m_buttonOK, 0, wxALL, 5 );
bSizer80->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer80->Add( m_buttonCancel, 0, wxALL, 5 );
bSizer80->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizer79->Add( bSizer80, 0, wxEXPAND, 5 );

2
uibase.h

@ -277,7 +277,7 @@ class CSendDialogBase : public wxDialog @@ -277,7 +277,7 @@ class CSendDialogBase : public wxDialog
protected:
wxStaticText* m_staticText14;
wxStaticText* m_staticTextInstructions;
wxStaticBitmap* m_bitmapCheckMark;
wxStaticText* m_staticText36;

87
uiproject.fbp

@ -225,7 +225,7 @@ @@ -225,7 +225,7 @@
</object>
</object>
</object>
<object class="wxToolBar" expanded="0">
<object class="wxToolBar" expanded="1">
<property name="bg"></property>
<property name="bitmapsize">20,20</property>
<property name="context_help"></property>
@ -708,7 +708,7 @@ @@ -708,7 +708,7 @@
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg">wxSYS_COLOUR_WINDOW</property>
<property name="bg">255,255,255</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
@ -1627,11 +1627,11 @@ @@ -1627,11 +1627,11 @@
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer65</property>
<property name="orient">wxVERTICAL</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3014,7 +3014,7 @@ @@ -3014,7 +3014,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3066,7 +3066,7 @@ @@ -3066,7 +3066,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3118,7 +3118,7 @@ @@ -3118,7 +3118,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3476,7 +3476,7 @@ @@ -3476,7 +3476,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3638,7 +3638,7 @@ @@ -3638,7 +3638,7 @@
<property name="label">Enter the recipient&apos;s IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, &#x0A;or Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online.</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticText14</property>
<property name="name">m_staticTextInstructions</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
@ -3861,7 +3861,16 @@ @@ -3861,7 +3861,16 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer66</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3913,7 +3922,7 @@ @@ -3913,7 +3922,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -3965,6 +3974,8 @@ @@ -3965,6 +3974,8 @@
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_RIGHT</property>
@ -4472,7 +4483,7 @@ @@ -4472,7 +4483,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -4524,7 +4535,7 @@ @@ -4524,7 +4535,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -4762,7 +4773,7 @@ @@ -4762,7 +4773,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -4814,7 +4825,7 @@ @@ -4814,7 +4825,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5076,7 +5087,7 @@ @@ -5076,7 +5087,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5128,7 +5139,7 @@ @@ -5128,7 +5139,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5180,7 +5191,7 @@ @@ -5180,7 +5191,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5232,7 +5243,7 @@ @@ -5232,7 +5243,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5284,7 +5295,7 @@ @@ -5284,7 +5295,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5546,7 +5557,7 @@ @@ -5546,7 +5557,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5598,7 +5609,7 @@ @@ -5598,7 +5609,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5650,7 +5661,7 @@ @@ -5650,7 +5661,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5702,7 +5713,7 @@ @@ -5702,7 +5713,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -5754,7 +5765,7 @@ @@ -5754,7 +5765,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10212,7 +10223,7 @@ @@ -10212,7 +10223,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10264,7 +10275,7 @@ @@ -10264,7 +10275,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10316,7 +10327,7 @@ @@ -10316,7 +10327,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10665,7 +10676,7 @@ @@ -10665,7 +10676,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10717,7 +10728,7 @@ @@ -10717,7 +10728,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10785,7 +10796,7 @@ @@ -10785,7 +10796,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10837,7 +10848,7 @@ @@ -10837,7 +10848,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -10889,7 +10900,7 @@ @@ -10889,7 +10900,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -11074,7 +11085,7 @@ @@ -11074,7 +11085,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -11475,7 +11486,7 @@ @@ -11475,7 +11486,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -11527,7 +11538,7 @@ @@ -11527,7 +11538,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -11902,7 +11913,7 @@ @@ -11902,7 +11913,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
@ -11954,7 +11965,7 @@ @@ -11954,7 +11965,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>

11
util.cpp

@ -53,6 +53,17 @@ public: @@ -53,6 +53,17 @@ public:
for (int i = 0; i < CRYPTO_num_locks(); i++)
delete ppmutexOpenSSL[i];
OPENSSL_free(ppmutexOpenSSL);
// Close sockets
foreach(CNode* pnode, vNodes)
closesocket(pnode->hSocket);
if (closesocket(hListenSocket) == SOCKET_ERROR)
printf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
#ifdef __WXMSW__
// Shutdown Windows Sockets
WSACleanup();
#endif
}
}
instance_of_cinit;

Loading…
Cancel
Save