1 diff -ur filezilla-3.7.3/configure.in filezilla-3.7.3.wx3/configure.in
2 --- filezilla-3.7.3/configure.in 2013-08-07 19:25:47.000000000 +0200
3 +++ filezilla-3.7.3.wx3/configure.in 2014-01-19 12:53:48.734827302 +0100
5 equivalent variable and wxWidgets version is $MIN_WX_VERSION or above.
8 - if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt "8"; then
9 - AC_MSG_ERROR([You need to use wxWidgets 2.8.x to compile this program.])
12 # --universal=no doesn't work correctly, it still accepts universal builds. Reject it manually here.
13 if echo "$WX_CPPFLAGS" | grep __WXUNIVERSAL__ > /dev/null; then
14 diff -ur filezilla-3.7.3/m4/wxwin.m4 filezilla-3.7.3.wx3/m4/wxwin.m4
15 --- filezilla-3.7.3/m4/wxwin.m4 2013-04-05 05:30:06.000000000 +0200
16 +++ filezilla-3.7.3.wx3/m4/wxwin.m4 2014-01-19 12:53:48.734827302 +0100
18 if test -n "$wx_ver_ok"; then
20 AC_MSG_RESULT(yes (version $WX_VERSION))
21 - WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
22 + WX_LIBS="`$WX_CONFIG_WITH_ARGS --libs` -lwx_gtk2_aui-3.0"
24 dnl is this even still appropriate? --static is a real option now
25 dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is
26 diff -ur filezilla-3.7.3/src/engine/ControlSocket.cpp filezilla-3.7.3.wx3/src/engine/ControlSocket.cpp
27 --- filezilla-3.7.3/src/engine/ControlSocket.cpp 2013-06-09 05:30:07.000000000 +0200
28 +++ filezilla-3.7.3.wx3/src/engine/ControlSocket.cpp 2014-01-19 12:53:48.734827302 +0100
30 msg = _("Critical file transfer error after transferring %s in %s");
32 msg = _("File transfer failed after transferring %s in %s");
33 - LogMessage(msgType, msg, size.c_str(), time.c_str());
34 + LogMessage(msgType, msg, (const char *)size.c_str(), (const char *)time.c_str());
40 if (!defaultPath.IsEmpty())
42 - LogMessage(Debug_Warning, _T("Assuming path is '%s'."), defaultPath.GetPath().c_str());
43 + LogMessage(Debug_Warning, _T("Assuming path is '%s'."), (const char *)defaultPath.GetPath().c_str());
44 m_CurrentPath = defaultPath;
51 - LogMessage(::Error, _("Could not write to socket: %s"), CSocket::GetErrorDescription(error).c_str());
52 + LogMessage(::Error, _("Could not write to socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
53 LogMessage(::Error, _("Disconnected from server"));
56 @@ -1034,17 +1034,17 @@
57 case CSocketEvent::hostaddress:
59 const wxString& address = event.GetData();
60 - LogMessage(Status, _("Connecting to %s..."), address.c_str());
61 + LogMessage(Status, _("Connecting to %s..."), (const char *)address.c_str());
64 case CSocketEvent::connection_next:
66 - LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), CSocket::GetErrorDescription(event.GetError()).c_str());
67 + LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str());
69 case CSocketEvent::connection:
72 - LogMessage(Status, _("Connection attempt failed with \"%s\"."), CSocket::GetErrorDescription(event.GetError()).c_str());
73 + LogMessage(Status, _("Connection attempt failed with \"%s\"."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str());
74 OnClose(event.GetError());
81 - LogMessage(::Error, _("Could not write to socket: %s"), CSocket::GetErrorDescription(error).c_str());
82 + LogMessage(::Error, _("Could not write to socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
83 if (GetCurrentCommandId() != cmd_connect)
84 LogMessage(::Error, _("Disconnected from server"));
88 LogMessage(::Error, _("Connection closed by server"));
90 - LogMessage(::Error, _("Disconnected from server: %s"), CSocket::GetErrorDescription(error).c_str());
91 + LogMessage(::Error, _("Disconnected from server: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
97 if (server.GetEncodingType() == ENCODING_CUSTOM)
99 - LogMessage(Debug_Info, _T("Using custom encoding: %s"), server.GetCustomEncoding().c_str());
100 + LogMessage(Debug_Info, _T("Using custom encoding: %s"), (const char *)server.GetCustomEncoding().c_str());
101 m_pCSConv = new wxCSConv(server.GetCustomEncoding());
104 @@ -1166,7 +1166,7 @@
105 const int proxy_type = m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_TYPE);
106 if (proxy_type > CProxySocket::unknown && proxy_type < CProxySocket::proxytype_count && !m_pCurrentServer->GetBypassProxy())
108 - LogMessage(::Status, _("Connecting to %s through proxy"), m_pCurrentServer->FormatHost().c_str());
109 + LogMessage(::Status, _("Connecting to %s through proxy"), (const char *)m_pCurrentServer->FormatHost().c_str());
111 host = m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST);
112 port = m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_PORT);
113 @@ -1181,7 +1181,7 @@
115 if (res != EINPROGRESS)
117 - LogMessage(::Error, _("Could not start proxy handshake: %s"), CSocket::GetErrorDescription(res).c_str());
118 + LogMessage(::Error, _("Could not start proxy handshake: %s"), (const char *)CSocket::GetErrorDescription(res).c_str());
120 return FZ_REPLY_ERROR;
122 @@ -1201,14 +1201,14 @@
125 if (!IsIpAddress(host))
126 - LogMessage(Status, _("Resolving address of %s"), host.c_str());
127 + LogMessage(Status, _("Resolving address of %s"), (const char *)host.c_str());
129 int res = m_pSocket->Connect(host, port);
131 // Treat success same as EINPROGRESS, we wait for connect notification in any case
132 if (res && res != EINPROGRESS)
134 - LogMessage(::Error, _("Could not connect to server: %s"), CSocket::GetErrorDescription(res).c_str());
135 + LogMessage(::Error, _("Could not connect to server: %s"), (const char *)CSocket::GetErrorDescription(res).c_str());
137 return FZ_REPLY_ERROR;
139 @@ -1273,11 +1273,11 @@
142 wxString filename = pData->remotePath.FormatFilename(pData->remoteFile);
143 - LogMessage(Status, _("Skipping download of %s"), filename.c_str());
144 + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str());
148 - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str());
149 + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str());
151 ResetOperation(FZ_REPLY_OK);
153 @@ -1292,11 +1292,11 @@
156 wxString filename = pData->remotePath.FormatFilename(pData->remoteFile);
157 - LogMessage(Status, _("Skipping download of %s"), filename.c_str());
158 + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str());
162 - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str());
163 + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str());
165 ResetOperation(FZ_REPLY_OK);
167 @@ -1317,11 +1317,11 @@
170 wxString filename = pData->remotePath.FormatFilename(pData->remoteFile);
171 - LogMessage(Status, _("Skipping download of %s"), filename.c_str());
172 + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str());
176 - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str());
177 + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str());
179 ResetOperation(FZ_REPLY_OK);
181 @@ -1383,11 +1383,11 @@
184 wxString filename = pData->remotePath.FormatFilename(pData->remoteFile);
185 - LogMessage(Status, _("Skipping download of %s"), filename.c_str());
186 + LogMessage(Status, _("Skipping download of %s"), (const char *)filename.c_str());
190 - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str());
191 + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str());
193 ResetOperation(FZ_REPLY_OK);
195 @@ -1485,4 +1485,4 @@
196 int CControlSocket::Chmod(const CChmodCommand&)
198 return FZ_REPLY_NOTSUPPORTED;
200 \ No newline at end of file
202 diff -ur filezilla-3.7.3/src/engine/directorylistingparser.cpp filezilla-3.7.3.wx3/src/engine/directorylistingparser.cpp
203 --- filezilla-3.7.3/src/engine/directorylistingparser.cpp 2013-04-05 05:30:06.000000000 +0200
204 +++ filezilla-3.7.3.wx3/src/engine/directorylistingparser.cpp 2014-01-19 12:53:48.734827302 +0100
206 #include <filezilla.h>
207 #include "directorylistingparser.h"
208 #include "ControlSocket.h"
209 +#include "logging_private.h"
212 #define new DEBUG_NEW
213 diff -ur filezilla-3.7.3/src/engine/ftpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/ftpcontrolsocket.cpp
214 --- filezilla-3.7.3/src/engine/ftpcontrolsocket.cpp 2013-06-09 05:30:07.000000000 +0200
215 +++ filezilla-3.7.3.wx3/src/engine/ftpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100
220 - LogMessage(::Error, _("Could not read from socket: %s"), CSocket::GetErrorDescription(error).c_str());
221 + LogMessage(::Error, _("Could not read from socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
222 if (GetCurrentCommandId() != cmd_connect)
223 LogMessage(::Error, _("Disconnected from server"));
226 pData->loginSequence.push_back(cmd);
229 - t_loginCommand cmd = {false, false, user, wxString::Format(_T("USER %s@%s"), server.GetUser().c_str(), server.FormatHost().c_str())};
230 + t_loginCommand cmd = {false, false, user, wxString::Format(_T("USER %s@%s"), (const char *)server.GetUser().c_str(), (const char *)server.FormatHost().c_str())};
231 pData->loginSequence.push_back(cmd);
234 @@ -2063,7 +2063,7 @@
236 if (code != 2 && code != 3)
238 - LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), pData->path.GetPath().c_str());
239 + LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), (const char *)pData->path.GetPath().c_str());
240 m_CurrentPath = pData->path;
242 if (pData->target.IsEmpty())
243 @@ -2131,7 +2131,7 @@
245 if (!assumedPath.IsEmpty())
247 - LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), assumedPath.GetPath().c_str());
248 + LogMessage(Debug_Warning, _T("PWD failed, assuming path is '%s'."), (const char *)assumedPath.GetPath().c_str());
249 m_CurrentPath = assumedPath;
251 if (pData->target.IsEmpty())
252 @@ -2253,11 +2253,11 @@
255 wxString filename = remotePath.FormatFilename(remoteFile);
256 - LogMessage(Status, _("Starting download of %s"), filename.c_str());
257 + LogMessage(Status, _("Starting download of %s"), (const char *)filename.c_str());
261 - LogMessage(Status, _("Starting upload of %s"), localFile.c_str());
262 + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str());
266 @@ -2645,7 +2645,7 @@
267 if (!pFile->Open(pData->localFile, wxFile::write_append))
270 - LogMessage(::Error, _("Failed to open \"%s\" for appending/writing"), pData->localFile.c_str());
271 + LogMessage(::Error, _("Failed to open \"%s\" for appending/writing"), (const char *)pData->localFile.c_str());
272 ResetOperation(FZ_REPLY_ERROR);
273 return FZ_REPLY_ERROR;
275 @@ -2686,7 +2686,7 @@
276 if (!pFile->Open(pData->localFile, wxFile::write))
279 - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str());
280 + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str());
281 ResetOperation(FZ_REPLY_ERROR);
282 return FZ_REPLY_ERROR;
284 @@ -2707,7 +2707,7 @@
285 if (!pFile->Open(pData->localFile, wxFile::read))
288 - LogMessage(::Error, _("Failed to open \"%s\" for reading"), pData->localFile.c_str());
289 + LogMessage(::Error, _("Failed to open \"%s\" for reading"), (const char *)pData->localFile.c_str());
290 ResetOperation(FZ_REPLY_ERROR);
291 return FZ_REPLY_ERROR;
293 @@ -2723,7 +2723,7 @@
294 if (pFile->Seek(startOffset, wxFromStart) == wxInvalidOffset)
297 - LogMessage(::Error, _("Could not seek to offset %s within file"), wxLongLong(startOffset).ToString().c_str());
298 + LogMessage(::Error, _("Could not seek to offset %s within file"), (const char *)wxLongLong(startOffset).ToString().c_str());
299 ResetOperation(FZ_REPLY_ERROR);
300 return FZ_REPLY_ERROR;
302 @@ -3125,7 +3125,7 @@
303 wxString filename = pData->path.FormatFilename(file, pData->omitPath);
304 if (filename == _T(""))
306 - LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), pData->path.GetPath().c_str(), file.c_str());
307 + LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), (const char *)pData->path.GetPath().c_str(), (const char *)file.c_str());
308 ResetOperation(FZ_REPLY_ERROR);
309 return FZ_REPLY_ERROR;
311 @@ -3213,7 +3213,7 @@
313 if (!pData->fullPath.AddSegment(subDir))
315 - LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), path.GetPath().c_str(), subDir.c_str());
316 + LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), (const char *)path.GetPath().c_str(), (const char *)subDir.c_str());
317 ResetOperation(FZ_REPLY_ERROR);
318 return FZ_REPLY_ERROR;
320 @@ -3328,7 +3328,7 @@
324 - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str());
325 + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str());
327 CMkdirOpData *pData = new CMkdirOpData;
329 @@ -3559,7 +3559,7 @@
330 return FZ_REPLY_ERROR;
333 - LogMessage(Status, _("Renaming '%s' to '%s'"), command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), command.GetToPath().FormatFilename(command.GetToFile()).c_str());
334 + LogMessage(Status, _("Renaming '%s' to '%s'"), (const char *)command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), (const char *)command.GetToPath().FormatFilename(command.GetToFile()).c_str());
336 CFtpRenameOpData *pData = new CFtpRenameOpData(command);
337 pData->opState = rename_rnfrom;
338 @@ -3711,7 +3711,7 @@
339 return FZ_REPLY_ERROR;
342 - LogMessage(Status, _("Set permissions of '%s' to '%s'"), command.GetPath().FormatFilename(command.GetFile()).c_str(), command.GetPermission().c_str());
343 + LogMessage(Status, _("Set permissions of '%s' to '%s'"), (const char *)command.GetPath().FormatFilename(command.GetFile()).c_str(), (const char *)command.GetPermission().c_str());
345 CFtpChmodOpData *pData = new CFtpChmodOpData(command);
346 pData->opState = chmod_chmod;
347 @@ -3881,13 +3881,13 @@
348 if (m_pEngine->GetOptions()->GetOptionVal(OPTION_PASVREPLYFALLBACKMODE) != 1 || pData->bTriedActive)
350 LogMessage(Status, _("Server sent passive reply with unroutable address. Using server address instead."));
351 - LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), pData->host.c_str(), peerIP.c_str());
352 + LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), (const char *)pData->host.c_str(), (const char *)peerIP.c_str());
353 pData->host = peerIP;
357 LogMessage(Status, _("Server sent passive reply with unroutable address. Passive mode failed."));
358 - LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), pData->host.c_str(), peerIP.c_str());
359 + LogMessage(Debug_Info, _T(" Reply: %s, peer: %s"), (const char *)pData->host.c_str(), (const char *)peerIP.c_str());
363 @@ -3944,7 +3944,7 @@
365 wxString resolverAddress = m_pEngine->GetOptions()->GetOption(OPTION_EXTERNALIPRESOLVER);
367 - LogMessage(::Debug_Info, _("Retrieving external IP address from %s"), resolverAddress.c_str());
368 + LogMessage(::Debug_Info, _("Retrieving external IP address from %s"), (const char *)resolverAddress.c_str());
370 m_pIPResolver = new CExternalIPResolver(this);
371 m_pIPResolver->GetExternalIP(resolverAddress, CSocket::ipv4);
372 @@ -4445,7 +4445,7 @@
373 return FZ_REPLY_ERROR;
376 - LogMessage(Status, _("Using proxy %s"), m_pEngine->GetOptions()->GetOption(OPTION_FTP_PROXY_HOST).c_str());
377 + LogMessage(Status, _("Using proxy %s"), (const char *)m_pEngine->GetOptions()->GetOption(OPTION_FTP_PROXY_HOST).c_str());
381 diff -ur filezilla-3.7.3/src/engine/httpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/httpcontrolsocket.cpp
382 --- filezilla-3.7.3/src/engine/httpcontrolsocket.cpp 2012-11-02 05:30:06.000000000 +0100
383 +++ filezilla-3.7.3.wx3/src/engine/httpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100
386 LogMessage(Debug_Verbose, _T("CHttpControlSocket::FileTransfer()"));
388 - LogMessage(Status, _("Downloading %s"), remotePath.FormatFilename(remoteFile).c_str());
389 + LogMessage(Status, _("Downloading %s"), (const char *)remotePath.FormatFilename(remoteFile).c_str());
395 if (!pData->pFile->Open(pData->localFile, wxFile::write))
397 - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str());
398 + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str());
399 ResetOperation(FZ_REPLY_ERROR);
400 return FZ_REPLY_ERROR;
404 if (!pData->pFile->Open(pData->localFile, wxFile::write))
406 - LogMessage(::Error, _("Failed to open \"%s\" for writing"), pData->localFile.c_str());
407 + LogMessage(::Error, _("Failed to open \"%s\" for writing"), (const char *)pData->localFile.c_str());
408 ResetOperation(FZ_REPLY_ERROR);
409 return FZ_REPLY_ERROR;
411 @@ -471,10 +471,10 @@
412 hostWithPort = pData->m_newHostWithPort;
415 - wxString action = wxString::Format(_T("GET %s HTTP/1.1"), location.c_str());
416 + wxString action = wxString::Format(_T("GET %s HTTP/1.1"), (const char *)location.c_str());
417 LogMessageRaw(Command, action);
419 - 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());
420 + 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());
422 const wxWX2MBbuf str = command.mb_str();
423 if (!Send(str, strlen(str)))
427 if (!IsIpAddress(host))
428 - LogMessage(Status, _("Resolving address of %s"), host.c_str());
429 + LogMessage(Status, _("Resolving address of %s"), (const char *)host.c_str());
432 return DoInternalConnect();
435 if (pData->pFile->Write(p, len) != len)
437 - LogMessage(::Error, _("Failed to write to file %s"), pData->localFile.c_str());
438 + LogMessage(::Error, _("Failed to write to file %s"), (const char *)pData->localFile.c_str());
439 ResetOperation(FZ_REPLY_ERROR);
440 return FZ_REPLY_ERROR;
443 ResetOperation(FZ_REPLY_ERROR);
444 return FZ_REPLY_ERROR;
446 - pData->m_newHostWithPort = wxString::Format(_T("%s:%d"), host.c_str(), (int)port);
447 + pData->m_newHostWithPort = wxString::Format(_T("%s:%d"), (const char *)host.c_str(), (int)port);
449 // International domain names
450 host = ConvertDomainName(host);
453 if (*p < '0' || *p > '9')
455 - LogMessage(::Error, _("Malformed header: %s"), _("Invalid Content-Length"));
456 + LogMessage(::Error, _("Malformed header: %s"), (const char *)_("Invalid Content-Length").c_str());
457 ResetOperation(FZ_REPLY_ERROR);
458 return FZ_REPLY_ERROR;
462 if (p[i + 1] != '\n')
464 - LogMessage(::Error, _("Malformed chunk data: %s"), _("Wrong line endings"));
465 + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Wrong line endings").c_str());
466 ResetOperation(FZ_REPLY_ERROR);
467 return FZ_REPLY_ERROR;
470 if (len == m_recvBufferLen)
472 // We don't support lines larger than 4096
473 - LogMessage(::Error, _("Malformed chunk data: %s"), _("Line length exceeded"));
474 + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Line length exceeded").c_str());
475 ResetOperation(FZ_REPLY_ERROR);
476 return FZ_REPLY_ERROR;
480 // The chunk data has to end with CRLF. If i is nonzero,
481 // it didn't end with just CRLF.
482 - LogMessage(::Error, _("Malformed chunk data: %s"), _("Chunk data improperly terminated"));
483 + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Chunk data improperly terminated").c_str());
484 ResetOperation(FZ_REPLY_ERROR);
485 return FZ_REPLY_ERROR;
491 - LogMessage(::Error, _("Malformed chunk data: %s"), _("Invalid chunk size"));
492 + LogMessage(::Error, _("Malformed chunk data: %s"), (const char *)_("Invalid chunk size").c_str());
493 ResetOperation(FZ_REPLY_ERROR);
494 return FZ_REPLY_ERROR;
500 - LogMessage(::Error, _("Disconnected from server: %s"), CSocket::GetErrorDescription(error).c_str());
501 + LogMessage(::Error, _("Disconnected from server: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
502 ResetOperation(FZ_REPLY_ERROR | FZ_REPLY_DISCONNECTED);
505 diff -ur filezilla-3.7.3/src/engine/local_path.cpp filezilla-3.7.3.wx3/src/engine/local_path.cpp
506 --- filezilla-3.7.3/src/engine/local_path.cpp 2011-05-02 05:30:19.000000000 +0200
507 +++ filezilla-3.7.3.wx3/src/engine/local_path.cpp 2014-01-19 12:53:48.734827302 +0100
509 #include <filezilla.h>
510 #include "local_path.h"
511 #include "string_coalescer.h"
512 +#include "logging_private.h"
520 - wxChar* start = m_path.GetWriteBuf(path.Len() + 2);
521 + wxStringBuffer strbuf(m_path, path.Len() + 2);
522 + wxChar* start = strbuf;
530 - m_path.UngetWriteBuf( out - start );
531 + strbuf.~wxStringBuffer();
535 @@ -495,20 +497,20 @@
539 - error->Printf(_("'%s' is not a directory."), path.c_str());
540 + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str());
544 else if (result == ENOTDIR)
547 - error->Printf(_("'%s' is not a directory."), path.c_str());
548 + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str());
554 - error->Printf(_("'%s' does not exist or cannot be accessed."), path.c_str());
555 + error->Printf(_("'%s' does not exist or cannot be accessed."), (const char *)path.c_str());
560 void CLocalPath::Coalesce()
564 \ No newline at end of file
566 diff -ur filezilla-3.7.3/src/engine/logging_private.h filezilla-3.7.3.wx3/src/engine/logging_private.h
567 --- filezilla-3.7.3/src/engine/logging_private.h 2008-12-14 04:00:47.000000000 +0100
568 +++ filezilla-3.7.3.wx3/src/engine/logging_private.h 2014-01-19 12:53:48.734827302 +0100
570 #ifndef __LOGGING_PRIVATE_H__
571 #define __LOGGING_PRIVATE_H__
573 +#include <wx/intl.h>
574 +#include <wx/string.h>
579 diff -ur filezilla-3.7.3/src/engine/misc.cpp filezilla-3.7.3.wx3/src/engine/misc.cpp
580 --- filezilla-3.7.3/src/engine/misc.cpp 2012-10-24 05:30:07.000000000 +0200
581 +++ filezilla-3.7.3.wx3/src/engine/misc.cpp 2014-01-19 12:53:48.734827302 +0100
584 void MakeLowerAscii(wxString& str)
586 - for (size_t i = 0; i < str.Len(); i++)
588 - wxChar& c = str[i];
589 - if (c >= 'A' && c <= 'Z')
595 wxString GetDependencyVersion(dependency::type d)
596 diff -ur filezilla-3.7.3/src/engine/proxy.cpp filezilla-3.7.3.wx3/src/engine/proxy.cpp
597 --- filezilla-3.7.3/src/engine/proxy.cpp 2012-11-02 05:30:06.000000000 +0100
598 +++ filezilla-3.7.3.wx3/src/engine/proxy.cpp 2014-01-19 12:53:48.734827302 +0100
599 @@ -169,11 +169,11 @@
600 case CSocketEvent::hostaddress:
602 const wxString& address = event.GetData();
603 - m_pOwner->LogMessage(Status, _("Connecting to %s..."), address.c_str());
604 + m_pOwner->LogMessage(Status, _("Connecting to %s..."), (const char *)address.c_str());
606 case CSocketEvent::connection_next:
607 if (event.GetError())
608 - m_pOwner->LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), CSocket::GetErrorDescription(event.GetError()).c_str());
609 + m_pOwner->LogMessage(Status, _("Connection attempt failed with \"%s\", trying next address."), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str());
611 case CSocketEvent::connection:
612 if (event.GetError())
616 wxString reply(m_pRecvBuffer, wxConvUTF8);
617 - m_pOwner->LogMessage(Response, _("Proxy reply: %s"), reply.c_str());
618 + m_pOwner->LogMessage(Response, _("Proxy reply: %s"), (const char *)reply.c_str());
620 if (reply.Left(10) != _T("HTTP/1.1 2") && reply.Left(10) != _T("HTTP/1.0 2"))
626 - m_pOwner->LogMessage(Debug_Warning, _("Proxy request failed: %s"), error.c_str());
627 + m_pOwner->LogMessage(Debug_Warning, _("Proxy request failed: %s"), (const char *)error.c_str());
628 m_proxyState = noconn;
629 CSocketEvent *evt = new CSocketEvent(m_pEvtHandler, this, CSocketEvent::close, ECONNABORTED);
630 CSocketEventDispatcher::Get().SendEvent(evt);
631 diff -ur filezilla-3.7.3/src/engine/server.cpp filezilla-3.7.3.wx3/src/engine/server.cpp
632 --- filezilla-3.7.3/src/engine/server.cpp 2013-01-14 05:30:09.000000000 +0100
633 +++ filezilla-3.7.3.wx3/src/engine/server.cpp 2014-01-19 12:53:48.734827302 +0100
635 #include <filezilla.h>
636 +#include "logging_private.h"
638 struct t_protocolInfo
643 static const t_protocolInfo protocolInfos[] = {
644 - { FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - File Transfer Protocol with optional encryption"), true },
645 + { FTP, _T("ftp"), false, 21, true, (const wxChar*)wxTRANSLATE("FTP - File Transfer Protocol with optional encryption"), true },
646 { SFTP, _T("sftp"), true, 22, false, _T("SFTP - SSH File Transfer Protocol"), false },
647 { HTTP, _T("http"), true, 80, false, _T("HTTP - Hypertext Transfer Protocol"), true },
648 - { HTTPS, _T("https"), true, 443, true, wxTRANSLATE("HTTPS - HTTP over TLS"), true },
649 - { FTPS, _T("ftps"), true, 990, true, wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), true },
650 - { FTPES, _T("ftpes"), true, 21, true, wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), true },
651 - { INSECURE_FTP, _T("ftp"), false, 21, true, wxTRANSLATE("FTP - Insecure File Transfer Protocol"), true },
652 + { HTTPS, _T("https"), true, 443, true, (const wxChar*)wxTRANSLATE("HTTPS - HTTP over TLS"), true },
653 + { FTPS, _T("ftps"), true, 990, true, (const wxChar*)wxTRANSLATE("FTPS - FTP over implicit TLS/SSL"), true },
654 + { FTPES, _T("ftpes"), true, 21, true, (const wxChar*)wxTRANSLATE("FTPES - FTP over explicit TLS/SSL"), true },
655 + { INSECURE_FTP, _T("ftp"), false, 21, true, (const wxChar*)wxTRANSLATE("FTP - Insecure File Transfer Protocol"), true },
656 { UNKNOWN, _T(""), false, 21, false, _T("") }
659 diff -ur filezilla-3.7.3/src/engine/serverpath.cpp filezilla-3.7.3.wx3/src/engine/serverpath.cpp
660 --- filezilla-3.7.3/src/engine/serverpath.cpp 2013-04-05 05:30:06.000000000 +0200
661 +++ filezilla-3.7.3.wx3/src/engine/serverpath.cpp 2014-01-19 12:53:48.734827302 +0100
663 len += iter->Length() + 2 + INTLENGTH;
666 - wxChar* start = safepath.GetWriteBuf(len);
667 + wxStringBuffer strbuf(safepath, len);
668 + wxChar* start = strbuf;
671 t = fast_sprint_number(t, m_type);
676 - safepath.UngetWriteBuf( t - start );
677 + strbuf.~wxStringBuffer();
681 diff -ur filezilla-3.7.3/src/engine/sftpcontrolsocket.cpp filezilla-3.7.3.wx3/src/engine/sftpcontrolsocket.cpp
682 --- filezilla-3.7.3/src/engine/sftpcontrolsocket.cpp 2013-06-09 05:30:07.000000000 +0200
683 +++ filezilla-3.7.3.wx3/src/engine/sftpcontrolsocket.cpp 2014-01-19 12:53:48.738160636 +0100
686 int CSftpControlSocket::Connect(const CServer &server)
688 - LogMessage(Status, _("Connecting to %s..."), server.FormatHost().c_str());
689 + LogMessage(Status, _("Connecting to %s..."), (const char *)server.FormatHost().c_str());
692 m_sftpEncryptionDetails = CSftpEncryptionNotification();
695 if (server.GetEncodingType() == ENCODING_CUSTOM)
697 - LogMessage(Debug_Info, _T("Using custom encoding: %s"), server.GetCustomEncoding().c_str());
698 + LogMessage(Debug_Info, _T("Using custom encoding: %s"), (const char *)server.GetCustomEncoding().c_str());
699 m_pCSConv = new wxCSConv(server.GetCustomEncoding());
703 wxString executable = m_pEngine->GetOptions()->GetOption(OPTION_FZSFTP_EXECUTABLE);
704 if (executable == _T(""))
705 executable = _T("fzsftp");
706 - LogMessage(Debug_Verbose, _T("Going to execute %s"), executable.c_str());
707 + LogMessage(Debug_Verbose, _T("Going to execute %s"), (const char *)executable.c_str());
709 m_pid = wxExecute(executable + _T(" -v"), wxEXEC_ASYNC, m_pProcess);
713 int CSftpControlSocket::ConnectParseResponse(bool successful, const wxString& reply)
715 - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), reply.c_str());
716 + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), (const char *)reply.c_str());
723 wxString cmd = wxString::Format(_T("proxy %d \"%s\" %d"), type,
724 - m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST).c_str(),
725 + (const char *)m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST).c_str(),
726 m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_PORT));
727 wxString user = m_pEngine->GetOptions()->GetOption(OPTION_PROXY_USER);
730 res = Send(_T("keyfile \"") + pData->pKeyFiles->GetNextToken() + _T("\""));
733 - res = Send(wxString::Format(_T("open \"%s@%s\" %d"), m_pCurrentServer->GetUser().c_str(), m_pCurrentServer->GetHost().c_str(), m_pCurrentServer->GetPort()));
734 + 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()));
737 LogMessage(__TFILE__, __LINE__, this, Debug_Warning, _T("Unknown op state: %d"), pData->opState);
740 int CSftpControlSocket::ListParseResponse(bool successful, const wxString& reply)
742 - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), reply.c_str());
743 + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), (const char *)reply.c_str());
747 @@ -1631,11 +1631,11 @@
750 wxString filename = remotePath.FormatFilename(remoteFile);
751 - LogMessage(Status, _("Starting download of %s"), filename.c_str());
752 + LogMessage(Status, _("Starting download of %s"), (const char *)filename.c_str());
756 - LogMessage(Status, _("Starting upload of %s"), localFile.c_str());
757 + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str());
761 @@ -2045,7 +2045,7 @@
765 - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str());
766 + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str());
768 CMkdirOpData *pData = new CMkdirOpData;
770 @@ -2308,7 +2308,7 @@
771 wxString filename = pData->path.FormatFilename(file);
772 if (filename == _T(""))
774 - LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), pData->path.GetPath().c_str(), file.c_str());
775 + LogMessage(::Error, _("Filename cannot be constructed for directory %s and filename %s"), (const char *)pData->path.GetPath().c_str(), (const char *)file.c_str());
776 return FZ_REPLY_ERROR;
779 @@ -2353,7 +2353,7 @@
781 if (!fullPath.AddSegment(subDir))
783 - LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), path.GetPath().c_str(), subDir.c_str());
784 + LogMessage(::Error, _("Path cannot be constructed for directory %s and subdir %s"), (const char *)path.GetPath().c_str(), (const char *)subDir.c_str());
785 return FZ_REPLY_ERROR;
788 @@ -2433,7 +2433,7 @@
789 return FZ_REPLY_ERROR;
792 - LogMessage(Status, _("Set permissions of '%s' to '%s'"), command.GetPath().FormatFilename(command.GetFile()).c_str(), command.GetPermission().c_str());
793 + LogMessage(Status, _("Set permissions of '%s' to '%s'"), (const char *)command.GetPath().FormatFilename(command.GetFile()).c_str(), (const char *)command.GetPermission().c_str());
795 CSftpChmodOpData *pData = new CSftpChmodOpData(command);
796 pData->opState = chmod_chmod;
797 @@ -2555,7 +2555,7 @@
798 return FZ_REPLY_ERROR;
801 - LogMessage(Status, _("Renaming '%s' to '%s'"), command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), command.GetToPath().FormatFilename(command.GetToFile()).c_str());
802 + LogMessage(Status, _("Renaming '%s' to '%s'"), (const char *)command.GetFromPath().FormatFilename(command.GetFromFile()).c_str(), (const char *)command.GetToPath().FormatFilename(command.GetToFile()).c_str());
804 CSftpRenameOpData *pData = new CSftpRenameOpData(command);
805 pData->opState = rename_rename;
806 diff -ur filezilla-3.7.3/src/engine/sizeformatting_base.cpp filezilla-3.7.3.wx3/src/engine/sizeformatting_base.cpp
807 --- filezilla-3.7.3/src/engine/sizeformatting_base.cpp 2010-09-14 05:30:20.000000000 +0200
808 +++ filezilla-3.7.3.wx3/src/engine/sizeformatting_base.cpp 2014-01-19 12:53:48.738160636 +0100
810 #include <filezilla.h>
811 #include "sizeformatting_base.h"
812 #include "optionsbase.h"
813 +#include "logging_private.h"
815 #include <langinfo.h>
817 diff -ur filezilla-3.7.3/src/engine/socket.cpp filezilla-3.7.3.wx3/src/engine/socket.cpp
818 --- filezilla-3.7.3/src/engine/socket.cpp 2013-06-10 20:45:04.000000000 +0200
819 +++ filezilla-3.7.3.wx3/src/engine/socket.cpp 2014-01-19 12:53:48.738160636 +0100
822 +#include <wx/intl.h>
824 // MinGW needs this for getaddrinfo
825 #if defined(_WIN32_WINNT)
826 @@ -1273,7 +1274,7 @@
830 -#define ERRORDECL(c, desc) { c, _T(#c), wxTRANSLATE(desc) },
831 +#define ERRORDECL(c, desc) { c, _T(#c), (const wxChar*)wxTRANSLATE(desc) },
835 diff -ur filezilla-3.7.3/src/engine/string_coalescer.cpp filezilla-3.7.3.wx3/src/engine/string_coalescer.cpp
836 --- filezilla-3.7.3/src/engine/string_coalescer.cpp 2012-10-06 05:30:12.000000000 +0200
837 +++ filezilla-3.7.3.wx3/src/engine/string_coalescer.cpp 2014-01-19 12:53:48.738160636 +0100
840 // wxString is CoW, yet it doesn't even do this fast pointer
841 // comparison in it's less and/or equal operator(s).
842 - return lhs.c_str() == rhs.c_str() || lhs == rhs;
844 +// return lhs.c_str() == rhs.c_str() || lhs == rhs;
848 diff -ur filezilla-3.7.3/src/engine/tlssocket.cpp filezilla-3.7.3.wx3/src/engine/tlssocket.cpp
849 --- filezilla-3.7.3/src/engine/tlssocket.cpp 2013-06-01 09:37:58.000000000 +0200
850 +++ filezilla-3.7.3.wx3/src/engine/tlssocket.cpp 2014-01-19 12:53:48.738160636 +0100
853 wxString s(msg, wxConvLocal);
855 - pLoggingControlSocket->LogMessage(Debug_Debug, _T("tls: %d %s"), level, s.c_str());
856 + pLoggingControlSocket->LogMessage(Debug_Debug, _T("tls: %d %s"), level, (const char *)s.c_str());
860 @@ -207,16 +207,16 @@
863 if (function.IsEmpty())
864 - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d: %s"), code, str.c_str());
865 + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d: %s"), code, (const char *)str.c_str());
867 - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s: %s"), code, function.c_str(), str.c_str());
868 + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s: %s"), code, (const char *)function.c_str(), (const char *)str.c_str());
872 if (function.IsEmpty())
873 m_pOwner->LogMessage(::Error, _T("GnuTLS error %d"), code);
875 - m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s"), code, function.c_str());
876 + m_pOwner->LogMessage(::Error, _T("GnuTLS error %d in %s"), code, (const char *)function.c_str());
884 - m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d: %s"), last_alert, str.c_str());
885 + m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d: %s"), last_alert, (const char *)str.c_str());
888 m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d"), last_alert);
890 const wxString cipherName = GetCipherName();
891 const wxString macName = GetMacName();
893 - 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());
894 + 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());
896 res = VerifyCertificate();
897 if (res != FZ_REPLY_OK)
898 @@ -1235,7 +1235,7 @@
899 if (priority.IsEmpty())
900 priority = wxString::FromUTF8(ciphers);
902 - wxString list = wxString::Format(_T("Ciphers for %s:\n"), priority.c_str());
903 + wxString list = wxString::Format(_T("Ciphers for %s:\n"), (const char *)priority.c_str());
905 #if GNUTLS_VERSION_NUMBER >= 0x030009
906 gnutls_priority_t pcache;
907 @@ -1243,7 +1243,7 @@
908 int ret = gnutls_priority_init(&pcache, priority.mb_str(), &err);
911 - list += wxString::Format(_T("gnutls_priority_init failed with code %d: %s"), ret, wxString::FromUTF8(err ? err : "").c_str());
912 + list += wxString::Format(_T("gnutls_priority_init failed with code %d: %s"), ret, (const char *)wxString::FromUTF8(err ? err : "").c_str());
916 @@ -1265,10 +1265,10 @@
918 list += wxString::Format(
919 _T("%-50s 0x%02x, 0x%02x %s\n"),
920 - wxString::FromUTF8(name).c_str(),
921 + (const char *)wxString::FromUTF8(name).c_str(),
922 (unsigned char)id[0],
923 (unsigned char)id[1],
924 - wxString::FromUTF8(gnutls_protocol_get_name(version)).c_str());
925 + (const char *)wxString::FromUTF8(gnutls_protocol_get_name(version)).c_str());
929 diff -ur filezilla-3.7.3/src/engine/transfersocket.cpp filezilla-3.7.3.wx3/src/engine/transfersocket.cpp
930 --- filezilla-3.7.3/src/engine/transfersocket.cpp 2013-06-10 20:45:04.000000000 +0200
931 +++ filezilla-3.7.3.wx3/src/engine/transfersocket.cpp 2014-01-19 12:53:48.738160636 +0100
933 delete m_pSocketServer;
936 - m_pControlSocket->LogMessage(::Debug_Warning, _T("GetLocalPort failed: %s"), CSocket::GetErrorDescription(error).c_str());
937 + m_pControlSocket->LogMessage(::Debug_Warning, _T("GetLocalPort failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
941 wxString portArguments;
942 if (m_pSocketServer->GetAddressFamily() == CSocket::ipv6)
944 - portArguments = wxString::Format(_T("|2|%s|%d|"), ip.c_str(), port);
945 + portArguments = wxString::Format(_T("|2|%s|%d|"), (const char *)ip.c_str(), port);
950 const int error = event.GetError();
953 - m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), CSocket::GetErrorDescription(error).c_str());
954 + m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
955 TransferEnd(failure);
959 case CSocketEvent::close:
961 const int error = event.GetError();
962 - m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), CSocket::GetErrorDescription(error).c_str());
963 + m_pControlSocket->LogMessage(::Error, _("Proxy handshake failed: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
964 TransferEnd(failure);
969 if (!m_transferEndReason)
971 - m_pControlSocket->LogMessage(::Error, _("The data connection could not be established: %s"), CSocket::GetErrorDescription(event.GetError()).c_str());
972 + m_pControlSocket->LogMessage(::Error, _("The data connection could not be established: %s"), (const char *)CSocket::GetErrorDescription(event.GetError()).c_str());
973 TransferEnd(transfer_failure);
977 m_pControlSocket->LogMessage(::Debug_Verbose, _T("No pending connection"));
980 - m_pControlSocket->LogMessage(::Status, _("Could not accept connection: %s"), CSocket::GetErrorDescription(error).c_str());
981 + m_pControlSocket->LogMessage(::Status, _("Could not accept connection: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
982 TransferEnd(transfer_failure);
989 - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str());
990 + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
991 TransferEnd(transfer_failure);
993 else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound))
998 - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str());
999 + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
1000 TransferEnd(transfer_failure);
1002 else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound))
1005 if (error != EAGAIN)
1007 - m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), CSocket::GetErrorDescription(error).c_str());
1008 + m_pControlSocket->LogMessage(::Error, _T("Could not read from transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
1009 TransferEnd(transfer_failure);
1011 else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound))
1016 - m_pControlSocket->LogMessage(Error, _T("Could not write to transfer socket: %s"), CSocket::GetErrorDescription(error).c_str());
1017 + m_pControlSocket->LogMessage(Error, _T("Could not write to transfer socket: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
1018 TransferEnd(transfer_failure);
1025 - m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), CSocket::GetErrorDescription(error).c_str());
1026 + m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
1027 TransferEnd(transfer_failure);
1032 else if (numread < 0 && error != EAGAIN)
1034 - m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), CSocket::GetErrorDescription(error).c_str());
1035 + m_pControlSocket->LogMessage(::Error, _("Transfer connection interrupted: %s"), (const char *)CSocket::GetErrorDescription(error).c_str());
1036 TransferEnd(transfer_failure);
1040 int res = pServer->Listen(m_pControlSocket->m_pSocket->GetAddressFamily(), port);
1043 - m_pControlSocket->LogMessage(::Debug_Verbose, _T("Could not listen on port %d: %s"), port, CSocket::GetErrorDescription(res).c_str());
1044 + m_pControlSocket->LogMessage(::Debug_Verbose, _T("Could not listen on port %d: %s"), port, (const char *)CSocket::GetErrorDescription(res).c_str());
1050 wxString error = pData->pIOThread->GetError();
1051 if (error != _T(""))
1052 - m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), error.c_str());
1053 + m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), (const char *)error.c_str());
1055 m_pControlSocket->LogMessage(::Error, _("Can't write data to file."));
1056 TransferEnd(transfer_failure_critical);
1059 wxString error = pData->pIOThread->GetError();
1060 if (error != _T(""))
1061 - m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), error.c_str());
1062 + m_pControlSocket->LogMessage(::Error, _("Can't write data to file: %s"), (const char *)error.c_str());
1064 m_pControlSocket->LogMessage(::Error, _("Can't write data to file."));
1065 TransferEnd(transfer_failure_critical);
1066 diff -ur filezilla-3.7.3/src/interface/aui_notebook_ex.cpp filezilla-3.7.3.wx3/src/interface/aui_notebook_ex.cpp
1067 --- filezilla-3.7.3/src/interface/aui_notebook_ex.cpp 2013-02-10 05:30:06.000000000 +0100
1068 +++ filezilla-3.7.3.wx3/src/interface/aui_notebook_ex.cpp 2014-01-19 13:14:07.434818480 +0100
1070 #include "aui_notebook_ex.h"
1071 #include <wx/dcmirror.h>
1073 -wxColor wxAuiStepColour(const wxColor& c, int ialpha);
1076 #define TABCOLOUR wxSYS_COLOUR_3DFACE
1079 m_original_dc->DrawRectangle(x, y, width, height);
1082 - wxColour new_init = wxAuiStepColour(c, 150);
1083 - wxColour new_dest = wxAuiStepColour(c, 100);
1084 + wxColour new_init = c.ChangeLightness(150);
1085 + wxColour new_dest = c.ChangeLightness(100);
1086 m_original_dc->GradientFillLinear(wxRect(x, y, width + 1, height), new_init, new_dest, wxNORTH);
1091 wxColour c = wxSystemSettings::GetColour(TABCOLOUR);
1092 if (c.Red() + c.Green() + c.Blue() < 384)
1093 - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(c, 100)));
1094 + m_original_dc->SetBrush(wxBrush(c.ChangeLightness(100)));
1095 m_original_dc->DrawRectangle(x, y, width, height);
1102 - wxColour new_init = wxAuiStepColour(initialColour, 100);
1103 - wxColour new_dest = wxAuiStepColour(initialColour, 120);
1104 + wxColour new_init = initialColour.ChangeLightness(100);
1105 + wxColour new_dest = initialColour.ChangeLightness(120);
1106 m_original_dc->GradientFillLinear(rect, new_init, new_dest, nDirection);
1109 @@ -120,12 +118,12 @@
1110 if (m_gradient_called == 1)
1112 // Lighter inner border
1113 - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(destColour, 105)));
1114 - m_original_dc->SetPen(wxPen(wxAuiStepColour(destColour, 105)));
1115 + m_original_dc->SetBrush(wxBrush(destColour.ChangeLightness(105)));
1116 + m_original_dc->SetPen(wxPen(destColour.ChangeLightness(105)));
1117 m_original_dc->DrawRectangle(r2);
1119 - wxColour new_init = wxAuiStepColour(destColour, 95);
1120 - wxColour new_dest = wxAuiStepColour(destColour, 65);
1121 + wxColour new_init = destColour.ChangeLightness(95);
1122 + wxColour new_dest = destColour.ChangeLightness(65);
1123 m_original_dc->GradientFillLinear(r, new_init, new_dest, nDirection);
1126 @@ -145,11 +143,11 @@
1129 // Lighter inner border
1130 - m_original_dc->SetBrush(wxBrush(wxAuiStepColour(destColour, 105)));
1131 - m_original_dc->SetPen(wxPen(wxAuiStepColour(destColour, 105)));
1132 + m_original_dc->SetBrush(wxBrush(destColour.ChangeLightness(105)));
1133 + m_original_dc->SetPen(wxPen(destColour.ChangeLightness(105)));
1134 m_original_dc->DrawRectangle(r2);
1136 - wxColour new_dest = wxAuiStepColour(destColour, 65);
1137 + wxColour new_dest = destColour.ChangeLightness(65);
1140 m_original_dc->GradientFillLinear(r, new_dest, new_dest, nDirection);
1141 @@ -171,13 +169,13 @@
1142 wxColour new_init, new_dest;
1145 - new_init = wxAuiStepColour(c, 70);
1146 - new_dest = wxAuiStepColour(c, 100);
1147 + new_init = c.ChangeLightness(70);
1148 + new_dest = c.ChangeLightness(100);
1152 - new_init = wxAuiStepColour(c, 85);
1153 - new_dest = wxAuiStepColour(c, 100);
1154 + new_init = c.ChangeLightness(85);
1155 + new_dest = c.ChangeLightness(100);
1157 m_original_dc->GradientFillLinear(rect, new_init, new_dest, nDirection);
1163 - virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); }
1164 +// virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); }
1167 int m_gradient_called;
1169 virtual wxAuiTabArt* Clone()
1171 wxAuiTabArtEx *art = new wxAuiTabArtEx(m_pNotebook, m_bottom, m_data);
1172 - art->SetNormalFont(m_normal_font);
1173 - art->SetSelectedFont(m_selected_font);
1174 - art->SetMeasuringFont(m_measuring_font);
1175 + art->SetNormalFont(m_normalFont);
1176 + art->SetSelectedFont(m_selectedFont);
1177 + art->SetMeasuringFont(m_measuringFont);
1181 @@ -257,12 +255,12 @@
1185 - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR);
1186 + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR);
1190 - if (m_base_colour.Red() + m_base_colour.Green() + m_base_colour.Blue() >= 384)
1191 - m_base_colour = wxColour( m_base_colour.Red() * 0.95, m_base_colour.Green() * 0.95, m_base_colour.Blue() * 0.95 );
1192 + if (m_baseColour.Red() + m_baseColour.Green() + m_baseColour.Blue() >= 384)
1193 + m_baseColour = wxColour( m_baseColour.Red() * 0.95, m_baseColour.Green() * 0.95, m_baseColour.Blue() * 0.95 );
1195 dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
1196 if (m_pNotebook->Highlighted(m_pNotebook->GetPageIndex(pane.window)))
1197 @@ -270,26 +268,26 @@
1198 if (!m_fonts_initialized)
1200 m_fonts_initialized = true;
1201 - m_original_normal_font = m_normal_font;
1202 - m_highlighted_font = m_normal_font;
1203 + m_original_normal_font = m_normalFont;
1204 + m_highlighted_font = m_normalFont;
1205 m_highlighted_font.SetWeight(wxFONTWEIGHT_BOLD);
1206 m_highlighted_font.SetStyle(wxFONTSTYLE_ITALIC);
1208 - m_normal_font = m_highlighted_font;
1209 + m_normalFont = m_highlighted_font;
1211 else if (m_fonts_initialized)
1212 - m_normal_font = m_original_normal_font;
1213 + m_normalFont = m_original_normal_font;
1216 - CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tab_ctrl_height % 2) != 0, m_bottom);
1217 + CFilterDC filter_dc(dc, pane.active ? 1 : 0, (m_tabCtrlHeight % 2) != 0, m_bottom);
1218 wxAuiDefaultTabArt::DrawTab(*((wxDC*)&filter_dc), wnd, pane, in_rect, close_button_state, out_tab_rect, out_button_rect, x_extent);
1220 - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR);
1221 + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR);
1224 virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect)
1226 - CFilterDC filter_dc(dc, 2, (m_tab_ctrl_height % 2) != 0, m_bottom);
1227 + CFilterDC filter_dc(dc, 2, (m_tabCtrlHeight % 2) != 0, m_bottom);
1228 wxAuiDefaultTabArt::DrawBackground(*((wxDC*)&filter_dc), wnd, rect);
1231 diff -ur filezilla-3.7.3/src/interface/commandqueue.cpp filezilla-3.7.3.wx3/src/interface/commandqueue.cpp
1232 --- filezilla-3.7.3/src/interface/commandqueue.cpp 2013-05-13 05:30:10.000000000 +0200
1233 +++ filezilla-3.7.3.wx3/src/interface/commandqueue.cpp 2014-01-19 12:53:48.738160636 +0100
1236 wxCommandEvent evt(fzEVT_GRANTEXCLUSIVEENGINEACCESS);
1237 evt.SetId(m_requestId);
1238 - m_pMainFrame->GetQueue()->AddPendingEvent(evt);
1239 + m_pMainFrame->GetQueue()->GetEventHandler()->AddPendingEvent(evt);
1242 CFileZillaEngine* CCommandQueue::GetEngineExclusive(int requestId)
1243 diff -ur filezilla-3.7.3/src/interface/filelistctrl.cpp filezilla-3.7.3.wx3/src/interface/filelistctrl.cpp
1244 --- filezilla-3.7.3/src/interface/filelistctrl.cpp 2012-11-15 05:30:05.000000000 +0100
1245 +++ filezilla-3.7.3.wx3/src/interface/filelistctrl.cpp 2014-01-19 12:53:48.738160636 +0100
1248 #include <gtk/gtk.h>
1250 +#include <wx/dcclient.h>
1253 DECLARE_EVENT_TYPE(fz_EVT_FILELIST_FOCUSCHANGE, -1)
1254 diff -ur filezilla-3.7.3/src/interface/import.cpp filezilla-3.7.3.wx3/src/interface/import.cpp
1255 --- filezilla-3.7.3/src/interface/import.cpp 2012-10-06 05:30:11.000000000 +0200
1256 +++ filezilla-3.7.3.wx3/src/interface/import.cpp 2014-01-19 12:53:48.738160636 +0100
1258 pass[i + 2] < '0' || pass[i + 2] > '9')
1260 int number = (pass[i] - '0') * 100 +
1261 - (pass[i + 1] - '0') * 10 +
1262 - pass[i + 2] - '0';
1263 + ((char)pass[i + 1] - '0') * 10 +
1264 + (char)pass[i + 2] - '0';
1265 wxChar c = number ^ key[(i / 3 + pos) % strlen(key)];
1268 diff -ur filezilla-3.7.3/src/interface/led.cpp filezilla-3.7.3.wx3/src/interface/led.cpp
1269 --- filezilla-3.7.3/src/interface/led.cpp 2012-12-03 05:30:05.000000000 +0100
1270 +++ filezilla-3.7.3.wx3/src/interface/led.cpp 2014-01-19 12:53:48.738160636 +0100
1272 #include <filezilla.h>
1274 #include "filezillaapp.h"
1275 +#include <wx/dcclient.h>
1278 #define new DEBUG_NEW
1279 diff -ur filezilla-3.7.3/src/interface/Mainfrm.cpp filezilla-3.7.3.wx3/src/interface/Mainfrm.cpp
1280 --- filezilla-3.7.3/src/interface/Mainfrm.cpp 2013-06-25 19:11:01.000000000 +0200
1281 +++ filezilla-3.7.3.wx3/src/interface/Mainfrm.cpp 2014-01-19 12:53:48.738160636 +0100
1282 @@ -754,14 +754,13 @@
1283 // Do a crude approach: Drop everything unexpected...
1284 for (unsigned int i = 0; i < version.Len(); i++)
1286 - wxChar& c = version[i];
1287 if ((version[i] >= '0' && version[i] <= '9') ||
1288 (version[i] >= 'a' && version[i] <= 'z') ||
1289 (version[i] >= 'A' && version[i] <= 'Z') ||
1290 version[i] == '-' || version[i] == '.' ||
1294 + url += version[i];
1300 pStatusBar->Show(show);
1302 - controls->pLocalListViewPanel->ProcessEvent(evt);
1303 + controls->pLocalListViewPanel->GetEventHandler()->ProcessEvent(evt);
1306 if (controls && controls->pRemoteListViewPanel)
1309 pStatusBar->Show(show);
1311 - controls->pRemoteListViewPanel->ProcessEvent(evt);
1312 + controls->pRemoteListViewPanel->GetEventHandler()->ProcessEvent(evt);
1316 diff -ur filezilla-3.7.3/src/interface/netconfwizard.cpp filezilla-3.7.3.wx3/src/interface/netconfwizard.cpp
1317 --- filezilla-3.7.3/src/interface/netconfwizard.cpp 2012-11-10 19:36:36.000000000 +0100
1318 +++ filezilla-3.7.3.wx3/src/interface/netconfwizard.cpp 2014-01-19 12:53:48.738160636 +0100
1319 @@ -777,11 +777,10 @@
1320 wxString hexIP = ip;
1321 for (unsigned int i = 0; i < hexIP.Length(); i++)
1323 - wxChar& c = hexIP[i];
1326 + if (hexIP[i] == '.')
1329 - c = c - '0' + 'a';
1330 + hexIP[i] = hexIP[i] - '0' + 'a';
1333 if (!Send(_T("IP ") + ip + _T(" ") + hexIP))
1334 diff -ur filezilla-3.7.3/src/interface/queue.cpp filezilla-3.7.3.wx3/src/interface/queue.cpp
1335 --- filezilla-3.7.3/src/interface/queue.cpp 2013-01-07 05:30:19.000000000 +0100
1336 +++ filezilla-3.7.3.wx3/src/interface/queue.cpp 2014-01-19 12:53:48.738160636 +0100
1337 @@ -1442,7 +1442,7 @@
1338 void CQueueViewBase::OnNavigationKey(wxNavigationKeyEvent& event)
1340 event.SetEventObject(m_pQueue);
1341 - m_pQueue->ProcessEvent(event);
1342 + m_pQueue->GetEventHandler()->ProcessEvent(event);
1345 void CQueueViewBase::OnChar(wxKeyEvent& event)
1346 diff -ur filezilla-3.7.3/src/interface/queue_storage.cpp filezilla-3.7.3.wx3/src/interface/queue_storage.cpp
1347 --- filezilla-3.7.3/src/interface/queue_storage.cpp 2012-10-25 05:30:07.000000000 +0200
1348 +++ filezilla-3.7.3.wx3/src/interface/queue_storage.cpp 2014-01-19 12:53:48.738160636 +0100
1351 // wxString is CoW, yet it doesn't even do this fast pointer
1352 // comparison in it's less and/or equal operator(s).
1353 - return lhs.c_str() == rhs.c_str() || lhs == rhs;
1354 +// return lhs.c_str() == rhs.c_str() || lhs == rhs;
1355 + return lhs == rhs;
1359 @@ -814,9 +815,10 @@
1360 int len = sqlite3_column_bytes16(statement, index);
1363 - wxChar* out = ret.GetWriteBuf( len );
1364 + wxStringBuffer strbuf(ret, len);
1365 + wxChar* out = strbuf;
1366 int outlen = utf16_.ToWChar( out, len, text, len );
1367 - ret.UngetWriteBuf( outlen );
1368 + strbuf.~wxStringBuffer();
1372 diff -ur filezilla-3.7.3/src/interface/QueueView.cpp filezilla-3.7.3.wx3/src/interface/QueueView.cpp
1373 --- filezilla-3.7.3/src/interface/QueueView.cpp 2013-05-13 05:30:10.000000000 +0200
1374 +++ filezilla-3.7.3.wx3/src/interface/QueueView.cpp 2014-01-19 12:53:48.738160636 +0100
1375 @@ -3420,7 +3420,8 @@
1379 - wxChar* start = result.GetWriteBuf(filename.Len() + 1);
1380 + wxStringBuffer strbuf(result, filename.Len() + 1);
1381 + wxChar* start = strbuf;
1382 wxChar* buf = start;
1384 const wxChar* p = filename.c_str();
1385 @@ -3457,7 +3458,7 @@
1389 - result.UngetWriteBuf( buf - start );
1390 + strbuf.~wxStringBuffer();
1394 diff -ur filezilla-3.7.3/src/interface/quickconnectbar.cpp filezilla-3.7.3.wx3/src/interface/quickconnectbar.cpp
1395 --- filezilla-3.7.3/src/interface/quickconnectbar.cpp 2013-06-09 05:30:06.000000000 +0200
1396 +++ filezilla-3.7.3.wx3/src/interface/quickconnectbar.cpp 2014-01-19 12:53:48.738160636 +0100
1397 @@ -222,12 +222,12 @@
1398 if (event.GetDirection() && event.GetEventObject() == XRCCTRL(*this, "ID_QUICKCONNECT_DROPDOWN", wxButton))
1400 event.SetEventObject(this);
1401 - GetParent()->ProcessEvent(event);
1402 + GetParent()->GetEventHandler()->ProcessEvent(event);
1404 else if (!event.GetDirection() && event.GetEventObject() == m_pHost)
1406 event.SetEventObject(this);
1407 - GetParent()->ProcessEvent(event);
1408 + GetParent()->GetEventHandler()->ProcessEvent(event);
1412 diff -ur filezilla-3.7.3/src/interface/RemoteTreeView.cpp filezilla-3.7.3.wx3/src/interface/RemoteTreeView.cpp
1413 --- filezilla-3.7.3/src/interface/RemoteTreeView.cpp 2013-01-14 05:30:08.000000000 +0100
1414 +++ filezilla-3.7.3.wx3/src/interface/RemoteTreeView.cpp 2014-01-19 12:53:48.738160636 +0100
1416 SetItemImages(parent, false);
1423 SafeSelectItem(parent);
1424 diff -ur filezilla-3.7.3/src/interface/settings/optionspage_themes.cpp filezilla-3.7.3.wx3/src/interface/settings/optionspage_themes.cpp
1425 --- filezilla-3.7.3/src/interface/settings/optionspage_themes.cpp 2012-10-06 05:30:06.000000000 +0200
1426 +++ filezilla-3.7.3.wx3/src/interface/settings/optionspage_themes.cpp 2014-01-19 12:53:48.741493969 +0100
1428 #include "../themeprovider.h"
1430 #include <wx/scrolwin.h>
1431 +#include <wx/dcclient.h>
1433 BEGIN_EVENT_TABLE(COptionsPageThemes, COptionsPage)
1434 EVT_CHOICE(XRCID("ID_THEME"), COptionsPageThemes::OnThemeChange)
1435 diff -ur filezilla-3.7.3/src/interface/sitemanager_dialog.cpp filezilla-3.7.3.wx3/src/interface/sitemanager_dialog.cpp
1436 --- filezilla-3.7.3/src/interface/sitemanager_dialog.cpp 2013-05-01 05:30:04.000000000 +0200
1437 +++ filezilla-3.7.3.wx3/src/interface/sitemanager_dialog.cpp 2014-01-19 12:53:48.741493969 +0100
1439 #include "xmlfunctions.h"
1442 +#include <wx/dcclient.h>
1445 #include "commctrl.h"
1446 diff -ur filezilla-3.7.3/src/interface/statusbar.cpp filezilla-3.7.3.wx3/src/interface/statusbar.cpp
1447 --- filezilla-3.7.3/src/interface/statusbar.cpp 2013-06-09 05:30:06.000000000 +0200
1448 +++ filezilla-3.7.3.wx3/src/interface/statusbar.cpp 2014-01-19 12:53:48.741493969 +0100
1450 #include "statusbar.h"
1451 #include "themeprovider.h"
1452 #include "verifycertdialog.h"
1453 +#include <wx/dcclient.h>
1455 static const int statbarWidths[3] = {
1457 @@ -153,11 +154,8 @@
1458 void wxStatusBarEx::SetStatusText(const wxString& text, int number /*=0*/)
1460 // Basically identical to the wx one, but not calling Update
1461 - wxString oldText = m_statusStrings[number];
1462 - if (oldText != text)
1463 + if ( m_panes[number].SetText(text) )
1465 - m_statusStrings[number] = text;
1468 GetFieldRect(number, rect);
1470 diff -ur filezilla-3.7.3/src/interface/StatusView.cpp filezilla-3.7.3.wx3/src/interface/StatusView.cpp
1471 --- filezilla-3.7.3/src/interface/StatusView.cpp 2013-06-09 05:30:05.000000000 +0200
1472 +++ filezilla-3.7.3.wx3/src/interface/StatusView.cpp 2014-01-19 12:53:48.741493969 +0100
1474 #include "StatusView.h"
1475 #include <wx/wupdlock.h>
1476 #include "Options.h"
1477 +#include <wx/dcclient.h>
1480 #define new DEBUG_NEW
1483 wxWindow* parent = GetParent();
1484 event.SetEventObject(parent);
1485 - parent->ProcessEvent(event);
1486 + parent->GetEventHandler()->ProcessEvent(event);
1489 void OnKeyDown(wxKeyEvent& event)
1491 navEvent.SetDirection(!event.ShiftDown());
1492 navEvent.SetFromTab(true);
1493 navEvent.ResumePropagation(1);
1494 - parent->ProcessEvent(navEvent);
1495 + parent->GetEventHandler()->ProcessEvent(navEvent);
1499 diff -ur filezilla-3.7.3/src/interface/viewheader.cpp filezilla-3.7.3.wx3/src/interface/viewheader.cpp
1500 --- filezilla-3.7.3/src/interface/viewheader.cpp 2013-06-09 05:30:06.000000000 +0200
1501 +++ filezilla-3.7.3.wx3/src/interface/viewheader.cpp 2014-01-19 12:53:48.741493969 +0100
1505 #include <wx/combobox.h>
1506 +#include <wx/dcclient.h>
1509 const int border_offset = 0;
1511 navEvent.SetDirection(!event.ShiftDown());
1512 navEvent.SetFromTab(true);
1513 navEvent.ResumePropagation(1);
1514 - m_parent->ProcessEvent(navEvent);
1515 + m_parent->GetEventHandler()->ProcessEvent(navEvent);
1518 void OnChar(wxKeyEvent& event)
1519 diff -ur filezilla-3.7.3/src/interface/xh_toolb_ex.cpp filezilla-3.7.3.wx3/src/interface/xh_toolb_ex.cpp
1520 --- filezilla-3.7.3/src/interface/xh_toolb_ex.cpp 2012-10-06 05:30:11.000000000 +0200
1521 +++ filezilla-3.7.3.wx3/src/interface/xh_toolb_ex.cpp 2014-01-19 12:53:48.741493969 +0100
1523 // Based upon src/xrc/xh_toolb.cpp from wxWidgets
1525 #include <filezilla.h>
1526 +#include <wx/xml/xml.h>
1527 #include "xh_toolb_ex.h"
1529 wxSize wxToolBarXmlHandlerEx::m_iconSize(-1, -1);