]>
Commit | Line | Data |
---|---|---|
3b1f2544 JR |
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 | |
75d110e3 JR |
4 | @@ -111,9 +111,6 @@ |
5 | equivalent variable and wxWidgets version is $MIN_WX_VERSION or above. | |
6 | ]) | |
7 | fi | |
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.]) | |
10 | - fi | |
11 | ||
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 | |
3b1f2544 JR |
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 | |
17 | @@ -169,7 +169,7 @@ | |
18 | if test -n "$wx_ver_ok"; then | |
19 | ||
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" | |
23 | ||
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 | |
75d110e3 JR |
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 | |
3b1f2544 | 28 | +++ filezilla-3.7.3.wx3/src/engine/ControlSocket.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
29 | @@ -120,7 +120,7 @@ |
30 | msg = _("Critical file transfer error after transferring %s in %s"); | |
31 | else | |
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()); | |
35 | } | |
36 | else | |
37 | { | |
38 | @@ -421,7 +421,7 @@ | |
39 | ||
40 | if (!defaultPath.IsEmpty()) | |
41 | { | |
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; | |
45 | return true; | |
46 | } | |
47 | @@ -999,7 +999,7 @@ | |
48 | { | |
49 | if (error != EAGAIN) | |
50 | { | |
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")); | |
54 | DoClose(); | |
55 | return false; | |
56 | @@ -1034,17 +1034,17 @@ | |
57 | case CSocketEvent::hostaddress: | |
58 | { | |
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()); | |
62 | } | |
63 | break; | |
64 | case CSocketEvent::connection_next: | |
65 | if (event.GetError()) | |
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()); | |
68 | break; | |
69 | case CSocketEvent::connection: | |
70 | if (event.GetError()) | |
71 | { | |
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()); | |
75 | } | |
76 | else | |
77 | @@ -1097,7 +1097,7 @@ | |
78 | { | |
79 | if (error != EAGAIN) | |
80 | { | |
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")); | |
85 | DoClose(); | |
86 | @@ -1134,7 +1134,7 @@ | |
87 | if (!error) | |
88 | LogMessage(::Error, _("Connection closed by server")); | |
89 | else | |
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()); | |
92 | } | |
93 | DoClose(); | |
94 | } | |
95 | @@ -1145,7 +1145,7 @@ | |
96 | ||
97 | if (server.GetEncodingType() == ENCODING_CUSTOM) | |
98 | { | |
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()); | |
102 | } | |
103 | ||
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()) | |
107 | { | |
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()); | |
110 | ||
111 | host = m_pEngine->GetOptions()->GetOption(OPTION_PROXY_HOST); | |
112 | port = m_pEngine->GetOptions()->GetOptionVal(OPTION_PROXY_PORT); | |
113 | @@ -1181,7 +1181,7 @@ | |
114 | ||
115 | if (res != EINPROGRESS) | |
116 | { | |
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()); | |
119 | DoClose(); | |
120 | return FZ_REPLY_ERROR; | |
121 | } | |
122 | @@ -1201,14 +1201,14 @@ | |
123 | } | |
124 | } | |
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()); | |
128 | ||
129 | int res = m_pSocket->Connect(host, port); | |
130 | ||
131 | // Treat success same as EINPROGRESS, we wait for connect notification in any case | |
132 | if (res && res != EINPROGRESS) | |
133 | { | |
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()); | |
136 | DoClose(); | |
137 | return FZ_REPLY_ERROR; | |
138 | } | |
139 | @@ -1273,11 +1273,11 @@ | |
140 | if (pData->download) | |
141 | { | |
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()); | |
145 | } | |
146 | else | |
147 | { | |
148 | - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); | |
149 | + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); | |
150 | } | |
151 | ResetOperation(FZ_REPLY_OK); | |
152 | } | |
153 | @@ -1292,11 +1292,11 @@ | |
154 | if (pData->download) | |
155 | { | |
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()); | |
159 | } | |
160 | else | |
161 | { | |
162 | - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); | |
163 | + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); | |
164 | } | |
165 | ResetOperation(FZ_REPLY_OK); | |
166 | } | |
167 | @@ -1317,11 +1317,11 @@ | |
168 | if (pData->download) | |
169 | { | |
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()); | |
173 | } | |
174 | else | |
175 | { | |
176 | - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); | |
177 | + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); | |
178 | } | |
179 | ResetOperation(FZ_REPLY_OK); | |
180 | } | |
181 | @@ -1383,11 +1383,11 @@ | |
182 | if (pData->download) | |
183 | { | |
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()); | |
187 | } | |
188 | else | |
189 | { | |
190 | - LogMessage(Status, _("Skipping upload of %s"), pData->localFile.c_str()); | |
191 | + LogMessage(Status, _("Skipping upload of %s"), (const char *)pData->localFile.c_str()); | |
192 | } | |
193 | ResetOperation(FZ_REPLY_OK); | |
194 | break; | |
195 | @@ -1485,4 +1485,4 @@ | |
196 | int CControlSocket::Chmod(const CChmodCommand&) | |
197 | { | |
198 | return FZ_REPLY_NOTSUPPORTED; | |
199 | -} | |
200 | \ No newline at end of file | |
201 | +} | |
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 | |
3b1f2544 | 204 | +++ filezilla-3.7.3.wx3/src/engine/directorylistingparser.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
205 | @@ -1,6 +1,7 @@ |
206 | #include <filezilla.h> | |
207 | #include "directorylistingparser.h" | |
208 | #include "ControlSocket.h" | |
209 | +#include "logging_private.h" | |
210 | ||
211 | #ifdef _DEBUG | |
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 | |
3b1f2544 | 215 | +++ filezilla-3.7.3.wx3/src/engine/ftpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
216 | @@ -228,7 +228,7 @@ |
217 | { | |
218 | if (error != EAGAIN) | |
219 | { | |
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")); | |
224 | DoClose(); | |
225 | @@ -541,7 +541,7 @@ | |
226 | pData->loginSequence.push_back(cmd); | |
227 | } | |
228 | // User@host | |
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); | |
232 | ||
233 | // Password | |
234 | @@ -2063,7 +2063,7 @@ | |
235 | case cwd_pwd_cwd: | |
236 | if (code != 2 && code != 3) | |
237 | { | |
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; | |
241 | ||
242 | if (pData->target.IsEmpty()) | |
243 | @@ -2131,7 +2131,7 @@ | |
244 | { | |
245 | if (!assumedPath.IsEmpty()) | |
246 | { | |
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; | |
250 | ||
251 | if (pData->target.IsEmpty()) | |
252 | @@ -2253,11 +2253,11 @@ | |
253 | if (download) | |
254 | { | |
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()); | |
258 | } | |
259 | else | |
260 | { | |
261 | - LogMessage(Status, _("Starting upload of %s"), localFile.c_str()); | |
262 | + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str()); | |
263 | } | |
264 | if (m_pCurOpData) | |
265 | { | |
266 | @@ -2645,7 +2645,7 @@ | |
267 | if (!pFile->Open(pData->localFile, wxFile::write_append)) | |
268 | { | |
269 | delete pFile; | |
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; | |
274 | } | |
275 | @@ -2686,7 +2686,7 @@ | |
276 | if (!pFile->Open(pData->localFile, wxFile::write)) | |
277 | { | |
278 | delete pFile; | |
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; | |
283 | } | |
284 | @@ -2707,7 +2707,7 @@ | |
285 | if (!pFile->Open(pData->localFile, wxFile::read)) | |
286 | { | |
287 | delete pFile; | |
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; | |
292 | } | |
293 | @@ -2723,7 +2723,7 @@ | |
294 | if (pFile->Seek(startOffset, wxFromStart) == wxInvalidOffset) | |
295 | { | |
296 | delete pFile; | |
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; | |
301 | } | |
302 | @@ -3125,7 +3125,7 @@ | |
303 | wxString filename = pData->path.FormatFilename(file, pData->omitPath); | |
304 | if (filename == _T("")) | |
305 | { | |
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; | |
310 | } | |
311 | @@ -3213,7 +3213,7 @@ | |
312 | ||
313 | if (!pData->fullPath.AddSegment(subDir)) | |
314 | { | |
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; | |
319 | } | |
320 | @@ -3328,7 +3328,7 @@ | |
321 | */ | |
322 | ||
323 | if (!m_pCurOpData) | |
324 | - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str()); | |
325 | + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str()); | |
326 | ||
327 | CMkdirOpData *pData = new CMkdirOpData; | |
328 | pData->path = path; | |
329 | @@ -3559,7 +3559,7 @@ | |
330 | return FZ_REPLY_ERROR; | |
331 | } | |
332 | ||
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()); | |
335 | ||
336 | CFtpRenameOpData *pData = new CFtpRenameOpData(command); | |
337 | pData->opState = rename_rnfrom; | |
338 | @@ -3711,7 +3711,7 @@ | |
339 | return FZ_REPLY_ERROR; | |
340 | } | |
341 | ||
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()); | |
344 | ||
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) | |
349 | { | |
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; | |
354 | } | |
355 | else | |
356 | { | |
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()); | |
360 | return false; | |
361 | } | |
362 | } | |
363 | @@ -3944,7 +3944,7 @@ | |
364 | ||
365 | wxString resolverAddress = m_pEngine->GetOptions()->GetOption(OPTION_EXTERNALIPRESOLVER); | |
366 | ||
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()); | |
369 | ||
370 | m_pIPResolver = new CExternalIPResolver(this); | |
371 | m_pIPResolver->GetExternalIP(resolverAddress, CSocket::ipv4); | |
372 | @@ -4445,7 +4445,7 @@ | |
373 | return FZ_REPLY_ERROR; | |
374 | } | |
375 | ||
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()); | |
378 | } | |
379 | else | |
380 | { | |
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 | |
3b1f2544 | 383 | +++ filezilla-3.7.3.wx3/src/engine/httpcontrolsocket.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
384 | @@ -355,7 +355,7 @@ |
385 | { | |
386 | LogMessage(Debug_Verbose, _T("CHttpControlSocket::FileTransfer()")); | |
387 | ||
388 | - LogMessage(Status, _("Downloading %s"), remotePath.FormatFilename(remoteFile).c_str()); | |
389 | + LogMessage(Status, _("Downloading %s"), (const char *)remotePath.FormatFilename(remoteFile).c_str()); | |
390 | ||
391 | if (!download) | |
392 | { | |
393 | @@ -388,7 +388,7 @@ | |
394 | ||
395 | if (!pData->pFile->Open(pData->localFile, wxFile::write)) | |
396 | { | |
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; | |
401 | } | |
402 | @@ -445,7 +445,7 @@ | |
403 | ||
404 | if (!pData->pFile->Open(pData->localFile, wxFile::write)) | |
405 | { | |
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; | |
410 | } | |
411 | @@ -471,10 +471,10 @@ | |
412 | hostWithPort = pData->m_newHostWithPort; | |
413 | } | |
414 | ||
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); | |
418 | ||
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()); | |
421 | ||
422 | const wxWX2MBbuf str = command.mb_str(); | |
423 | if (!Send(str, strlen(str))) | |
424 | @@ -494,7 +494,7 @@ | |
425 | pData->tls = tls; | |
426 | ||
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()); | |
430 | ||
431 | pData->host = host; | |
432 | return DoInternalConnect(); | |
433 | @@ -563,7 +563,7 @@ | |
434 | ||
435 | if (pData->pFile->Write(p, len) != len) | |
436 | { | |
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; | |
441 | } | |
442 | @@ -716,7 +716,7 @@ | |
443 | ResetOperation(FZ_REPLY_ERROR); | |
444 | return FZ_REPLY_ERROR; | |
445 | } | |
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); | |
448 | ||
449 | // International domain names | |
450 | host = ConvertDomainName(host); | |
451 | @@ -769,7 +769,7 @@ | |
452 | { | |
453 | if (*p < '0' || *p > '9') | |
454 | { | |
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; | |
459 | } | |
460 | @@ -824,7 +824,7 @@ | |
461 | { | |
462 | if (p[i + 1] != '\n') | |
463 | { | |
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; | |
468 | } | |
469 | @@ -836,7 +836,7 @@ | |
470 | if (len == m_recvBufferLen) | |
471 | { | |
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; | |
477 | } | |
478 | @@ -851,7 +851,7 @@ | |
479 | { | |
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; | |
486 | } | |
487 | @@ -893,7 +893,7 @@ | |
488 | else | |
489 | { | |
490 | // Invalid size | |
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; | |
495 | } | |
496 | @@ -950,7 +950,7 @@ | |
497 | ||
498 | if (error) | |
499 | { | |
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); | |
503 | return; | |
504 | } | |
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 | |
3b1f2544 | 507 | +++ filezilla-3.7.3.wx3/src/engine/local_path.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
508 | @@ -1,6 +1,7 @@ |
509 | #include <filezilla.h> | |
510 | #include "local_path.h" | |
511 | #include "string_coalescer.h" | |
512 | +#include "logging_private.h" | |
513 | #ifndef __WXMSW__ | |
514 | #include <errno.h> | |
515 | #endif | |
516 | @@ -120,7 +121,8 @@ | |
517 | return false; | |
518 | } | |
519 | ||
520 | - wxChar* start = m_path.GetWriteBuf(path.Len() + 2); | |
521 | + wxStringBuffer strbuf(m_path, path.Len() + 2); | |
522 | + wxChar* start = strbuf; | |
523 | wxChar* out = start; | |
524 | ||
525 | *out++ = '/'; | |
526 | @@ -211,7 +213,7 @@ | |
527 | ||
528 | *out = 0; | |
529 | ||
530 | - m_path.UngetWriteBuf( out - start ); | |
531 | + strbuf.~wxStringBuffer(); | |
532 | ||
533 | ::Coalesce(m_path); | |
534 | ||
535 | @@ -495,20 +497,20 @@ | |
536 | return true; | |
537 | ||
538 | if (error) | |
539 | - error->Printf(_("'%s' is not a directory."), path.c_str()); | |
540 | + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str()); | |
541 | ||
542 | return false; | |
543 | } | |
544 | else if (result == ENOTDIR) | |
545 | { | |
546 | if (error) | |
547 | - error->Printf(_("'%s' is not a directory."), path.c_str()); | |
548 | + error->Printf(_("'%s' is not a directory."), (const char *)path.c_str()); | |
549 | return false; | |
550 | } | |
551 | else | |
552 | { | |
553 | if (error) | |
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()); | |
556 | return false; | |
557 | } | |
558 | #endif | |
559 | @@ -599,4 +601,4 @@ | |
560 | void CLocalPath::Coalesce() | |
561 | { | |
562 | ::Coalesce(m_path); | |
563 | -} | |
564 | \ No newline at end of file | |
565 | +} | |
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 | |
3b1f2544 | 568 | +++ filezilla-3.7.3.wx3/src/engine/logging_private.h 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
569 | @@ -1,6 +1,9 @@ |
570 | #ifndef __LOGGING_PRIVATE_H__ | |
571 | #define __LOGGING_PRIVATE_H__ | |
572 | ||
573 | +#include <wx/intl.h> | |
574 | +#include <wx/string.h> | |
575 | + | |
576 | class CLogging | |
577 | { | |
578 | public: | |
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 | |
3b1f2544 | 581 | +++ filezilla-3.7.3.wx3/src/engine/misc.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
582 | @@ -363,12 +363,7 @@ |
583 | ||
584 | void MakeLowerAscii(wxString& str) | |
585 | { | |
586 | - for (size_t i = 0; i < str.Len(); i++) | |
587 | - { | |
588 | - wxChar& c = str[i]; | |
589 | - if (c >= 'A' && c <= 'Z') | |
590 | - c += 32; | |
591 | - } | |
592 | + str.MakeLower(); | |
593 | } | |
594 | ||
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 | |
3b1f2544 | 598 | +++ filezilla-3.7.3.wx3/src/engine/proxy.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
599 | @@ -169,11 +169,11 @@ |
600 | case CSocketEvent::hostaddress: | |
601 | { | |
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()); | |
605 | } | |
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()); | |
610 | break; | |
611 | case CSocketEvent::connection: | |
612 | if (event.GetError()) | |
613 | @@ -306,7 +306,7 @@ | |
614 | wxASSERT(end); | |
615 | *end = 0; | |
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()); | |
619 | ||
620 | if (reply.Left(10) != _T("HTTP/1.1 2") && reply.Left(10) != _T("HTTP/1.0 2")) | |
621 | { | |
622 | @@ -455,7 +455,7 @@ | |
623 | break; | |
624 | } | |
625 | ||
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 | |
3b1f2544 | 633 | +++ filezilla-3.7.3.wx3/src/engine/server.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
634 | @@ -1,4 +1,5 @@ |
635 | #include <filezilla.h> | |
636 | +#include "logging_private.h" | |
637 | ||
638 | struct t_protocolInfo | |
639 | { | |
640 | @@ -12,13 +13,13 @@ | |
641 | }; | |
642 | ||
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("") } | |
657 | }; | |
658 | ||
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 | |
3b1f2544 | 661 | +++ filezilla-3.7.3.wx3/src/engine/serverpath.cpp 2014-01-19 12:53:48.734827302 +0100 |
75d110e3 JR |
662 | @@ -276,7 +276,8 @@ |
663 | len += iter->Length() + 2 + INTLENGTH; | |
664 | ||
665 | wxString safepath; | |
666 | - wxChar* start = safepath.GetWriteBuf(len); | |
667 | + wxStringBuffer strbuf(safepath, len); | |
668 | + wxChar* start = strbuf; | |
669 | wxChar* t = start; | |
670 | ||
671 | t = fast_sprint_number(t, m_type); | |
672 | @@ -300,7 +301,7 @@ | |
673 | } | |
674 | *t = 0; | |
675 | ||
676 | - safepath.UngetWriteBuf( t - start ); | |
677 | + strbuf.~wxStringBuffer(); | |
678 | safepath.Shrink(); | |
679 | ||
680 | return safepath; | |
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 | |
3b1f2544 | 683 | +++ filezilla-3.7.3.wx3/src/engine/sftpcontrolsocket.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
684 | @@ -391,7 +391,7 @@ |
685 | ||
686 | int CSftpControlSocket::Connect(const CServer &server) | |
687 | { | |
688 | - LogMessage(Status, _("Connecting to %s..."), server.FormatHost().c_str()); | |
689 | + LogMessage(Status, _("Connecting to %s..."), (const char *)server.FormatHost().c_str()); | |
690 | SetWait(true); | |
691 | ||
692 | m_sftpEncryptionDetails = CSftpEncryptionNotification(); | |
693 | @@ -399,7 +399,7 @@ | |
694 | delete m_pCSConv; | |
695 | if (server.GetEncodingType() == ENCODING_CUSTOM) | |
696 | { | |
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()); | |
700 | m_useUTF8 = false; | |
701 | } | |
702 | @@ -431,7 +431,7 @@ | |
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()); | |
708 | ||
709 | m_pid = wxExecute(executable + _T(" -v"), wxEXEC_ASYNC, m_pProcess); | |
710 | if (!m_pid) | |
711 | @@ -460,7 +460,7 @@ | |
712 | ||
713 | int CSftpControlSocket::ConnectParseResponse(bool successful, const wxString& reply) | |
714 | { | |
715 | - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), reply.c_str()); | |
716 | + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ConnectParseResponse(%s)"), (const char *)reply.c_str()); | |
717 | ||
718 | if (!successful) | |
719 | { | |
720 | @@ -556,7 +556,7 @@ | |
721 | } | |
722 | ||
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); | |
728 | if (user != _T("")) | |
729 | @@ -577,7 +577,7 @@ | |
730 | res = Send(_T("keyfile \"") + pData->pKeyFiles->GetNextToken() + _T("\"")); | |
731 | break; | |
732 | case connect_open: | |
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())); | |
735 | break; | |
736 | default: | |
737 | LogMessage(__TFILE__, __LINE__, this, Debug_Warning, _T("Unknown op state: %d"), pData->opState); | |
738 | @@ -989,7 +989,7 @@ | |
739 | ||
740 | int CSftpControlSocket::ListParseResponse(bool successful, const wxString& reply) | |
741 | { | |
742 | - LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), reply.c_str()); | |
743 | + LogMessage(Debug_Verbose, _T("CSftpControlSocket::ListParseResponse(%s)"), (const char *)reply.c_str()); | |
744 | ||
745 | if (!m_pCurOpData) | |
746 | { | |
747 | @@ -1631,11 +1631,11 @@ | |
748 | if (download) | |
749 | { | |
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()); | |
753 | } | |
754 | else | |
755 | { | |
756 | - LogMessage(Status, _("Starting upload of %s"), localFile.c_str()); | |
757 | + LogMessage(Status, _("Starting upload of %s"), (const char *)localFile.c_str()); | |
758 | } | |
759 | if (m_pCurOpData) | |
760 | { | |
761 | @@ -2045,7 +2045,7 @@ | |
762 | */ | |
763 | ||
764 | if (!m_pCurOpData) | |
765 | - LogMessage(Status, _("Creating directory '%s'..."), path.GetPath().c_str()); | |
766 | + LogMessage(Status, _("Creating directory '%s'..."), (const char *)path.GetPath().c_str()); | |
767 | ||
768 | CMkdirOpData *pData = new CMkdirOpData; | |
769 | pData->path = path; | |
770 | @@ -2308,7 +2308,7 @@ | |
771 | wxString filename = pData->path.FormatFilename(file); | |
772 | if (filename == _T("")) | |
773 | { | |
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; | |
777 | } | |
778 | ||
779 | @@ -2353,7 +2353,7 @@ | |
780 | ||
781 | if (!fullPath.AddSegment(subDir)) | |
782 | { | |
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; | |
786 | } | |
787 | } | |
788 | @@ -2433,7 +2433,7 @@ | |
789 | return FZ_REPLY_ERROR; | |
790 | } | |
791 | ||
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()); | |
794 | ||
795 | CSftpChmodOpData *pData = new CSftpChmodOpData(command); | |
796 | pData->opState = chmod_chmod; | |
797 | @@ -2555,7 +2555,7 @@ | |
798 | return FZ_REPLY_ERROR; | |
799 | } | |
800 | ||
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()); | |
803 | ||
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 | |
3b1f2544 | 808 | +++ filezilla-3.7.3.wx3/src/engine/sizeformatting_base.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
809 | @@ -1,6 +1,7 @@ |
810 | #include <filezilla.h> | |
811 | #include "sizeformatting_base.h" | |
812 | #include "optionsbase.h" | |
813 | +#include "logging_private.h" | |
814 | #ifndef __WXMSW__ | |
815 | #include <langinfo.h> | |
816 | #endif | |
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 | |
3b1f2544 | 819 | +++ filezilla-3.7.3.wx3/src/engine/socket.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
820 | @@ -1,4 +1,5 @@ |
821 | #include <wx/defs.h> | |
822 | +#include <wx/intl.h> | |
823 | #ifdef __WXMSW__ | |
824 | // MinGW needs this for getaddrinfo | |
825 | #if defined(_WIN32_WINNT) | |
826 | @@ -1273,7 +1274,7 @@ | |
827 | } | |
828 | } | |
829 | ||
830 | -#define ERRORDECL(c, desc) { c, _T(#c), wxTRANSLATE(desc) }, | |
831 | +#define ERRORDECL(c, desc) { c, _T(#c), (const wxChar*)wxTRANSLATE(desc) }, | |
832 | ||
833 | struct Error_table | |
834 | { | |
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 | |
3b1f2544 | 837 | +++ filezilla-3.7.3.wx3/src/engine/string_coalescer.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
838 | @@ -66,7 +66,8 @@ |
839 | { | |
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; | |
843 | + return lhs == rhs; | |
844 | +// return lhs.c_str() == rhs.c_str() || lhs == rhs; | |
845 | } | |
846 | }; | |
847 | ||
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 | |
3b1f2544 | 850 | +++ filezilla-3.7.3.wx3/src/engine/tlssocket.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
851 | @@ -23,7 +23,7 @@ |
852 | return; | |
853 | wxString s(msg, wxConvLocal); | |
854 | s.Trim(); | |
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()); | |
857 | } | |
858 | #endif | |
859 | ||
860 | @@ -207,16 +207,16 @@ | |
861 | wxString str(error); | |
862 | #endif | |
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()); | |
866 | else | |
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()); | |
869 | } | |
870 | else | |
871 | { | |
872 | if (function.IsEmpty()) | |
873 | m_pOwner->LogMessage(::Error, _T("GnuTLS error %d"), code); | |
874 | else | |
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()); | |
877 | } | |
878 | } | |
879 | ||
880 | @@ -231,7 +231,7 @@ | |
881 | #else | |
882 | wxString str(alert); | |
883 | #endif | |
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()); | |
886 | } | |
887 | else | |
888 | m_pOwner->LogMessage(::Debug_Warning, _T("GnuTLS alert %d"), last_alert); | |
889 | @@ -535,7 +535,7 @@ | |
890 | const wxString cipherName = GetCipherName(); | |
891 | const wxString macName = GetMacName(); | |
892 | ||
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()); | |
895 | ||
896 | res = VerifyCertificate(); | |
897 | if (res != FZ_REPLY_OK) | |
898 | @@ -1235,7 +1235,7 @@ | |
899 | if (priority.IsEmpty()) | |
900 | priority = wxString::FromUTF8(ciphers); | |
901 | ||
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()); | |
904 | ||
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); | |
909 | if (ret < 0) | |
910 | { | |
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()); | |
913 | return list; | |
914 | } | |
915 | else | |
916 | @@ -1265,10 +1265,10 @@ | |
917 | { | |
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()); | |
926 | } | |
927 | } | |
928 | } | |
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 | |
3b1f2544 | 931 | +++ filezilla-3.7.3.wx3/src/engine/transfersocket.cpp 2014-01-19 12:53:48.738160636 +0100 |
75d110e3 JR |
932 | @@ -98,14 +98,14 @@ |
933 | delete m_pSocketServer; | |
934 | m_pSocketServer = 0; | |
935 | ||
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()); | |
938 | return _T(""); | |
939 | } | |
940 | ||
941 | wxString portArguments; | |
942 | if (m_pSocketServer->GetAddressFamily() == CSocket::ipv6) | |
943 | { | |
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); | |
946 | } | |
947 | else | |
948 | { | |
949 | @@ -128,7 +128,7 @@ | |
950 | const int error = event.GetError(); | |
951 | if (error) | |
952 | { | |
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); | |
956 | } | |
957 | else | |
958 | @@ -142,7 +142,7 @@ | |
959 | case CSocketEvent::close: | |
960 | { | |
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); | |
965 | } | |
966 | return; | |
967 | @@ -169,7 +169,7 @@ | |
968 | { | |
969 | if (!m_transferEndReason) | |
970 | { | |
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); | |
974 | } | |
975 | } | |
976 | @@ -212,7 +212,7 @@ | |
977 | m_pControlSocket->LogMessage(::Debug_Verbose, _T("No pending connection")); | |
978 | else | |
979 | { | |
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); | |
983 | } | |
984 | return; | |
985 | @@ -284,7 +284,7 @@ | |
986 | delete [] pBuffer; | |
987 | if (error != EAGAIN) | |
988 | { | |
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); | |
992 | } | |
993 | else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) | |
994 | @@ -330,7 +330,7 @@ | |
995 | { | |
996 | if (error != EAGAIN) | |
997 | { | |
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); | |
1001 | } | |
1002 | else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) | |
1003 | @@ -372,7 +372,7 @@ | |
1004 | { | |
1005 | if (error != EAGAIN) | |
1006 | { | |
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); | |
1010 | } | |
1011 | else if (m_onCloseCalled && !m_pBackend->IsWaiting(CRateLimiter::inbound)) | |
1012 | @@ -467,7 +467,7 @@ | |
1013 | } | |
1014 | else | |
1015 | { | |
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); | |
1019 | } | |
1020 | } | |
1021 | @@ -506,7 +506,7 @@ | |
1022 | ||
1023 | if (error) | |
1024 | { | |
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); | |
1028 | return; | |
1029 | } | |
1030 | @@ -530,7 +530,7 @@ | |
1031 | } | |
1032 | else if (numread < 0 && error != EAGAIN) | |
1033 | { | |
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); | |
1037 | return; | |
1038 | } | |
1039 | @@ -647,7 +647,7 @@ | |
1040 | int res = pServer->Listen(m_pControlSocket->m_pSocket->GetAddressFamily(), port); | |
1041 | if (res) | |
1042 | { | |
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()); | |
1045 | delete pServer; | |
1046 | return 0; | |
1047 | } | |
1048 | @@ -717,7 +717,7 @@ | |
1049 | { | |
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()); | |
1054 | else | |
1055 | m_pControlSocket->LogMessage(::Error, _("Can't write data to file.")); | |
1056 | TransferEnd(transfer_failure_critical); | |
1057 | @@ -791,7 +791,7 @@ | |
1058 | { | |
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()); | |
1063 | else | |
1064 | m_pControlSocket->LogMessage(::Error, _("Can't write data to file.")); | |
1065 | TransferEnd(transfer_failure_critical); | |
3b1f2544 JR |
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 | |
1069 | @@ -3,8 +3,6 @@ | |
1070 | #include "aui_notebook_ex.h" | |
1071 | #include <wx/dcmirror.h> | |
1072 | ||
1073 | -wxColor wxAuiStepColour(const wxColor& c, int ialpha); | |
1074 | - | |
1075 | #ifdef __WXMSW__ | |
1076 | #define TABCOLOUR wxSYS_COLOUR_3DFACE | |
1077 | #else | |
1078 | @@ -67,8 +65,8 @@ | |
1079 | m_original_dc->DrawRectangle(x, y, width, height); | |
1080 | else | |
1081 | { | |
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); | |
1087 | } | |
1088 | } | |
1089 | @@ -77,7 +75,7 @@ | |
1090 | { | |
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); | |
1096 | } | |
1097 | } | |
1098 | @@ -96,8 +94,8 @@ | |
1099 | } | |
1100 | ||
1101 | // Dark theme | |
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); | |
1107 | } | |
1108 | else if (!m_type) | |
1109 | @@ -120,12 +118,12 @@ | |
1110 | if (m_gradient_called == 1) | |
1111 | { | |
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); | |
1118 | ||
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); | |
1124 | ||
1125 | if (!m_bottom) | |
1126 | @@ -145,11 +143,11 @@ | |
1127 | r2.height += 1; | |
1128 | ||
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); | |
1135 | ||
1136 | - wxColour new_dest = wxAuiStepColour(destColour, 65); | |
1137 | + wxColour new_dest = destColour.ChangeLightness(65); | |
1138 | if (!m_bottom) | |
1139 | r.height++; | |
1140 | m_original_dc->GradientFillLinear(r, new_dest, new_dest, nDirection); | |
1141 | @@ -171,13 +169,13 @@ | |
1142 | wxColour new_init, new_dest; | |
1143 | if (m_bottom) | |
1144 | { | |
1145 | - new_init = wxAuiStepColour(c, 70); | |
1146 | - new_dest = wxAuiStepColour(c, 100); | |
1147 | + new_init = c.ChangeLightness(70); | |
1148 | + new_dest = c.ChangeLightness(100); | |
1149 | } | |
1150 | else | |
1151 | { | |
1152 | - new_init = wxAuiStepColour(c, 85); | |
1153 | - new_dest = wxAuiStepColour(c, 100); | |
1154 | + new_init = c.ChangeLightness(85); | |
1155 | + new_dest = c.ChangeLightness(100); | |
1156 | } | |
1157 | m_original_dc->GradientFillLinear(rect, new_init, new_dest, nDirection); | |
1158 | } | |
1159 | @@ -185,7 +183,7 @@ | |
1160 | } | |
1161 | ||
1162 | #ifdef __WXGTK__ | |
1163 | - virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); } | |
1164 | +// virtual GdkWindow* GetGDKWindow() const { return m_original_dc->GetGDKWindow(); } | |
1165 | #endif | |
1166 | protected: | |
1167 | int m_gradient_called; | |
1168 | @@ -215,9 +213,9 @@ | |
1169 | virtual wxAuiTabArt* Clone() | |
1170 | { | |
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); | |
1178 | return art; | |
1179 | } | |
1180 | ||
1181 | @@ -257,12 +255,12 @@ | |
1182 | int* x_extent) | |
1183 | { | |
1184 | #ifndef __WXMAC__ | |
1185 | - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); | |
1186 | + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); | |
1187 | #endif | |
1188 | if (!pane.active) | |
1189 | { | |
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 ); | |
1194 | ||
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) | |
1199 | { | |
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); | |
1207 | } | |
1208 | - m_normal_font = m_highlighted_font; | |
1209 | + m_normalFont = m_highlighted_font; | |
1210 | } | |
1211 | else if (m_fonts_initialized) | |
1212 | - m_normal_font = m_original_normal_font; | |
1213 | + m_normalFont = m_original_normal_font; | |
1214 | } | |
1215 | ||
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); | |
1219 | ||
1220 | - m_base_colour = wxSystemSettings::GetColour(TABCOLOUR); | |
1221 | + m_baseColour = wxSystemSettings::GetColour(TABCOLOUR); | |
1222 | } | |
1223 | ||
1224 | virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect) | |
1225 | { | |
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); | |
1229 | } | |
1230 | protected: | |
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 | |
1234 | @@ -289,7 +289,7 @@ | |
1235 | ||
1236 | wxCommandEvent evt(fzEVT_GRANTEXCLUSIVEENGINEACCESS); | |
1237 | evt.SetId(m_requestId); | |
1238 | - m_pMainFrame->GetQueue()->AddPendingEvent(evt); | |
1239 | + m_pMainFrame->GetQueue()->GetEventHandler()->AddPendingEvent(evt); | |
1240 | } | |
1241 | ||
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 | |
1246 | @@ -11,6 +11,7 @@ | |
1247 | #ifdef __WXGTK__ | |
1248 | #include <gtk/gtk.h> | |
1249 | #endif | |
1250 | +#include <wx/dcclient.h> | |
1251 | ||
1252 | #ifndef __WXMSW__ | |
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 | |
1257 | @@ -145,8 +145,8 @@ | |
1258 | pass[i + 2] < '0' || pass[i + 2] > '9') | |
1259 | return _T(""); | |
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)]; | |
1266 | output += c; | |
1267 | } | |
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 | |
1271 | @@ -1,6 +1,7 @@ | |
1272 | #include <filezilla.h> | |
1273 | #include "led.h" | |
1274 | #include "filezillaapp.h" | |
1275 | +#include <wx/dcclient.h> | |
1276 | ||
1277 | #ifdef _DEBUG | |
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++) | |
1285 | { | |
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] == '.' || | |
1291 | version[i] == '_') | |
1292 | { | |
1293 | - url += c; | |
1294 | + url += version[i]; | |
1295 | } | |
1296 | } | |
1297 | } | |
1298 | @@ -779,7 +778,7 @@ | |
1299 | { | |
1300 | pStatusBar->Show(show); | |
1301 | wxSizeEvent evt; | |
1302 | - controls->pLocalListViewPanel->ProcessEvent(evt); | |
1303 | + controls->pLocalListViewPanel->GetEventHandler()->ProcessEvent(evt); | |
1304 | } | |
1305 | } | |
1306 | if (controls && controls->pRemoteListViewPanel) | |
1307 | @@ -789,7 +788,7 @@ | |
1308 | { | |
1309 | pStatusBar->Show(show); | |
1310 | wxSizeEvent evt; | |
1311 | - controls->pRemoteListViewPanel->ProcessEvent(evt); | |
1312 | + controls->pRemoteListViewPanel->GetEventHandler()->ProcessEvent(evt); | |
1313 | } | |
1314 | } | |
1315 | } | |
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++) | |
1322 | { | |
1323 | - wxChar& c = hexIP[i]; | |
1324 | - if (c == '.') | |
1325 | - c = '-'; | |
1326 | + if (hexIP[i] == '.') | |
1327 | + hexIP[i] = '-'; | |
1328 | else | |
1329 | - c = c - '0' + 'a'; | |
1330 | + hexIP[i] = hexIP[i] - '0' + 'a'; | |
1331 | } | |
1332 | ||
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) | |
1339 | { | |
1340 | event.SetEventObject(m_pQueue); | |
1341 | - m_pQueue->ProcessEvent(event); | |
1342 | + m_pQueue->GetEventHandler()->ProcessEvent(event); | |
1343 | } | |
1344 | ||
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 | |
1349 | @@ -135,7 +135,8 @@ | |
1350 | { | |
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; | |
1356 | } | |
1357 | }; | |
1358 | ||
1359 | @@ -814,9 +815,10 @@ | |
1360 | int len = sqlite3_column_bytes16(statement, index); | |
1361 | if (text) | |
1362 | { | |
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(); | |
1369 | if (shrink) | |
1370 | ret.Shrink(); | |
1371 | } | |
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 @@ | |
1376 | ||
1377 | wxString result; | |
1378 | ||
1379 | - wxChar* start = result.GetWriteBuf(filename.Len() + 1); | |
1380 | + wxStringBuffer strbuf(result, filename.Len() + 1); | |
1381 | + wxChar* start = strbuf; | |
1382 | wxChar* buf = start; | |
1383 | ||
1384 | const wxChar* p = filename.c_str(); | |
1385 | @@ -3457,7 +3458,7 @@ | |
1386 | } | |
1387 | *buf = 0; | |
1388 | ||
1389 | - result.UngetWriteBuf( buf - start ); | |
1390 | + strbuf.~wxStringBuffer(); | |
1391 | ||
1392 | return result; | |
1393 | } | |
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)) | |
1399 | { | |
1400 | event.SetEventObject(this); | |
1401 | - GetParent()->ProcessEvent(event); | |
1402 | + GetParent()->GetEventHandler()->ProcessEvent(event); | |
1403 | } | |
1404 | else if (!event.GetDirection() && event.GetEventObject() == m_pHost) | |
1405 | { | |
1406 | event.SetEventObject(this); | |
1407 | - GetParent()->ProcessEvent(event); | |
1408 | + GetParent()->GetEventHandler()->ProcessEvent(event); | |
1409 | } | |
1410 | else | |
1411 | event.Skip(); | |
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 | |
1415 | @@ -350,7 +350,7 @@ | |
1416 | SetItemImages(parent, false); | |
1417 | ||
1418 | #ifndef __WXMSW__ | |
1419 | - m_freezeCount--; | |
1420 | + Thaw(); | |
1421 | #endif | |
1422 | if (!modified) | |
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 | |
1427 | @@ -7,6 +7,7 @@ | |
1428 | #include "../themeprovider.h" | |
1429 | ||
1430 | #include <wx/scrolwin.h> | |
1431 | +#include <wx/dcclient.h> | |
1432 | ||
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 | |
1438 | @@ -11,6 +11,7 @@ | |
1439 | #include "xmlfunctions.h" | |
1440 | ||
1441 | #include <wx/dnd.h> | |
1442 | +#include <wx/dcclient.h> | |
1443 | ||
1444 | #ifdef __WXMSW__ | |
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 | |
1449 | @@ -6,6 +6,7 @@ | |
1450 | #include "statusbar.h" | |
1451 | #include "themeprovider.h" | |
1452 | #include "verifycertdialog.h" | |
1453 | +#include <wx/dcclient.h> | |
1454 | ||
1455 | static const int statbarWidths[3] = { | |
1456 | -3, 0, 35 | |
1457 | @@ -153,11 +154,8 @@ | |
1458 | void wxStatusBarEx::SetStatusText(const wxString& text, int number /*=0*/) | |
1459 | { | |
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) ) | |
1464 | { | |
1465 | - m_statusStrings[number] = text; | |
1466 | - | |
1467 | wxRect rect; | |
1468 | GetFieldRect(number, rect); | |
1469 | ||
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 | |
1473 | @@ -2,6 +2,7 @@ | |
1474 | #include "StatusView.h" | |
1475 | #include <wx/wupdlock.h> | |
1476 | #include "Options.h" | |
1477 | +#include <wx/dcclient.h> | |
1478 | ||
1479 | #ifdef _DEBUG | |
1480 | #define new DEBUG_NEW | |
1481 | @@ -58,7 +59,7 @@ | |
1482 | { | |
1483 | wxWindow* parent = GetParent(); | |
1484 | event.SetEventObject(parent); | |
1485 | - parent->ProcessEvent(event); | |
1486 | + parent->GetEventHandler()->ProcessEvent(event); | |
1487 | } | |
1488 | #else | |
1489 | void OnKeyDown(wxKeyEvent& event) | |
1490 | @@ -76,7 +77,7 @@ | |
1491 | navEvent.SetDirection(!event.ShiftDown()); | |
1492 | navEvent.SetFromTab(true); | |
1493 | navEvent.ResumePropagation(1); | |
1494 | - parent->ProcessEvent(navEvent); | |
1495 | + parent->GetEventHandler()->ProcessEvent(navEvent); | |
1496 | } | |
1497 | #endif | |
1498 | }; | |
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 | |
1502 | @@ -10,6 +10,7 @@ | |
1503 | #endif | |
1504 | ||
1505 | #include <wx/combobox.h> | |
1506 | +#include <wx/dcclient.h> | |
1507 | ||
1508 | #ifdef __WXMSW__ | |
1509 | const int border_offset = 0; | |
1510 | @@ -67,7 +68,7 @@ | |
1511 | navEvent.SetDirection(!event.ShiftDown()); | |
1512 | navEvent.SetFromTab(true); | |
1513 | navEvent.ResumePropagation(1); | |
1514 | - m_parent->ProcessEvent(navEvent); | |
1515 | + m_parent->GetEventHandler()->ProcessEvent(navEvent); | |
1516 | } | |
1517 | ||
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 | |
1522 | @@ -1,6 +1,7 @@ | |
1523 | // Based upon src/xrc/xh_toolb.cpp from wxWidgets | |
1524 | ||
1525 | #include <filezilla.h> | |
1526 | +#include <wx/xml/xml.h> | |
1527 | #include "xh_toolb_ex.h" | |
1528 | ||
1529 | wxSize wxToolBarXmlHandlerEx::m_iconSize(-1, -1); |