diff -ur filezilla-3.7.3/configure.in filezilla-3.7.3.wx3/configure.in --- filezilla-3.7.3/configure.in 2013-08-07 19:25:47.000000000 +0200 +++ filezilla-3.7.3.wx3/configure.in 2014-01-19 12:53:48.734827302 +0100 @@ -111,9 +111,6 @@ equivalent variable and wxWidgets version is $MIN_WX_VERSION or above. ]) fi - if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt "8"; then - AC_MSG_ERROR([You need to use wxWidgets 2.8.x to compile this program.]) - fi # --universal=no doesn't work correctly, it still accepts universal builds. Reject it manually here. if echo "$WX_CPPFLAGS" | grep __WXUNIVERSAL__ > /dev/null; then diff -ur filezilla-3.7.3/m4/wxwin.m4 filezilla-3.7.3.wx3/m4/wxwin.m4 --- filezilla-3.7.3/m4/wxwin.m4 2013-04-05 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/m4/wxwin.m4 2014-01-19 12:53:48.734827302 +0100 @@ -169,7 +169,7 @@ if test -n "$wx_ver_ok"; then AC_MSG_RESULT(yes (version $WX_VERSION)) - WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` + WX_LIBS="`$WX_CONFIG_WITH_ARGS --libs` -lwx_gtk2_aui-3.0" dnl is this even still appropriate? --static is a real option now dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is diff -ur filezilla-3.7.3/src/engine/ControlSocket.cpp filezilla-3.7.3.wx3/src/engine/ControlSocket.cpp --- filezilla-3.7.3/src/engine/ControlSocket.cpp 2013-06-09 05:30:07.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/ControlSocket.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -120,7 +120,7 @@ msg = _("Critical file transfer error after transferring %s in %s"); else msg = _("File transfer failed after transferring %s in %s"); - LogMessage(msgType, msg, size.c_str(), time.c_str()); + LogMessage(msgType, msg, (const char *)size.c_str(), (const char *)time.c_str()); } else { @@ -421,7 +421,7 @@ if (!defaultPath.IsEmpty()) { - LogMessage(Debug_Warning, _T("Assuming path is '%s'."), defaultPath.GetPath().c_str()); + LogMessage(Debug_Warning, _T("Assuming path is '%s'."), (const char *)defaultPath.GetPath().c_str()); m_CurrentPath = defaultPath; return true; } @@ -999,7 +999,7 @@ { if (error != EAGAIN) { - LogMessage(::Error, _("Could not write to socket: %s"), CSocket::GetErrorDescription(error).c_str()); + LogMessage(::Error, _("Could not write to socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); LogMessage(::Error, _("Disconnected from server")); DoClose(); return false; @@ -1034,17 +1034,17 @@ case CSocketEvent::hostaddress: { const wxString& address = event.GetData(); - LogMessage(Status, _("Connecting to %s..."), address.c_str()); + LogMessage(Status, _("Connecting to %s..."), (const char *)address.c_str()); } break; case CSocketEvent::connection_next: if (event.GetError()) - LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), CSocket::GetErrorDescription(event.GetError()).c_str()); + LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str()); break; case CSocketEvent::connection: if (event.GetError()) { - LogMessage(Status, _("Connection attempt failed with \"%s\"."), CSocket::GetErrorDescription(event.GetError()).c_str()); + LogMessage(Status, _("Connection attempt failed with \"%s\"."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str()); OnClose(event.GetError()); } else @@ -1097,7 +1097,7 @@ { if (error != EAGAIN) { - LogMessage(::Error, _("Could not write to socket: %s"), CSocket::GetErrorDescription(error).c_str()); + LogMessage(::Error, _("Could not write to socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); if (GetCurrentCommandId() != cmd_connect) LogMessage(::Error, _("Disconnected from server")); DoClose(); @@ -1134,7 +1134,7 @@ if (!error) LogMessage(::Error, _("Connection closed by server")); else - LogMessage(::Error, _("Disconnected from server: %s"), CSocket::GetErrorDescription(error).c_str()); + LogMessage(::Error, _("Disconnected from server: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); } DoClose(); } @@ -1145,7 +1145,7 @@ if (server.GetEncodingType() == ENCODING_CUSTOM) { - LogMessage(Debug_Info, _T("Using custom encoding: %s"), server.GetCustomEncoding().c_str()); + LogMessage(Debug_Info, _T("Using custom encoding: %s"), (const char *)server.GetCustomEncoding().c_str()); m_pCSConv = new wxCSConv(server.GetCustomEncoding()); } @@ -1166,7 +1166,7 @@ const int proxy_type = m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_TYPE); if (proxy_type > CProxySocket::unknown && proxy_type < CProxySocket::proxytype_count && !m_pCurrentServer->GetBypassProxy()) { - LogMessage(::Status, _("Connecting to %s through proxy"), m_pCurrentServer->FormatHost().c_str()); + LogMessage(::Status, _("Connecting to %s through proxy"), (const char *)m_pCurrentServer->FormatHost().c_str()); host = m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST); port = m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_PORT); @@ -1181,7 +1181,7 @@ if (res != EINPROGRESS) { - LogMessage(::Error, _("Could not start proxy handshake: %s"), CSocket::GetErrorDescription(res).c_str()); + LogMessage(::Error, _("Could not start proxy handshake: %s"), (const char *)CSocket::GetErrorDescription(res).c_str()); DoClose(); return FZ_REPLY_ERROR; } @@ -1201,14 +1201,14 @@ } } if (!IsIpAddress(host)) - LogMessage(Status, _("Resolving address of %s"), host.c_str()); + LogMessage(Status, _("Resolving address of %s"), (const char *)host.c_str()); int res = m_pSocket->Connect(host, port); // Treat success same as EINPROGRESS, we wait for connect notification in any case if (res && res != EINPROGRESS) { - LogMessage(::Error, _("Could not connect to server: %s"), CSocket::GetErrorDescription(res).c_str()); + LogMessage(::Error, _("Could not connect to server: %s"), (const char *)CSocket::GetErrorDescription(res).c_str()); DoClose(); return FZ_REPLY_ERROR; } @@ -1273,11 +1273,11 @@ if (pData->download) { wxString filename = pData->remotePath.FormatFilename(pData->remoteFile); - LogMessage(Status, _("Skipping download of %s"), filename.c_str()); + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); } ResetOperation(FZ_REPLY_OK); } @@ -1292,11 +1292,11 @@ if (pData->download) { wxString filename = pData->remotePath.FormatFilename(pData->remoteFile); - LogMessage(Status, _("Skipping download of %s"), filename.c_str()); + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); } ResetOperation(FZ_REPLY_OK); } @@ -1317,11 +1317,11 @@ if (pData->download) { wxString filename = pData->remotePath.FormatFilename(pData->remoteFile); - LogMessage(Status, _("Skipping download of %s"), filename.c_str()); + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); } ResetOperation(FZ_REPLY_OK); } @@ -1383,11 +1383,11 @@ if (pData->download) { wxString filename = pData->remotePath.FormatFilename(pData->remoteFile); - LogMessage(Status, _("Skipping download of %s"), filename.c_str()); + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); } ResetOperation(FZ_REPLY_OK); break; @@ -1485,4 +1485,4 @@ int CControlSocket::Chmod(const CChmodCommand&) { return FZ_REPLY_NOTSUPPORTED; -} \ No newline at end of file +} diff -ur filezilla-3.7.3/src/engine/directorylistingparser.cpp filezilla-3.7.3.wx3/src/engine/directorylistingparser.cpp --- filezilla-3.7.3/src/engine/directorylistingparser.cpp 2013-04-05 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/directorylistingparser.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -1,6 +1,7 @@ #include #include "directorylistingparser.h" #include "ControlSocket.h" +#include "logging_private.h" #ifdef _DEBUG #define new DEBUG_NEW diff -ur filezilla-3.7.3/src/engine/ftpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/ftpcontrolsocket.cpp --- filezilla-3.7.3/src/engine/ftpcontrolsocket.cpp 2013-06-09 05:30:07.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/ftpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -228,7 +228,7 @@ { if (error != EAGAIN) { - LogMessage(::Error, _("Could not read from socket: %s"), CSocket::GetErrorDescription(error).c_str()); + LogMessage(::Error, _("Could not read from socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); if (GetCurrentCommandId() != cmd_connect) LogMessage(::Error, _("Disconnected from server")); DoClose(); @@ -541,7 +541,7 @@ pData->loginSequence.push_back(cmd); } // User@host - t_loginCommand cmd = {false, false, user, wxString::Format(_T("USER %s@%s"), server.GetUser().c_str(), server.FormatHost().c_str())}; + t_loginCommand cmd = {false, false, user, wxString::Format(_T("USER %s@%s"), (const char *)server.GetUser().c_str(), (const char *)server.FormatHost().c_str())}; pData->loginSequence.push_back(cmd); // Password @@ -2063,7 +2063,7 @@ case cwd_pwd_cwd: if (code != 2 && code != 3) { - LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), pData->path.GetPath().c_str()); + LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), (const char *)pData->path.GetPath().c_str()); m_CurrentPath = pData->path; if (pData->target.IsEmpty()) @@ -2131,7 +2131,7 @@ { if (!assumedPath.IsEmpty()) { - LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), assumedPath.GetPath().c_str()); + LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), (const char *)assumedPath.GetPath().c_str()); m_CurrentPath = assumedPath; if (pData->target.IsEmpty()) @@ -2253,11 +2253,11 @@ if (download) { wxString filename = remotePath.FormatFilename(remoteFile); - LogMessage(Status, _("Starting download of %s"), filename.c_str()); + LogMessage(Status, _("Starting download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Starting upload of %s"), localFile.c_str()); + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str()); } if (m_pCurOpData) { @@ -2645,7 +2645,7 @@ if (!pFile->Open(pData->localFile, wxFile::write_append)) { delete pFile; - LogMessage(::Error, _("Failed to open \"%s\" for appending/writing"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to open \"%s\" for appending/writing"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -2686,7 +2686,7 @@ if (!pFile->Open(pData->localFile, wxFile::write)) { delete pFile; - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -2707,7 +2707,7 @@ if (!pFile->Open(pData->localFile, wxFile::read)) { delete pFile; - LogMessage(::Error, _("Failed to open \"%s\" for reading"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to open \"%s\" for reading"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -2723,7 +2723,7 @@ if (pFile->Seek(startOffset, wxFromStart) == wxInvalidOffset) { delete pFile; - LogMessage(::Error, _("Could not seek to offset %s within file"), wxLongLong(startOffset).ToString().c_str()); + LogMessage(::Error, _("Could not seek to offset %s within file"), (const char *)wxLongLong(startOffset).ToString().c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -3125,7 +3125,7 @@ wxString filename = pData->path.FormatFilename(file, pData->omitPath); if (filename == _T("")) { - LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), pData->path.GetPath().c_str(), file.c_str()); + LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), (const char *)pData->path.GetPath().c_str(), (const char *)file.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -3213,7 +3213,7 @@ if (!pData->fullPath.AddSegment(subDir)) { - LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), path.GetPath().c_str(), subDir.c_str()); + LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), (const char *)path.GetPath().c_str(), (const char *)subDir.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -3328,7 +3328,7 @@ */ if (!m_pCurOpData) - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str()); + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str()); CMkdirOpData *pData = new CMkdirOpData; pData->path = path; @@ -3559,7 +3559,7 @@ return FZ_REPLY_ERROR; } - LogMessage(Status, _("Renaming '%s' to '%s'"), command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), command.GetToPath().FormatFilename(command.GetToFile()).c_str()); + LogMessage(Status, _("Renaming '%s' to '%s'"), (const char *)command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), (const char *)command.GetToPath().FormatFilename(command.GetToFile()).c_str()); CFtpRenameOpData *pData = new CFtpRenameOpData(command); pData->opState = rename_rnfrom; @@ -3711,7 +3711,7 @@ return FZ_REPLY_ERROR; } - LogMessage(Status, _("Set permissions of '%s' to '%s'"), command.GetPath().FormatFilename(command.GetFile()).c_str(), command.GetPermission().c_str()); + LogMessage(Status, _("Set permissions of '%s' to '%s'"), (const char *)command.GetPath().FormatFilename(command.GetFile()).c_str(), (const char *)command.GetPermission().c_str()); CFtpChmodOpData *pData = new CFtpChmodOpData(command); pData->opState = chmod_chmod; @@ -3881,13 +3881,13 @@ if (m_pEngine->GetOptions()->GetOptionVal(OPTION_PASVREPLYFALLBACKMODE) != 1 || pData->bTriedActive) { LogMessage(Status, _("Server sent passive reply with unroutable address. Using server address instead.")); - LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), pData->host.c_str(), peerIP.c_str()); + LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), (const char *)pData->host.c_str(), (const char *)peerIP.c_str()); pData->host = peerIP; } else { LogMessage(Status, _("Server sent passive reply with unroutable address. Passive mode failed.")); - LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), pData->host.c_str(), peerIP.c_str()); + LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), (const char *)pData->host.c_str(), (const char *)peerIP.c_str()); return false; } } @@ -3944,7 +3944,7 @@ wxString resolverAddress = m_pEngine->GetOptions()->GetOption(OPTION_EXTERNALIPRESOLVER); - LogMessage(::Debug_Info, _("Retrieving external IP address from %s"), resolverAddress.c_str()); + LogMessage(::Debug_Info, _("Retrieving external IP address from %s"), (const char *)resolverAddress.c_str()); m_pIPResolver = new CExternalIPResolver(this); m_pIPResolver->GetExternalIP(resolverAddress, CSocket::ipv4); @@ -4445,7 +4445,7 @@ return FZ_REPLY_ERROR; } - LogMessage(Status, _("Using proxy %s"), m_pEngine->GetOptions()->GetOption(OPTION_FTP_PROXY_HOST).c_str()); + LogMessage(Status, _("Using proxy %s"), (const char *)m_pEngine->GetOptions()->GetOption(OPTION_FTP_PROXY_HOST).c_str()); } else { diff -ur filezilla-3.7.3/src/engine/httpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/httpcontrolsocket.cpp --- filezilla-3.7.3/src/engine/httpcontrolsocket.cpp 2012-11-02 05:30:06.000000000 +0100 +++ filezilla-3.7.3.wx3/src/engine/httpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -355,7 +355,7 @@ { LogMessage(Debug_Verbose, _T("CHttpControlSocket::FileTransfer()")); - LogMessage(Status, _("Downloading %s"), remotePath.FormatFilename(remoteFile).c_str()); + LogMessage(Status, _("Downloading %s"), (const char *)remotePath.FormatFilename(remoteFile).c_str()); if (!download) { @@ -388,7 +388,7 @@ if (!pData->pFile->Open(pData->localFile, wxFile::write)) { - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -445,7 +445,7 @@ if (!pData->pFile->Open(pData->localFile, wxFile::write)) { - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -471,10 +471,10 @@ hostWithPort = pData->m_newHostWithPort; } - wxString action = wxString::Format(_T("GET %s HTTP/1.1"), location.c_str()); + wxString action = wxString::Format(_T("GET %s HTTP/1.1"), (const char *)location.c_str()); LogMessageRaw(Command, action); - wxString command = wxString::Format(_T("%s\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: close\r\n\r\n"), action.c_str(), hostWithPort.c_str(), wxString(PACKAGE_STRING, wxConvLocal).c_str()); + wxString command = wxString::Format(_T("%s\r\nHost: %s\r\nUser-Agent: %s\r\nConnection: close\r\n\r\n"), (const char *)action.c_str(), (const char *)hostWithPort.c_str(), wxString(PACKAGE_STRING, wxConvLocal).c_str()); const wxWX2MBbuf str = command.mb_str(); if (!Send(str, strlen(str))) @@ -494,7 +494,7 @@ pData->tls = tls; if (!IsIpAddress(host)) - LogMessage(Status, _("Resolving address of %s"), host.c_str()); + LogMessage(Status, _("Resolving address of %s"), (const char *)host.c_str()); pData->host = host; return DoInternalConnect(); @@ -563,7 +563,7 @@ if (pData->pFile->Write(p, len) != len) { - LogMessage(::Error, _("Failed to write to file %s"), pData->localFile.c_str()); + LogMessage(::Error, _("Failed to write to file %s"), (const char *)pData->localFile.c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -716,7 +716,7 @@ ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } - pData->m_newHostWithPort = wxString::Format(_T("%s:%d"), host.c_str(), (int)port); + pData->m_newHostWithPort = wxString::Format(_T("%s:%d"), (const char *)host.c_str(), (int)port); // International domain names host = ConvertDomainName(host); @@ -769,7 +769,7 @@ { if (*p < '0' || *p > '9') { - LogMessage(::Error, _("Malformed header: %s"), _("Invalid Content-Length")); + LogMessage(::Error, _("Malformed header: %s"), (const char *)_("Invalid Content-Length").c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -824,7 +824,7 @@ { if (p[i + 1] != '\n') { - LogMessage(::Error, _("Malformed chunk data: %s"), _("Wrong line endings")); + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Wrong line endings").c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -836,7 +836,7 @@ if (len == m_recvBufferLen) { // We don't support lines larger than 4096 - LogMessage(::Error, _("Malformed chunk data: %s"), _("Line length exceeded")); + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Line length exceeded").c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -851,7 +851,7 @@ { // The chunk data has to end with CRLF. If i is nonzero, // it didn't end with just CRLF. - LogMessage(::Error, _("Malformed chunk data: %s"), _("Chunk data improperly terminated")); + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Chunk data improperly terminated").c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -893,7 +893,7 @@ else { // Invalid size - LogMessage(::Error, _("Malformed chunk data: %s"), _("Invalid chunk size")); + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Invalid chunk size").c_str()); ResetOperation(FZ_REPLY_ERROR); return FZ_REPLY_ERROR; } @@ -950,7 +950,7 @@ if (error) { - LogMessage(::Error, _("Disconnected from server: %s"), CSocket::GetErrorDescription(error).c_str()); + LogMessage(::Error, _("Disconnected from server: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); ResetOperation(FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED); return; } diff -ur filezilla-3.7.3/src/engine/local_path.cpp filezilla-3.7.3.wx3/src/engine/local_path.cpp --- filezilla-3.7.3/src/engine/local_path.cpp 2011-05-02 05:30:19.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/local_path.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -1,6 +1,7 @@ #include #include "local_path.h" #include "string_coalescer.h" +#include "logging_private.h" #ifndef __WXMSW__ #include #endif @@ -120,7 +121,8 @@ return false; } - wxChar* start = m_path.GetWriteBuf(path.Len() + 2); + wxStringBuffer strbuf(m_path, path.Len() + 2); + wxChar* start = strbuf; wxChar* out = start; *out++ = '/'; @@ -211,7 +213,7 @@ *out = 0; - m_path.UngetWriteBuf( out - start ); + strbuf.~wxStringBuffer(); ::Coalesce(m_path); @@ -495,20 +497,20 @@ return true; if (error) - error->Printf(_("'%s' is not a directory."), path.c_str()); + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str()); return false; } else if (result == ENOTDIR) { if (error) - error->Printf(_("'%s' is not a directory."), path.c_str()); + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str()); return false; } else { if (error) - error->Printf(_("'%s' does not exist or cannot be accessed."), path.c_str()); + error->Printf(_("'%s' does not exist or cannot be accessed."), (const char *)path.c_str()); return false; } #endif @@ -599,4 +601,4 @@ void CLocalPath::Coalesce() { ::Coalesce(m_path); -} \ No newline at end of file +} diff -ur filezilla-3.7.3/src/engine/logging_private.h filezilla-3.7.3.wx3/src/engine/logging_private.h --- filezilla-3.7.3/src/engine/logging_private.h 2008-12-14 04:00:47.000000000 +0100 +++ filezilla-3.7.3.wx3/src/engine/logging_private.h 2014-01-19 12:53:48.734827302 +0100 @@ -1,6 +1,9 @@ #ifndef __LOGGING_PRIVATE_H__ #define __LOGGING_PRIVATE_H__ +#include +#include + class CLogging { public: diff -ur filezilla-3.7.3/src/engine/misc.cpp filezilla-3.7.3.wx3/src/engine/misc.cpp --- filezilla-3.7.3/src/engine/misc.cpp 2012-10-24 05:30:07.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/misc.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -363,12 +363,7 @@ void MakeLowerAscii(wxString& str) { - for (size_t i = 0; i < str.Len(); i++) - { - wxChar& c = str[i]; - if (c >= 'A' && c <= 'Z') - c += 32; - } + str.MakeLower(); } wxString GetDependencyVersion(dependency::type d) diff -ur filezilla-3.7.3/src/engine/proxy.cpp filezilla-3.7.3.wx3/src/engine/proxy.cpp --- filezilla-3.7.3/src/engine/proxy.cpp 2012-11-02 05:30:06.000000000 +0100 +++ filezilla-3.7.3.wx3/src/engine/proxy.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -169,11 +169,11 @@ case CSocketEvent::hostaddress: { const wxString& address = event.GetData(); - m_pOwner->LogMessage(Status, _("Connecting to %s..."), address.c_str()); + m_pOwner->LogMessage(Status, _("Connecting to %s..."), (const char *)address.c_str()); } case CSocketEvent::connection_next: if (event.GetError()) - m_pOwner->LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), CSocket::GetErrorDescription(event.GetError()).c_str()); + m_pOwner->LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str()); break; case CSocketEvent::connection: if (event.GetError()) @@ -306,7 +306,7 @@ wxASSERT(end); *end = 0; wxString reply(m_pRecvBuffer, wxConvUTF8); - m_pOwner->LogMessage(Response, _("Proxy reply: %s"), reply.c_str()); + m_pOwner->LogMessage(Response, _("Proxy reply: %s"), (const char *)reply.c_str()); if (reply.Left(10) != _T("HTTP/1.1 2") && reply.Left(10) != _T("HTTP/1.0 2")) { @@ -455,7 +455,7 @@ break; } - m_pOwner->LogMessage(Debug_Warning, _("Proxy request failed: %s"), error.c_str()); + m_pOwner->LogMessage(Debug_Warning, _("Proxy request failed: %s"), (const char *)error.c_str()); m_proxyState = noconn; CSocketEvent *evt = new CSocketEvent(m_pEvtHandler, this, CSocketEvent::close, ECONNABORTED); CSocketEventDispatcher::Get().SendEvent(evt); diff -ur filezilla-3.7.3/src/engine/server.cpp filezilla-3.7.3.wx3/src/engine/server.cpp --- filezilla-3.7.3/src/engine/server.cpp 2013-01-14 05:30:09.000000000 +0100 +++ filezilla-3.7.3.wx3/src/engine/server.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -1,4 +1,5 @@ #include +#include "logging_private.h" struct t_protocolInfo { @@ -12,13 +13,13 @@ }; static const t_protocolInfo protocolInfos[] = { - { FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - File Transfer Protocol with optional encryption"), true }, + { FTP, _T("ftp"), false, 21, true, (const wxChar*)wxTRANSLATE("FTP - File Transfer Protocol with optional encryption"), true }, { SFTP, _T("sftp"), true, 22, false, _T("SFTP - SSH File Transfer Protocol"), false }, { HTTP, _T("http"), true, 80, false, _T("HTTP - Hypertext Transfer Protocol"), true }, - { HTTPS, _T("https"), true, 443, true, wxTRANSLATE("HTTPS - HTTP over TLS"), true }, - { FTPS, _T("ftps"), true, 990, true, wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), true }, - { FTPES, _T("ftpes"), true, 21, true, wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), true }, - { INSECURE_FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - Insecure File Transfer Protocol"), true }, + { HTTPS, _T("https"), true, 443, true, (const wxChar*)wxTRANSLATE("HTTPS - HTTP over TLS"), true }, + { FTPS, _T("ftps"), true, 990, true, (const wxChar*)wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), true }, + { FTPES, _T("ftpes"), true, 21, true, (const wxChar*)wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), true }, + { INSECURE_FTP, _T("ftp"), false, 21, true, (const wxChar*)wxTRANSLATE("FTP - Insecure File Transfer Protocol"), true }, { UNKNOWN, _T(""), false, 21, false, _T("") } }; diff -ur filezilla-3.7.3/src/engine/serverpath.cpp filezilla-3.7.3.wx3/src/engine/serverpath.cpp --- filezilla-3.7.3/src/engine/serverpath.cpp 2013-04-05 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/serverpath.cpp 2014-01-19 12:53:48.734827302 +0100 @@ -276,7 +276,8 @@ len += iter->Length() + 2 + INTLENGTH; wxString safepath; - wxChar* start = safepath.GetWriteBuf(len); + wxStringBuffer strbuf(safepath, len); + wxChar* start = strbuf; wxChar* t = start; t = fast_sprint_number(t, m_type); @@ -300,7 +301,7 @@ } *t = 0; - safepath.UngetWriteBuf( t - start ); + strbuf.~wxStringBuffer(); safepath.Shrink(); return safepath; diff -ur filezilla-3.7.3/src/engine/sftpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/sftpcontrolsocket.cpp --- filezilla-3.7.3/src/engine/sftpcontrolsocket.cpp 2013-06-09 05:30:07.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/sftpcontrolsocket.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -391,7 +391,7 @@ int CSftpControlSocket::Connect(const CServer &server) { - LogMessage(Status, _("Connecting to %s..."), server.FormatHost().c_str()); + LogMessage(Status, _("Connecting to %s..."), (const char *)server.FormatHost().c_str()); SetWait(true); m_sftpEncryptionDetails = CSftpEncryptionNotification(); @@ -399,7 +399,7 @@ delete m_pCSConv; if (server.GetEncodingType() == ENCODING_CUSTOM) { - LogMessage(Debug_Info, _T("Using custom encoding: %s"), server.GetCustomEncoding().c_str()); + LogMessage(Debug_Info, _T("Using custom encoding: %s"), (const char *)server.GetCustomEncoding().c_str()); m_pCSConv = new wxCSConv(server.GetCustomEncoding()); m_useUTF8 = false; } @@ -431,7 +431,7 @@ wxString executable = m_pEngine->GetOptions()->GetOption(OPTION_FZSFTP_EXECUTABLE); if (executable == _T("")) executable = _T("fzsftp"); - LogMessage(Debug_Verbose, _T("Going to execute %s"), executable.c_str()); + LogMessage(Debug_Verbose, _T("Going to execute %s"), (const char *)executable.c_str()); m_pid = wxExecute(executable + _T(" -v"), wxEXEC_ASYNC, m_pProcess); if (!m_pid) @@ -460,7 +460,7 @@ int CSftpControlSocket::ConnectParseResponse(bool successful, const wxString& reply) { - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), reply.c_str()); + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), (const char *)reply.c_str()); if (!successful) { @@ -556,7 +556,7 @@ } wxString cmd = wxString::Format(_T("proxy %d \"%s\" %d"), type, - m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST).c_str(), + (const char *)m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST).c_str(), m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_PORT)); wxString user = m_pEngine->GetOptions()->GetOption(OPTION_PROXY_USER); if (user != _T("")) @@ -577,7 +577,7 @@ res = Send(_T("keyfile \"") + pData->pKeyFiles->GetNextToken() + _T("\"")); break; case connect_open: - res = Send(wxString::Format(_T("open \"%s@%s\" %d"), m_pCurrentServer->GetUser().c_str(), m_pCurrentServer->GetHost().c_str(), m_pCurrentServer->GetPort())); + res = Send(wxString::Format(_T("open \"%s@%s\" %d"), (const char *)m_pCurrentServer->GetUser().c_str(), (const char *)m_pCurrentServer->GetHost().c_str(), (const char *)m_pCurrentServer->GetPort())); break; default: LogMessage(__TFILE__, __LINE__, this, Debug_Warning, _T("Unknown op state: %d"), pData->opState); @@ -989,7 +989,7 @@ int CSftpControlSocket::ListParseResponse(bool successful, const wxString& reply) { - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), reply.c_str()); + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), (const char *)reply.c_str()); if (!m_pCurOpData) { @@ -1631,11 +1631,11 @@ if (download) { wxString filename = remotePath.FormatFilename(remoteFile); - LogMessage(Status, _("Starting download of %s"), filename.c_str()); + LogMessage(Status, _("Starting download of %s"), (const char *)filename.c_str()); } else { - LogMessage(Status, _("Starting upload of %s"), localFile.c_str()); + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str()); } if (m_pCurOpData) { @@ -2045,7 +2045,7 @@ */ if (!m_pCurOpData) - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str()); + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str()); CMkdirOpData *pData = new CMkdirOpData; pData->path = path; @@ -2308,7 +2308,7 @@ wxString filename = pData->path.FormatFilename(file); if (filename == _T("")) { - LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), pData->path.GetPath().c_str(), file.c_str()); + LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), (const char *)pData->path.GetPath().c_str(), (const char *)file.c_str()); return FZ_REPLY_ERROR; } @@ -2353,7 +2353,7 @@ if (!fullPath.AddSegment(subDir)) { - LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), path.GetPath().c_str(), subDir.c_str()); + LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), (const char *)path.GetPath().c_str(), (const char *)subDir.c_str()); return FZ_REPLY_ERROR; } } @@ -2433,7 +2433,7 @@ return FZ_REPLY_ERROR; } - LogMessage(Status, _("Set permissions of '%s' to '%s'"), command.GetPath().FormatFilename(command.GetFile()).c_str(), command.GetPermission().c_str()); + LogMessage(Status, _("Set permissions of '%s' to '%s'"), (const char *)command.GetPath().FormatFilename(command.GetFile()).c_str(), (const char *)command.GetPermission().c_str()); CSftpChmodOpData *pData = new CSftpChmodOpData(command); pData->opState = chmod_chmod; @@ -2555,7 +2555,7 @@ return FZ_REPLY_ERROR; } - LogMessage(Status, _("Renaming '%s' to '%s'"), command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), command.GetToPath().FormatFilename(command.GetToFile()).c_str()); + LogMessage(Status, _("Renaming '%s' to '%s'"), (const char *)command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), (const char *)command.GetToPath().FormatFilename(command.GetToFile()).c_str()); CSftpRenameOpData *pData = new CSftpRenameOpData(command); pData->opState = rename_rename; diff -ur filezilla-3.7.3/src/engine/sizeformatting_base.cpp filezilla-3.7.3.wx3/src/engine/sizeformatting_base.cpp --- filezilla-3.7.3/src/engine/sizeformatting_base.cpp 2010-09-14 05:30:20.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/sizeformatting_base.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -1,6 +1,7 @@ #include #include "sizeformatting_base.h" #include "optionsbase.h" +#include "logging_private.h" #ifndef __WXMSW__ #include #endif diff -ur filezilla-3.7.3/src/engine/socket.cpp filezilla-3.7.3.wx3/src/engine/socket.cpp --- filezilla-3.7.3/src/engine/socket.cpp 2013-06-10 20:45:04.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/socket.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -1,4 +1,5 @@ #include +#include #ifdef __WXMSW__ // MinGW needs this for getaddrinfo #if defined(_WIN32_WINNT) @@ -1273,7 +1274,7 @@ } } -#define ERRORDECL(c, desc) { c, _T(#c), wxTRANSLATE(desc) }, +#define ERRORDECL(c, desc) { c, _T(#c), (const wxChar*)wxTRANSLATE(desc) }, struct Error_table { diff -ur filezilla-3.7.3/src/engine/string_coalescer.cpp filezilla-3.7.3.wx3/src/engine/string_coalescer.cpp --- filezilla-3.7.3/src/engine/string_coalescer.cpp 2012-10-06 05:30:12.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/string_coalescer.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -66,7 +66,8 @@ { // wxString is CoW, yet it doesn't even do this fast pointer // comparison in it's less and/or equal operator(s). - return lhs.c_str() == rhs.c_str() || lhs == rhs; + return lhs == rhs; +// return lhs.c_str() == rhs.c_str() || lhs == rhs; } }; diff -ur filezilla-3.7.3/src/engine/tlssocket.cpp filezilla-3.7.3.wx3/src/engine/tlssocket.cpp --- filezilla-3.7.3/src/engine/tlssocket.cpp 2013-06-01 09:37:58.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/tlssocket.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -23,7 +23,7 @@ return; wxString s(msg, wxConvLocal); s.Trim(); - pLoggingControlSocket->LogMessage(Debug_Debug, _T("tls: %d %s"), level, s.c_str()); + pLoggingControlSocket->LogMessage(Debug_Debug, _T("tls: %d %s"), level, (const char *)s.c_str()); } #endif @@ -207,16 +207,16 @@ wxString str(error); #endif if (function.IsEmpty()) - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d: %s"), code, str.c_str()); + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d: %s"), code, (const char *)str.c_str()); else - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s: %s"), code, function.c_str(), str.c_str()); + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s: %s"), code, (const char *)function.c_str(), (const char *)str.c_str()); } else { if (function.IsEmpty()) m_pOwner->LogMessage(::Error, _T("GnuTLS error %d"), code); else - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s"), code, function.c_str()); + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s"), code, (const char *)function.c_str()); } } @@ -231,7 +231,7 @@ #else wxString str(alert); #endif - m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d: %s"), last_alert, str.c_str()); + m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d: %s"), last_alert, (const char *)str.c_str()); } else m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d"), last_alert); @@ -535,7 +535,7 @@ const wxString cipherName = GetCipherName(); const wxString macName = GetMacName(); - m_pOwner->LogMessage(Debug_Info, _T("Protocol: %s, Key exchange: %s, Cipher: %s, MAC: %s"), protocol.c_str(), keyExchange.c_str(), cipherName.c_str(), macName.c_str()); + m_pOwner->LogMessage(Debug_Info, _T("Protocol: %s, Key exchange: %s, Cipher: %s, MAC: %s"), (const char *)protocol.c_str(), (const char *)keyExchange.c_str(), (const char *)cipherName.c_str(), (const char *)macName.c_str()); res = VerifyCertificate(); if (res != FZ_REPLY_OK) @@ -1235,7 +1235,7 @@ if (priority.IsEmpty()) priority = wxString::FromUTF8(ciphers); - wxString list = wxString::Format(_T("Ciphers for %s:\n"), priority.c_str()); + wxString list = wxString::Format(_T("Ciphers for %s:\n"), (const char *)priority.c_str()); #if GNUTLS_VERSION_NUMBER >= 0x030009 gnutls_priority_t pcache; @@ -1243,7 +1243,7 @@ int ret = gnutls_priority_init(&pcache, priority.mb_str(), &err); if (ret < 0) { - list += wxString::Format(_T("gnutls_priority_init failed with code %d: %s"), ret, wxString::FromUTF8(err ? err : "").c_str()); + list += wxString::Format(_T("gnutls_priority_init failed with code %d: %s"), ret, (const char *)wxString::FromUTF8(err ? err : "").c_str()); return list; } else @@ -1265,10 +1265,10 @@ { list += wxString::Format( _T("%-50s 0x%02x, 0x%02x %s\n"), - wxString::FromUTF8(name).c_str(), + (const char *)wxString::FromUTF8(name).c_str(), (unsigned char)id[0], (unsigned char)id[1], - wxString::FromUTF8(gnutls_protocol_get_name(version)).c_str()); + (const char *)wxString::FromUTF8(gnutls_protocol_get_name(version)).c_str()); } } } diff -ur filezilla-3.7.3/src/engine/transfersocket.cpp filezilla-3.7.3.wx3/src/engine/transfersocket.cpp --- filezilla-3.7.3/src/engine/transfersocket.cpp 2013-06-10 20:45:04.000000000 +0200 +++ filezilla-3.7.3.wx3/src/engine/transfersocket.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -98,14 +98,14 @@ delete m_pSocketServer; m_pSocketServer = 0; - m_pControlSocket->LogMessage(::Debug_Warning, _T("GetLocalPort failed: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Debug_Warning, _T("GetLocalPort failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); return _T(""); } wxString portArguments; if (m_pSocketServer->GetAddressFamily() == CSocket::ipv6) { - portArguments = wxString::Format(_T("|2|%s|%d|"), ip.c_str(), port); + portArguments = wxString::Format(_T("|2|%s|%d|"), (const char *)ip.c_str(), port); } else { @@ -128,7 +128,7 @@ const int error = event.GetError(); if (error) { - m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(failure); } else @@ -142,7 +142,7 @@ case CSocketEvent::close: { const int error = event.GetError(); - m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(failure); } return; @@ -169,7 +169,7 @@ { if (!m_transferEndReason) { - m_pControlSocket->LogMessage(::Error, _("The data connection could not be established: %s"), CSocket::GetErrorDescription(event.GetError()).c_str()); + m_pControlSocket->LogMessage(::Error, _("The data connection could not be established: %s"), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str()); TransferEnd(transfer_failure); } } @@ -212,7 +212,7 @@ m_pControlSocket->LogMessage(::Debug_Verbose, _T("No pending connection")); else { - m_pControlSocket->LogMessage(::Status, _("Could not accept connection: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Status, _("Could not accept connection: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); } return; @@ -284,7 +284,7 @@ delete [] pBuffer; if (error != EAGAIN) { - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); } else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) @@ -330,7 +330,7 @@ { if (error != EAGAIN) { - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); } else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) @@ -372,7 +372,7 @@ { if (error != EAGAIN) { - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); } else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) @@ -467,7 +467,7 @@ } else { - m_pControlSocket->LogMessage(Error, _T("Could not write to transfer socket: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(Error, _T("Could not write to transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); } } @@ -506,7 +506,7 @@ if (error) { - m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); return; } @@ -530,7 +530,7 @@ } else if (numread < 0 && error != EAGAIN) { - m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), CSocket::GetErrorDescription(error).c_str()); + m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), (const char *)CSocket::GetErrorDescription(error).c_str()); TransferEnd(transfer_failure); return; } @@ -647,7 +647,7 @@ int res = pServer->Listen(m_pControlSocket->m_pSocket->GetAddressFamily(), port); if (res) { - m_pControlSocket->LogMessage(::Debug_Verbose, _T("Could not listen on port %d: %s"), port, CSocket::GetErrorDescription(res).c_str()); + m_pControlSocket->LogMessage(::Debug_Verbose, _T("Could not listen on port %d: %s"), port, (const char *)CSocket::GetErrorDescription(res).c_str()); delete pServer; return 0; } @@ -717,7 +717,7 @@ { wxString error = pData->pIOThread->GetError(); if (error != _T("")) - m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), error.c_str()); + m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), (const char *)error.c_str()); else m_pControlSocket->LogMessage(::Error, _("Can't write data to file.")); TransferEnd(transfer_failure_critical); @@ -791,7 +791,7 @@ { wxString error = pData->pIOThread->GetError(); if (error != _T("")) - m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), error.c_str()); + m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), (const char *)error.c_str()); else m_pControlSocket->LogMessage(::Error, _("Can't write data to file.")); TransferEnd(transfer_failure_critical); diff -ur filezilla-3.7.3/src/interface/aui_notebook_ex.cpp filezilla-3.7.3.wx3/src/interface/aui_notebook_ex.cpp --- filezilla-3.7.3/src/interface/aui_notebook_ex.cpp 2013-02-10 05:30:06.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/aui_notebook_ex.cpp 2014-01-19 13:14:07.434818480 +0100 @@ -3,8 +3,6 @@ #include "aui_notebook_ex.h" #include -wxColor wxAuiStepColour(const wxColor& c, int ialpha); - #ifdef __WXMSW__ #define TABCOLOUR wxSYS_COLOUR_3DFACE #else @@ -67,8 +65,8 @@ m_original_dc->DrawRectangle(x, y, width, height); else { - wxColour new_init = wxAuiStepColour(c, 150); - wxColour new_dest = wxAuiStepColour(c, 100); + wxColour new_init = c.ChangeLightness(150); + wxColour new_dest = c.ChangeLightness(100); m_original_dc->GradientFillLinear(wxRect(x, y, width + 1, height), new_init, new_dest, wxNORTH); } } @@ -77,7 +75,7 @@ { wxColour c = wxSystemSettings::GetColour(TABCOLOUR); if (c.Red() + c.Green() + c.Blue() < 384) - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(c, 100))); + m_original_dc->SetBrush(wxBrush(c.ChangeLightness(100))); m_original_dc->DrawRectangle(x, y, width, height); } } @@ -96,8 +94,8 @@ } // Dark theme - wxColour new_init = wxAuiStepColour(initialColour, 100); - wxColour new_dest = wxAuiStepColour(initialColour, 120); + wxColour new_init = initialColour.ChangeLightness(100); + wxColour new_dest = initialColour.ChangeLightness(120); m_original_dc->GradientFillLinear(rect, new_init, new_dest, nDirection); } else if (!m_type) @@ -120,12 +118,12 @@ if (m_gradient_called == 1) { // Lighter inner border - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(destColour, 105))); - m_original_dc->SetPen(wxPen(wxAuiStepColour(destColour, 105))); + m_original_dc->SetBrush(wxBrush(destColour.ChangeLightness(105))); + m_original_dc->SetPen(wxPen(destColour.ChangeLightness(105))); m_original_dc->DrawRectangle(r2); - wxColour new_init = wxAuiStepColour(destColour, 95); - wxColour new_dest = wxAuiStepColour(destColour, 65); + wxColour new_init = destColour.ChangeLightness(95); + wxColour new_dest = destColour.ChangeLightness(65); m_original_dc->GradientFillLinear(r, new_init, new_dest, nDirection); if (!m_bottom) @@ -145,11 +143,11 @@ r2.height += 1; // Lighter inner border - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(destColour, 105))); - m_original_dc->SetPen(wxPen(wxAuiStepColour(destColour, 105))); + m_original_dc->SetBrush(wxBrush(destColour.ChangeLightness(105))); + m_original_dc->SetPen(wxPen(destColour.ChangeLightness(105))); m_original_dc->DrawRectangle(r2); - wxColour new_dest = wxAuiStepColour(destColour, 65); + wxColour new_dest = destColour.ChangeLightness(65); if (!m_bottom) r.height++; m_original_dc->GradientFillLinear(r, new_dest, new_dest, nDirection); @@ -171,13 +169,13 @@ wxColour new_init, new_dest; if (m_bottom) { - new_init = wxAuiStepColour(c, 70); - new_dest = wxAuiStepColour(c, 100); + new_init = c.ChangeLightness(70); + new_dest = c.ChangeLightness(100); } else { - new_init = wxAuiStepColour(c, 85); - new_dest = wxAuiStepColour(c, 100); + new_init = c.ChangeLightness(85); + new_dest = c.ChangeLightness(100); } m_original_dc->GradientFillLinear(rect, new_init, new_dest, nDirection); } @@ -185,7 +183,7 @@ } #ifdef __WXGTK__ - virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); } +// virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); } #endif protected: int m_gradient_called; @@ -215,9 +213,9 @@ virtual wxAuiTabArt* Clone() { wxAuiTabArtEx *art = new wxAuiTabArtEx(m_pNotebook, m_bottom, m_data); - art->SetNormalFont(m_normal_font); - art->SetSelectedFont(m_selected_font); - art->SetMeasuringFont(m_measuring_font); + art->SetNormalFont(m_normalFont); + art->SetSelectedFont(m_selectedFont); + art->SetMeasuringFont(m_measuringFont); return art; } @@ -257,12 +255,12 @@ int* x_extent) { #ifndef __WXMAC__ - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); #endif if (!pane.active) { - if (m_base_colour.Red() + m_base_colour.Green() + m_base_colour.Blue() >= 384) - m_base_colour = wxColour( m_base_colour.Red() * 0.95, m_base_colour.Green() * 0.95, m_base_colour.Blue() * 0.95 ); + if (m_baseColour.Red() + m_baseColour.Green() + m_baseColour.Blue() >= 384) + m_baseColour = wxColour( m_baseColour.Red() * 0.95, m_baseColour.Green() * 0.95, m_baseColour.Blue() * 0.95 ); dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); if (m_pNotebook->Highlighted(m_pNotebook->GetPageIndex(pane.window))) @@ -270,26 +268,26 @@ if (!m_fonts_initialized) { m_fonts_initialized = true; - m_original_normal_font = m_normal_font; - m_highlighted_font = m_normal_font; + m_original_normal_font = m_normalFont; + m_highlighted_font = m_normalFont; m_highlighted_font.SetWeight(wxFONTWEIGHT_BOLD); m_highlighted_font.SetStyle(wxFONTSTYLE_ITALIC); } - m_normal_font = m_highlighted_font; + m_normalFont = m_highlighted_font; } else if (m_fonts_initialized) - m_normal_font = m_original_normal_font; + m_normalFont = m_original_normal_font; } - CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tab_ctrl_height % 2) != 0, m_bottom); + CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tabCtrlHeight % 2) != 0, m_bottom); wxAuiDefaultTabArt::DrawTab(*((wxDC*)&filter_dc), wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent); - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); } virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) { - CFilterDC filter_dc(dc, 2, (m_tab_ctrl_height % 2) != 0, m_bottom); + CFilterDC filter_dc(dc, 2, (m_tabCtrlHeight % 2) != 0, m_bottom); wxAuiDefaultTabArt::DrawBackground(*((wxDC*)&filter_dc), wnd, rect); } protected: diff -ur filezilla-3.7.3/src/interface/commandqueue.cpp filezilla-3.7.3.wx3/src/interface/commandqueue.cpp --- filezilla-3.7.3/src/interface/commandqueue.cpp 2013-05-13 05:30:10.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/commandqueue.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -289,7 +289,7 @@ wxCommandEvent evt(fzEVT_GRANTEXCLUSIVEENGINEACCESS); evt.SetId(m_requestId); - m_pMainFrame->GetQueue()->AddPendingEvent(evt); + m_pMainFrame->GetQueue()->GetEventHandler()->AddPendingEvent(evt); } CFileZillaEngine* CCommandQueue::GetEngineExclusive(int requestId) diff -ur filezilla-3.7.3/src/interface/filelistctrl.cpp filezilla-3.7.3.wx3/src/interface/filelistctrl.cpp --- filezilla-3.7.3/src/interface/filelistctrl.cpp 2012-11-15 05:30:05.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/filelistctrl.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -11,6 +11,7 @@ #ifdef __WXGTK__ #include #endif +#include #ifndef __WXMSW__ DECLARE_EVENT_TYPE(fz_EVT_FILELIST_FOCUSCHANGE, -1) diff -ur filezilla-3.7.3/src/interface/import.cpp filezilla-3.7.3.wx3/src/interface/import.cpp --- filezilla-3.7.3/src/interface/import.cpp 2012-10-06 05:30:11.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/import.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -145,8 +145,8 @@ pass[i + 2] < '0' || pass[i + 2] > '9') return _T(""); int number = (pass[i] - '0') * 100 + - (pass[i + 1] - '0') * 10 + - pass[i + 2] - '0'; + ((char)pass[i + 1] - '0') * 10 + + (char)pass[i + 2] - '0'; wxChar c = number ^ key[(i / 3 + pos) % strlen(key)]; output += c; } diff -ur filezilla-3.7.3/src/interface/led.cpp filezilla-3.7.3.wx3/src/interface/led.cpp --- filezilla-3.7.3/src/interface/led.cpp 2012-12-03 05:30:05.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/led.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -1,6 +1,7 @@ #include #include "led.h" #include "filezillaapp.h" +#include #ifdef _DEBUG #define new DEBUG_NEW diff -ur filezilla-3.7.3/src/interface/Mainfrm.cpp filezilla-3.7.3.wx3/src/interface/Mainfrm.cpp --- filezilla-3.7.3/src/interface/Mainfrm.cpp 2013-06-25 19:11:01.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/Mainfrm.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -754,14 +754,13 @@ // Do a crude approach: Drop everything unexpected... for (unsigned int i = 0; i < version.Len(); i++) { - wxChar& c = version[i]; if ((version[i] >= '0' && version[i] <= '9') || (version[i] >= 'a' && version[i] <= 'z') || (version[i] >= 'A' && version[i] <= 'Z') || version[i] == '-' || version[i] == '.' || version[i] == '_') { - url += c; + url += version[i]; } } } @@ -779,7 +778,7 @@ { pStatusBar->Show(show); wxSizeEvent evt; - controls->pLocalListViewPanel->ProcessEvent(evt); + controls->pLocalListViewPanel->GetEventHandler()->ProcessEvent(evt); } } if (controls && controls->pRemoteListViewPanel) @@ -789,7 +788,7 @@ { pStatusBar->Show(show); wxSizeEvent evt; - controls->pRemoteListViewPanel->ProcessEvent(evt); + controls->pRemoteListViewPanel->GetEventHandler()->ProcessEvent(evt); } } } diff -ur filezilla-3.7.3/src/interface/netconfwizard.cpp filezilla-3.7.3.wx3/src/interface/netconfwizard.cpp --- filezilla-3.7.3/src/interface/netconfwizard.cpp 2012-11-10 19:36:36.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/netconfwizard.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -777,11 +777,10 @@ wxString hexIP = ip; for (unsigned int i = 0; i < hexIP.Length(); i++) { - wxChar& c = hexIP[i]; - if (c == '.') - c = '-'; + if (hexIP[i] == '.') + hexIP[i] = '-'; else - c = c - '0' + 'a'; + hexIP[i] = hexIP[i] - '0' + 'a'; } if (!Send(_T("IP ") + ip + _T(" ") + hexIP)) diff -ur filezilla-3.7.3/src/interface/queue.cpp filezilla-3.7.3.wx3/src/interface/queue.cpp --- filezilla-3.7.3/src/interface/queue.cpp 2013-01-07 05:30:19.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/queue.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -1442,7 +1442,7 @@ void CQueueViewBase::OnNavigationKey(wxNavigationKeyEvent& event) { event.SetEventObject(m_pQueue); - m_pQueue->ProcessEvent(event); + m_pQueue->GetEventHandler()->ProcessEvent(event); } void CQueueViewBase::OnChar(wxKeyEvent& event) diff -ur filezilla-3.7.3/src/interface/queue_storage.cpp filezilla-3.7.3.wx3/src/interface/queue_storage.cpp --- filezilla-3.7.3/src/interface/queue_storage.cpp 2012-10-25 05:30:07.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/queue_storage.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -135,7 +135,8 @@ { // wxString is CoW, yet it doesn't even do this fast pointer // comparison in it's less and/or equal operator(s). - return lhs.c_str() == rhs.c_str() || lhs == rhs; +// return lhs.c_str() == rhs.c_str() || lhs == rhs; + return lhs == rhs; } }; @@ -814,9 +815,10 @@ int len = sqlite3_column_bytes16(statement, index); if (text) { - wxChar* out = ret.GetWriteBuf( len ); + wxStringBuffer strbuf(ret, len); + wxChar* out = strbuf; int outlen = utf16_.ToWChar( out, len, text, len ); - ret.UngetWriteBuf( outlen ); + strbuf.~wxStringBuffer(); if (shrink) ret.Shrink(); } diff -ur filezilla-3.7.3/src/interface/QueueView.cpp filezilla-3.7.3.wx3/src/interface/QueueView.cpp --- filezilla-3.7.3/src/interface/QueueView.cpp 2013-05-13 05:30:10.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/QueueView.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -3420,7 +3420,8 @@ wxString result; - wxChar* start = result.GetWriteBuf(filename.Len() + 1); + wxStringBuffer strbuf(result, filename.Len() + 1); + wxChar* start = strbuf; wxChar* buf = start; const wxChar* p = filename.c_str(); @@ -3457,7 +3458,7 @@ } *buf = 0; - result.UngetWriteBuf( buf - start ); + strbuf.~wxStringBuffer(); return result; } diff -ur filezilla-3.7.3/src/interface/quickconnectbar.cpp filezilla-3.7.3.wx3/src/interface/quickconnectbar.cpp --- filezilla-3.7.3/src/interface/quickconnectbar.cpp 2013-06-09 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/quickconnectbar.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -222,12 +222,12 @@ if (event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_DROPDOWN", wxButton)) { event.SetEventObject(this); - GetParent()->ProcessEvent(event); + GetParent()->GetEventHandler()->ProcessEvent(event); } else if (!event.GetDirection() && event.GetEventObject() == m_pHost) { event.SetEventObject(this); - GetParent()->ProcessEvent(event); + GetParent()->GetEventHandler()->ProcessEvent(event); } else event.Skip(); diff -ur filezilla-3.7.3/src/interface/RemoteTreeView.cpp filezilla-3.7.3.wx3/src/interface/RemoteTreeView.cpp --- filezilla-3.7.3/src/interface/RemoteTreeView.cpp 2013-01-14 05:30:08.000000000 +0100 +++ filezilla-3.7.3.wx3/src/interface/RemoteTreeView.cpp 2014-01-19 12:53:48.738160636 +0100 @@ -350,7 +350,7 @@ SetItemImages(parent, false); #ifndef __WXMSW__ - m_freezeCount--; + Thaw(); #endif if (!modified) SafeSelectItem(parent); diff -ur filezilla-3.7.3/src/interface/settings/optionspage_themes.cpp filezilla-3.7.3.wx3/src/interface/settings/optionspage_themes.cpp --- filezilla-3.7.3/src/interface/settings/optionspage_themes.cpp 2012-10-06 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/settings/optionspage_themes.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -7,6 +7,7 @@ #include "../themeprovider.h" #include +#include BEGIN_EVENT_TABLE(COptionsPageThemes, COptionsPage) EVT_CHOICE(XRCID("ID_THEME"), COptionsPageThemes::OnThemeChange) diff -ur filezilla-3.7.3/src/interface/sitemanager_dialog.cpp filezilla-3.7.3.wx3/src/interface/sitemanager_dialog.cpp --- filezilla-3.7.3/src/interface/sitemanager_dialog.cpp 2013-05-01 05:30:04.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/sitemanager_dialog.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -11,6 +11,7 @@ #include "xmlfunctions.h" #include +#include #ifdef __WXMSW__ #include "commctrl.h" diff -ur filezilla-3.7.3/src/interface/statusbar.cpp filezilla-3.7.3.wx3/src/interface/statusbar.cpp --- filezilla-3.7.3/src/interface/statusbar.cpp 2013-06-09 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/statusbar.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -6,6 +6,7 @@ #include "statusbar.h" #include "themeprovider.h" #include "verifycertdialog.h" +#include static const int statbarWidths[3] = { -3, 0, 35 @@ -153,11 +154,8 @@ void wxStatusBarEx::SetStatusText(const wxString& text, int number /*=0*/) { // Basically identical to the wx one, but not calling Update - wxString oldText = m_statusStrings[number]; - if (oldText != text) + if ( m_panes[number].SetText(text) ) { - m_statusStrings[number] = text; - wxRect rect; GetFieldRect(number, rect); diff -ur filezilla-3.7.3/src/interface/StatusView.cpp filezilla-3.7.3.wx3/src/interface/StatusView.cpp --- filezilla-3.7.3/src/interface/StatusView.cpp 2013-06-09 05:30:05.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/StatusView.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -2,6 +2,7 @@ #include "StatusView.h" #include #include "Options.h" +#include #ifdef _DEBUG #define new DEBUG_NEW @@ -58,7 +59,7 @@ { wxWindow* parent = GetParent(); event.SetEventObject(parent); - parent->ProcessEvent(event); + parent->GetEventHandler()->ProcessEvent(event); } #else void OnKeyDown(wxKeyEvent& event) @@ -76,7 +77,7 @@ navEvent.SetDirection(!event.ShiftDown()); navEvent.SetFromTab(true); navEvent.ResumePropagation(1); - parent->ProcessEvent(navEvent); + parent->GetEventHandler()->ProcessEvent(navEvent); } #endif }; diff -ur filezilla-3.7.3/src/interface/viewheader.cpp filezilla-3.7.3.wx3/src/interface/viewheader.cpp --- filezilla-3.7.3/src/interface/viewheader.cpp 2013-06-09 05:30:06.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/viewheader.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -10,6 +10,7 @@ #endif #include +#include #ifdef __WXMSW__ const int border_offset = 0; @@ -67,7 +68,7 @@ navEvent.SetDirection(!event.ShiftDown()); navEvent.SetFromTab(true); navEvent.ResumePropagation(1); - m_parent->ProcessEvent(navEvent); + m_parent->GetEventHandler()->ProcessEvent(navEvent); } void OnChar(wxKeyEvent& event) diff -ur filezilla-3.7.3/src/interface/xh_toolb_ex.cpp filezilla-3.7.3.wx3/src/interface/xh_toolb_ex.cpp --- filezilla-3.7.3/src/interface/xh_toolb_ex.cpp 2012-10-06 05:30:11.000000000 +0200 +++ filezilla-3.7.3.wx3/src/interface/xh_toolb_ex.cpp 2014-01-19 12:53:48.741493969 +0100 @@ -1,6 +1,7 @@ // Based upon src/xrc/xh_toolb.cpp from wxWidgets #include +#include #include "xh_toolb_ex.h" wxSize wxToolBarXmlHandlerEx::m_iconSize(-1, -1);