Opened 12 years ago

Closed 10 years ago

#8272 closed Patch (fixed)

FileZilla wxWidgets 2.9 support

Reported by: Tautvydas Andrikys Owned by:
Priority: normal Component: FileZilla Client
Keywords: wxwidgets Cc:
Component version: Operating system type:
Operating system version:

Description

I have created patch to support wxWidgets 2.9, tested it on Windows 7 Visual Studio build and Kubuntu Linux wxGtk build.

Attachments (8)

filezilla.wx9.patch (29.7 KB ) - added by Tautvydas Andrikys 12 years ago.
FileZilla wxWidgets 2.9 support
filezilla.wx9.updated.diff (65.2 KB ) - added by Tautvydas Andrikys 11 years ago.
filezilla.wx9.updated.2.diff (65.2 KB ) - added by Tautvydas Andrikys 11 years ago.
filezilla.wx9.updated.3.diff (66.3 KB ) - added by Tautvydas Andrikys 11 years ago.
filezilla.wx9.updated.4.diff (66.5 KB ) - added by Tautvydas Andrikys 11 years ago.
filezilla-3.7.4_wxWidgets-3.0.diff (33.5 KB ) - added by Mojca Miklavec 10 years ago.
A patch for FileZilla 3.7.4 (based on esminis' patch, but without the patch for configure.in)
filezilla-3.8.0_wxWidgets-3.0.diff (33.8 KB ) - added by Mojca Miklavec 10 years ago.
A patch for FileZilla 3.8.0 (without configure.in)
filezilla-3.8.1-rc3_wxWidgets-3.0.diff (33.8 KB ) - added by Mojca Miklavec 10 years ago.
A patch for FileZilla 3.8.1-rc3 (without configure.in)

Download all attachments as: .zip

Change History (25)

by Tautvydas Andrikys, 12 years ago

Attachment: filezilla.wx9.patch added

FileZilla wxWidgets 2.9 support

comment:1 by Mojca Miklavec, 11 years ago

Do you also have a patch against a more recent version of FileZilla? I tried to apply it against a recent version with some care (semi-manually), but I didn't manage to make it work.

comment:2 by Tautvydas Andrikys, 11 years ago

No, I made this patch long time ago. I could probably look into this and update patch, but not sure when.

comment:3 by Mojca Miklavec, 11 years ago

No problem. If you happen to get back to it, please let me know.

(I had to add some Mac-specific patches on top of yours, but I figured it would take me forever to get it working without any experience with wxWidgets.)

Thanks

by Tautvydas Andrikys, 11 years ago

Attachment: filezilla.wx9.updated.diff added

comment:4 by Tautvydas Andrikys, 11 years ago

I have updated patch, but haven`t checked how it works on windows, tested only on Linux.

by Tautvydas Andrikys, 11 years ago

comment:5 by Tautvydas Andrikys, 11 years ago

Use filezilla.wx9.updated.2.diff it fixes one problem with my previous patch.

comment:6 by Mojca Miklavec, 11 years ago

Thank you very much. On OS X 10.7 it compiles fine except for two remaining errors:

FileZilla.cpp: In member function ‘virtual bool CFileZillaApp::OnInit()’:
FileZilla.cpp:270: error: conversion from ‘const wxString’ to ‘bool’ is ambiguous
/opt/local/include/wx-2.9/wx/string.h:1677: note: candidates are: wxString::operator const void*() const
/opt/local/include/wx-2.9/wx/string.h:1672: note:                 wxString::operator const wchar_t*() const
/opt/local/include/wx-2.9/wx/string.h:1671: note:                 wxString::operator const char*() const


listctrlex.cpp: In member function ‘wxScrolledWindow* wxListCtrlEx::GetMainWindow() const’:
listctrlex.cpp:77: error: ‘m_genericImpl’ was not declared in this scope

I commented out the first line in changed the second one to become return (wxScrolledWindow*)m_mainWin; just to enable compilation to finish, but I have no clue what the proper patch would be.

comment:7 by Tautvydas Andrikys, 11 years ago

For FileZilla.cpp I think You should check if string is not empty(not sure thou):

if (pInfo && !pInfo->Description.IsEmpty())

For listctrlex.cpp I think it should be:

#ifdef __WXMAC__ && !wxCHECK_VERSION(2, 9, 0) 
return (wxScrolledWindow*)m_genericImpl->m_mainWin;
#else
return (wxScrolledWindow*)m_mainWin;
#endif

comment:8 by Mojca Miklavec, 11 years ago

This is what I get after a successful compilation:

wxWidgets Debug Alert

../src/osx/combobox_osx.cpp(61): assert "!(style & wxCB_SORT)" failed in Create(): wxCB_SORT not currently supported by wxOSX/Cocoa

Call stack:
[00] wxComboBox::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, wxArrayString const&, long, wxValidator const&, wxString const&) 
[01] wxComboBox::wxComboBox(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, wxArrayString const&, long, wxValidator const&, wxString const&) 	combobox.h:7
[02] CComboBoxEx::CComboBoxEx(CViewHeader*)  	viewheader.cpp:2
[03] CViewHeader::CViewHeader(wxWindow*, wxString const&) 	viewheader.cpp:10
[04] CLocalViewHeader::CLocalViewHeader(wxWindow*, CState*) 	viewheader.cpp:36
[05] CContextControl::CreateContextControls(CState*) 	context_control.cpp:21
[06] CContextControl::CreateTab()            	context_control.cpp:8
[07] CMainFrame::CMainFrame()                	Mainfrm.cpp:33
[08] CFileZillaApp::OnInit()                 	FileZilla.cpp:32
[09] wxApp::CallOnInit()                     
[10] wxEntry(int&, wchar_t**)                
[11] main                                    	FileZilla.cpp:6
[12] start                                   
[13] 0x00000002                              

Do you want to stop the program?
You can also choose [Cancel] to suppress further warnings.

but the program starts (and keeps displaying other warnings for other actions).

Is any FileZilla developer keeping an eye on this ticket?

comment:9 by Tautvydas Andrikys, 11 years ago

Sorry I cant help u any more with Mac.

by Tautvydas Andrikys, 11 years ago

comment:10 by Tautvydas Andrikys, 11 years ago

I have updated with fixes for Mac, there is one problem left on Mac thou: in debug mode you will see assert warnings when opening site manager dialog I am leaving it unfixed couse it looks like it might be filezilla wrap engine problem(due to not supporting wxChoice, wxCheckbox, ...).

comment:11 by Mojca Miklavec, 11 years ago

Thank you. But one remark. You changed

if (!pInfo || !SetLocale(pInfo->Language))
	if (pInfo && pInfo->Description)

into

if (pInfo && !pInfo->Description.IsEmpty())
	if (pInfo && !pInfo->Description.IsEmpty()) ...
	else ...

That new code doesn't sound right. The else part cannot ever be executed. Btw: is there any difference between !pInfo->Description.IsEmpty() and pInfo->Description != "".

Is any FileZilla developer reading this thread?

by Tautvydas Andrikys, 11 years ago

comment:12 by Tautvydas Andrikys, 11 years ago

Yes you are totally correct - it was accidental copy/paste, this line should not be changed:

if (!pInfo || !SetLocale(pInfo->Language))


Attached updated patch.

comment:15 by sl1pkn07, 11 years ago

Hunk #1 FAILED at 365.
1 out of 1 hunk FAILED -- saving rejects to file src/engine/misc.cpp.rej

any update patch?

any plans to update wxwidgets to version 3.0.x?

greetings

comment:16 by Tautvydas Andrikys, 11 years ago

Hi,

Sry not planning to modify this patch 3rd time, if you are planning to submit patch then you can update it, cause it will probably be trivial fix.

And for now not planning to create new patch for wxWidgets 3.0.x support

by Mojca Miklavec, 10 years ago

A patch for FileZilla 3.7.4 (based on esminis' patch, but without the patch for configure.in)

comment:17 by Mojca Miklavec, 10 years ago

I attached a patch for version 3.7.4 that we are using in MacPorts (http://trac.macports.org/browser/trunk/dports/www/FileZilla/files/patch-wxWidgets-3.0.diff). It's basically the same as esminis' patch, except that the line numbers are fixed to match version 3.7.4 and I made a blind modification in src/engine/misc.cpp. I also left out the patch for configure.in and m4/wxwin.m4, but I hope they are straightforward to fix.

FileZilla compiles and starts fine, but there are a bunch of issues left and it keeps throwing some gui errors.

Any further patches welcome. (Any help convincing the developers to fix compatibility with wxWidgets 3.0 welcome as well.)

by Mojca Miklavec, 10 years ago

A patch for FileZilla 3.8.0 (without configure.in)

by Mojca Miklavec, 10 years ago

A patch for FileZilla 3.8.1-rc3 (without configure.in)

comment:18 by Mojca Miklavec, 10 years ago

Patches adapted to the latest releases.

comment:19 by Tim Kosse, 10 years ago

Resolution: fixed
Status: newclosed

Thanks for the patch, however it contains a number of major bugs:

  • Log messages not displaying correctly, e.g. the hostname is being

truncated.

  • Segfault if the "Synchronized browsing" button is clicked in the toolbar
  • Clicking the speedlimit icon in the status bar triggers an assert

followed by a segfault

  • wxString semantics have changed, it used to be that strings were always null-terminated. That is no longer the case, accessing the character that would have been null now either segfaults, asserts or returns a random value.
  • Several strings are no longer translated
  • File->Export triggers an assert
  • Certificate verification dialog lacks issuer/subject details

The fix for these and other problems has been committed to the FileZilla repository.

Note: See TracTickets for help on using tickets.