Ticket #8272 (new Patch)

Opened 18 months ago

Last modified 2 months ago

FileZilla wxWidgets 2.9 support

Reported by: esminis Owned by:
Priority: normal Component: FileZilla Client
Keywords: wxwidgets Cc:
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

filezilla.wx9.patch Download (29.7 KB) - added by esminis 18 months ago.
FileZilla wxWidgets 2.9 support
filezilla.wx9.updated.diff Download (65.2 KB) - added by esminis 8 months ago.
filezilla.wx9.updated.2.diff Download (65.2 KB) - added by esminis 8 months ago.
filezilla.wx9.updated.3.diff Download (66.3 KB) - added by esminis 8 months ago.
filezilla.wx9.updated.4.diff Download (66.5 KB) - added by esminis 8 months ago.
filezilla-3.7.4_wxWidgets-3.0.diff Download (33.5 KB) - added by mojca 2 months ago.
A patch for FileZilla 3.7.4 (based on esminis' patch, but without the patch for configure.in)

Change History

Changed 18 months ago by esminis

FileZilla wxWidgets 2.9 support

Changed 8 months ago by mojca

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.

Changed 8 months ago by esminis

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

Changed 8 months ago by mojca

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

Changed 8 months ago by esminis

Changed 8 months ago by esminis

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

Changed 8 months ago by esminis

Changed 8 months ago by esminis

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

Changed 8 months ago by mojca

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.

Changed 8 months ago by esminis

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

Changed 8 months ago by mojca

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?

Changed 8 months ago by esminis

Sorry I cant help u any more with Mac.

Changed 8 months ago by esminis

Changed 8 months ago by esminis

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, ...).

Changed 8 months ago by mojca

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?

Changed 8 months ago by esminis

Changed 8 months ago by esminis

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

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


Attached updated patch.

Changed 3 months ago by sl1pkn07

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

Changed 3 months ago by esminis

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

Changed 2 months ago by mojca

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

Changed 2 months ago by mojca

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.)

Note: See TracTickets for help on using tickets.