summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Tsoy <alexander@tsoy.me>2023-12-18 05:36:00 +0300
committerSam James <sam@gentoo.org>2023-12-22 06:43:44 +0000
commita4a6f67841aa6aedf6cc17509c208783591f3731 (patch)
tree9db1dfa1ee2d9e1fa4001ad9df89b2cf198d6a4f /net-p2p/amule
parentx11-wm/marco: drop 1.26.0, 1.26.1 (diff)
downloadgentoo-a4a6f67841aa6aedf6cc17509c208783591f3731.tar.gz
gentoo-a4a6f67841aa6aedf6cc17509c208783591f3731.tar.bz2
gentoo-a4a6f67841aa6aedf6cc17509c208783591f3731.zip
net-p2p/amule: port to wxGTK 3.2
Apply Debian patch with fixes for wxWidgets 3.2 compatibility Thanks-to: ernsteiswuerfel <erhard_f@mailbox.org> Closes: https://bugs.gentoo.org/915906 Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-p2p/amule')
-rw-r--r--net-p2p/amule/amule-2.3.3-r3.ebuild160
-rw-r--r--net-p2p/amule/amule-9999.ebuild11
-rw-r--r--net-p2p/amule/files/amule-2.3.3-wx3.2.patch461
3 files changed, 627 insertions, 5 deletions
diff --git a/net-p2p/amule/amule-2.3.3-r3.ebuild b/net-p2p/amule/amule-2.3.3-r3.ebuild
new file mode 100644
index 000000000000..e982384b3612
--- /dev/null
+++ b/net-p2p/amule/amule-2.3.3-r3.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools flag-o-matic wxwidgets xdg-utils
+
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/amule-project/amule"
+ inherit git-r3
+else
+ MY_P="${PN/m/M}-${PV}"
+ SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz"
+ S="${WORKDIR}/${MY_P}"
+ KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+DESCRIPTION="aMule, the all-platform eMule p2p client"
+HOMEPAGE="http://www.amule.org/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="daemon debug geoip nls remote stats upnp +X"
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/crypto++:=
+ sys-libs/binutils-libs:0=
+ sys-libs/readline:0=
+ sys-libs/zlib
+ x11-libs/wxGTK:${WX_GTK_VER}[X?]
+ daemon? ( acct-user/amule )
+ geoip? ( dev-libs/geoip )
+ nls? ( virtual/libintl )
+ remote? (
+ acct-user/amule
+ media-libs/libpng:0=
+ )
+ stats? ( media-libs/gd:=[jpeg,png] )
+ upnp? ( net-libs/libupnp:0 )
+"
+DEPEND="${RDEPEND}
+ X? ( dev-util/desktop-file-utils )
+"
+BDEPEND="
+ virtual/pkgconfig
+ >=sys-devel/boost-m4-0.4_p20221019
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.2-disable-version-check.patch"
+ "${FILESDIR}/${PN}-2.3.3-fix-exception.patch"
+ "${FILESDIR}/${P}-autoconf-2.70.patch"
+ "${FILESDIR}/${PN}-2.3.3-backport-pr368.patch"
+ "${FILESDIR}/${PN}-2.3.3-wx3.2.patch"
+)
+
+pkg_setup() {
+ setup-wxwidgets
+}
+
+src_prepare() {
+ default
+ rm m4/boost.m4 || die
+
+ if [[ ${PV} == 9999 ]]; then
+ ./autogen.sh || die
+ else
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use debug || append-cppflags -DwxDEBUG_LEVEL=0
+ append-cxxflags -std=gnu++14
+
+ local myconf=(
+ --with-denoise-level=0
+ --with-wx-config="${WX_CONFIG}"
+ --enable-amulecmd
+ --with-boost
+ $(use_enable debug)
+ $(use_enable daemon amule-daemon)
+ $(use_enable geoip)
+ $(use_enable nls)
+ $(use_enable remote webserver)
+ $(use_enable stats cas)
+ $(use_enable stats alcc)
+ $(use_enable upnp)
+ )
+
+ if use X; then
+ myconf+=(
+ $(use_enable remote amule-gui)
+ $(use_enable stats alc)
+ $(use_enable stats wxcas)
+ )
+ else
+ myconf+=(
+ --disable-monolithic
+ --disable-amule-gui
+ --disable-alc
+ --disable-wxcas
+ )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+
+ if use daemon; then
+ newconfd "${FILESDIR}"/amuled.confd-r1 amuled
+ newinitd "${FILESDIR}"/amuled.initd amuled
+ fi
+ if use remote; then
+ newconfd "${FILESDIR}"/amuleweb.confd-r1 amuleweb
+ newinitd "${FILESDIR}"/amuleweb.initd amuleweb
+ fi
+
+ if use daemon || use remote; then
+ keepdir /var/lib/${PN}
+ fowners amule:amule /var/lib/${PN}
+ fperms 0750 /var/lib/${PN}
+ fi
+}
+
+pkg_postinst() {
+ local ver
+
+ if use daemon || use remote; then
+ for ver in ${REPLACING_VERSIONS}; do
+ if ver_test ${ver} -lt "2.3.2-r4"; then
+ elog "Default user under which amuled and amuleweb daemons are started"
+ elog "have been changed from p2p to amule. Default home directory have been"
+ elog "changed as well."
+ echo
+ elog "If you want to preserve old download/share location, you can create"
+ elog "symlink /var/lib/amule/.aMule pointing to the old location and adjust"
+ elog "files ownership *or* restore AMULEUSER and AMULEHOME variables in"
+ elog "/etc/conf.d/{amuled,amuleweb} to the old values."
+
+ break
+ fi
+ done
+ fi
+
+ use X && xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ use X && xdg_desktop_database_update
+}
diff --git a/net-p2p/amule/amule-9999.ebuild b/net-p2p/amule/amule-9999.ebuild
index c1743eff2384..3a74fe6369d0 100644
--- a/net-p2p/amule/amule-9999.ebuild
+++ b/net-p2p/amule/amule-9999.ebuild
@@ -2,18 +2,18 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-WX_GTK_VER="3.0-gtk3"
+WX_GTK_VER="3.2-gtk3"
-inherit flag-o-matic wxwidgets xdg-utils
+inherit autotools flag-o-matic wxwidgets xdg-utils
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/amule-project/amule"
- inherit autotools git-r3
+ inherit git-r3
else
MY_P="${PN/m/M}-${PV}"
SRC_URI="https://download.sourceforge.net/${PN}/${MY_P}.tar.xz"
S="${WORKDIR}/${MY_P}"
- KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
DESCRIPTION="aMule, the all-platform eMule p2p client"
@@ -29,7 +29,7 @@ RDEPEND="
sys-libs/binutils-libs:0=
sys-libs/readline:0=
sys-libs/zlib
- >=x11-libs/wxGTK-3.0.4:${WX_GTK_VER}[X?]
+ x11-libs/wxGTK:${WX_GTK_VER}[X?]
daemon? ( acct-user/amule )
geoip? ( dev-libs/geoip )
nls? ( virtual/libintl )
@@ -53,6 +53,7 @@ PATCHES=(
"${FILESDIR}/${PN}-2.3.2-disable-version-check.patch"
"${FILESDIR}/${PN}-2.3.3-fix-exception.patch"
"${FILESDIR}/${PN}-2.3.3-backport-pr368.patch"
+ "${FILESDIR}/${PN}-2.3.3-wx3.2.patch"
)
pkg_setup() {
diff --git a/net-p2p/amule/files/amule-2.3.3-wx3.2.patch b/net-p2p/amule/files/amule-2.3.3-wx3.2.patch
new file mode 100644
index 000000000000..58590c60f2df
--- /dev/null
+++ b/net-p2p/amule/files/amule-2.3.3-wx3.2.patch
@@ -0,0 +1,461 @@
+Description: Fixes for wxWidgets 3.2 compatibility
+ Largely based on patch from Mr Hyde <mrhyde@MM2018.local> in
+ https://github.com/amule-project/amule/pull/168
+Author: Olly Betts <olly@survex.com>
+Bug: https://github.com/amule-project/amule/issues/340
+Bug-Debian: https://bugs.debian.org/1019841
+Forwarded: no
+Last-Update: 2023-01-09
+
+--- a/src/ColorFrameCtrl.cpp
++++ b/src/ColorFrameCtrl.cpp
+@@ -61,7 +61,7 @@
+ /////////////////////////////////////////////////////////////////////////////
+ void CColorFrameCtrl::SetFrameBrushColour(const wxColour& colour)
+ {
+- m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID));
++ m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID));
+
+ Refresh(FALSE);
+ } // SetFrameColor
+@@ -70,7 +70,7 @@
+ /////////////////////////////////////////////////////////////////////////////
+ void CColorFrameCtrl::SetBackgroundBrushColour(const wxColour& colour)
+ {
+- m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID));
++ m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID));
+
+ // clear out the existing garbage, re-start with a clean plot
+ Refresh(FALSE);
+--- a/src/DownloadListCtrl.cpp
++++ b/src/DownloadListCtrl.cpp
+@@ -850,7 +850,7 @@
+ dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
+ dc->SetPen( colour.Blend(65).GetPen() );
+ } else {
+- dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID)));
++ dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID)));
+ dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ dc->SetPen(*wxTRANSPARENT_PEN);
+ }
+@@ -1413,7 +1413,7 @@
+ dc->DrawLine( rect.x, rect.y + 2, rect.x + width, rect.y + 2 );
+
+ // Draw the green line
+- dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxSOLID ) ));
++ dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxPENSTYLE_SOLID ) ));
+ dc->DrawLine( rect.x, rect.y + 1, rect.x + width, rect.y + 1 );
+ }
+ }
+--- a/src/GenericClientListCtrl.cpp
++++ b/src/GenericClientListCtrl.cpp
+@@ -660,7 +660,7 @@
+ dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
+ dc->SetPen( colour.Blend(65).GetPen() );
+ } else {
+- dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID)));
++ dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID)));
+ dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ dc->SetPen(*wxTRANSPARENT_PEN);
+ }
+--- a/src/MuleColour.cpp
++++ b/src/MuleColour.cpp
+@@ -35,7 +35,7 @@
+ std::map<uint32_t, wxPen*> wxPenCache;
+ std::map<uint32_t, wxBrush*> wxBrushCache;
+
+-const wxPen& CMuleColour::GetPen(int width, int style) const
++const wxPen& CMuleColour::GetPen(int width, wxPenStyle style) const
+ {
+ #if USE_MULE_PEN_CACHE
+ wxPen* result = NULL;
+@@ -61,7 +61,7 @@
+ #endif
+ }
+
+-const wxBrush& CMuleColour::GetBrush(int style) const
++const wxBrush& CMuleColour::GetBrush(wxBrushStyle style) const
+ {
+ #if USE_MULE_BRUSH_CACHE
+ wxBrush* result = NULL;
+--- a/src/MuleColour.h
++++ b/src/MuleColour.h
+@@ -27,6 +27,9 @@
+
+ #include <wx/colour.h>
+ #include <wx/settings.h>
++#include <wx/pen.h> // needed for wxPenStyle enum values
++#include <wx/brush.h> // needed for wxBrushStyle enum values
++#include <wx/font.h> // needed for wxFontStyle enum values
+ #include "Types.h"
+
+ class wxPen;
+@@ -95,8 +98,8 @@
+ return wxColor(m_red, m_green, m_blue);
+ }
+
+- const wxPen& GetPen(int width = 1, int style = wxSOLID) const;
+- const wxBrush& GetBrush(int style = wxSOLID) const;
++ const wxPen& GetPen(int width = 1, wxPenStyle style = wxPENSTYLE_SOLID) const;
++ const wxBrush& GetBrush(wxBrushStyle style = wxBRUSHSTYLE_SOLID) const;
+
+ private:
+ uint8_t m_red;
+--- a/src/MuleGifCtrl.cpp
++++ b/src/MuleGifCtrl.cpp
+@@ -167,7 +167,7 @@
+ int x = (clientsize.GetWidth()-gifsize.GetWidth())/2;
+ int y = (clientsize.GetHeight()-gifsize.GetHeight())/2;
+
+- dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID)));
++ dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID)));
+ dc.Clear();
+ dc.DrawBitmap(m_frame, x, y, true);
+ }
+--- a/src/OScopeCtrl.cpp
++++ b/src/OScopeCtrl.cpp
+@@ -74,7 +74,7 @@
+ PlotData_t* ppds = pdsTrends;
+ for(unsigned i=0; i<nTrends; ++i, ++ppds){
+ ppds->crPlot = (i<15 ? crPreset[i] : *wxWHITE);
+- ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxSOLID));
++ ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxPENSTYLE_SOLID));
+ ppds->fPrev = ppds->fLowerLimit = ppds->fUpperLimit = 0.0;
+ }
+
+@@ -166,7 +166,7 @@
+ if (ppds->crPlot == cr)
+ return;
+ ppds->crPlot = cr;
+- ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxSOLID));
++ ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxPENSTYLE_SOLID));
+ InvalidateGraph();
+ }
+
+@@ -179,7 +179,7 @@
+ }
+
+ m_bgColour = cr;
+- brushBack= *(wxTheBrushList->FindOrCreateBrush(cr, wxSOLID));
++ brushBack= *(wxTheBrushList->FindOrCreateBrush(cr, wxBRUSHSTYLE_SOLID));
+ InvalidateCtrl() ;
+ }
+
+@@ -196,7 +196,7 @@
+
+ wxMemoryDC dcGrid(m_bmapGrid);
+
+- wxPen solidPen = *(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxSOLID));
++ wxPen solidPen = *(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxPENSTYLE_SOLID));
+ wxString strTemp;
+
+ // fill the grid background
+@@ -213,7 +213,7 @@
+ dcGrid.SetPen(wxNullPen);
+
+ // create some fonts (horizontal and vertical)
+- wxFont axisFont(10, wxSWISS, wxNORMAL, wxNORMAL, false);
++ wxFont axisFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false);
+ dcGrid.SetFont(axisFont);
+
+ // y max
+@@ -320,7 +320,7 @@
+ // operation, preventing us from simply blitting the plot on top of
+ // the grid bitmap.
+
+- dc.SetPen(*(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxLONG_DASH)));
++ dc.SetPen(*(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxPENSTYLE_LONG_DASH)));
+ for (unsigned j = 1; j < (nYGrids + 1); ++j) {
+ unsigned GridPos = (m_rectPlot.GetHeight())*j/( nYGrids + 1 ) + m_rectPlot.GetTop();
+
+--- a/src/SearchListCtrl.cpp
++++ b/src/SearchListCtrl.cpp
+@@ -826,7 +826,7 @@
+
+ // Define the border of the drawn area
+ if (highlighted) {
+- dc->SetPen(*(wxThePenList->FindOrCreatePen(CMuleColour(dc->GetBackground().GetColour()).Blend(65), 1, wxSOLID)));
++ dc->SetPen(*(wxThePenList->FindOrCreatePen(CMuleColour(dc->GetBackground().GetColour()).Blend(65), 1, wxPENSTYLE_SOLID)));
+ } else {
+ dc->SetPen(*wxTRANSPARENT_PEN);
+ dc->SetTextForeground(GetItemTextColour(item));
+@@ -912,7 +912,7 @@
+ const int middle = cur_rec.y + ( cur_rec.height + 1 ) / 2;
+
+ // Set up a new pen for drawing the tree
+- dc->SetPen( *(wxThePenList->FindOrCreatePen(dc->GetTextForeground(), 1, wxSOLID)) );
++ dc->SetPen( *(wxThePenList->FindOrCreatePen(dc->GetTextForeground(), 1, wxPENSTYLE_SOLID)) );
+
+ if (file->GetParent()) {
+ // Draw the line to the filename
+--- a/src/ServerListCtrl.cpp
++++ b/src/ServerListCtrl.cpp
+@@ -327,7 +327,7 @@
+ wxFont font = GetFont();
+
+ if ( highlight ) {
+- font.SetWeight( wxBOLD );
++ font.SetWeight( wxFONTWEIGHT_BOLD );
+
+ m_connected = server;
+ }
+--- a/src/extern/wxWidgets/listctrl.cpp
++++ b/src/extern/wxWidgets/listctrl.cpp
+@@ -1453,7 +1453,7 @@
+ if ( highlighted )
+ dc->SetBrush( m_owner->GetHighlightBrush() );
+ else
+- dc->SetBrush(*(wxTheBrushList->FindOrCreateBrush(attr->GetBackgroundColour(), wxSOLID)));
++ dc->SetBrush(*(wxTheBrushList->FindOrCreateBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID)));
+
+ dc->SetPen( *wxTRANSPARENT_PEN );
+
+@@ -2325,7 +2325,7 @@
+ (
+ wxSYS_COLOUR_HIGHLIGHT
+ ),
+- wxSOLID
++ wxBRUSHSTYLE_SOLID
+ ));
+
+ m_highlightUnfocusedBrush = *(wxTheBrushList->FindOrCreateBrush(
+@@ -2333,7 +2333,7 @@
+ (
+ wxSYS_COLOUR_BTNSHADOW
+ ),
+- wxSOLID
++ wxBRUSHSTYLE_SOLID
+ ));
+
+ SetScrollbars( 0, 0, 0, 0, 0, 0 );
+@@ -2734,7 +2734,7 @@
+
+ // Ensure an uniform background color, as to avoid differences between
+ // the automatically cleared parts and the rest of the canvas.
+- dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID)));
++ dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID)));
+
+ // We need to clear the DC manually, since we intercept BG-erase events.
+ // Clearing must be done first thing because caching of the double-buffering causes artifacts otherwise.
+@@ -2805,7 +2805,7 @@
+
+ if ( HasFlag(wxLC_HRULES) )
+ {
+- wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxSOLID));
++ wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxPENSTYLE_SOLID));
+ wxSize clientSize = GetClientSize();
+
+ size_t i = visibleFrom;
+@@ -2831,7 +2831,7 @@
+ // Draw vertical rules if required
+ if ( HasFlag(wxLC_VRULES) && !IsEmpty() )
+ {
+- wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxSOLID));
++ wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxPENSTYLE_SOLID));
+ wxRect firstItemRect, lastItemRect;
+
+ GetItemRect(visibleFrom, firstItemRect);
+@@ -4859,12 +4859,15 @@
+
+ void wxListMainWindow::OnScroll(wxScrollWinEvent& event)
+ {
++ // wxScrolledWindows::OnScroll is deprecated in wx 3.0.0 and it does not exist anymore in 3.1.0.
++ // Please also notice that call to
++ // - wxScrolledWindow::OnScroll
++ // - HandleOnScroll
++ // have been removed in code present in
++ // src/generic/listctrl.cpp, wxListMainWindow::OnScroll
++ // of wxWidgets 3.0
+ // FIXME
+-#if ( defined(__WXGTK__) || defined(__WXMAC__) ) && !defined(__WXUNIVERSAL__)
+- wxScrolledWindow::OnScroll(event);
+-#else
+ HandleOnScroll( event );
+-#endif
+
+ // update our idea of which lines are shown when we redraw the window the
+ // next time
+--- a/src/extern/wxWidgets/listctrl.h
++++ b/src/extern/wxWidgets/listctrl.h
+@@ -16,7 +16,6 @@
+ #include <wx/textctrl.h>
+
+ #define wxLC_OWNERDRAW 0x10000
+-#define WXWIN_COMPATIBILITY_2_8 1
+
+ #include <wx/imaglist.h>
+
+--- a/src/muuli_wdr.cpp
++++ b/src/muuli_wdr.cpp
+@@ -77,7 +77,7 @@
+
+ CMuleTextCtrl *item4 = new CMuleTextCtrl( parent, -1, wxT(""), wxDefaultPosition, wxSize(-1,20), wxTE_MULTILINE );
+ item4->SetName( wxT("FastEd2kLinks") );
+- item2->Add( item4, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 );
++ item2->Add( item4, 1, wxALL|wxEXPAND, 5 );
+
+ wxButton *item5 = new wxButton( parent, ID_BUTTON_FAST, _("Commit"), wxDefaultPosition, wxDefaultSize, 0 );
+ item5->SetToolTip( _("Click here to add the eD2k link in the text control to your download queue.") );
+@@ -474,7 +474,7 @@
+ item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+
+ CSourceListCtrl *item6 = new CSourceListCtrl( parent, ID_CLIENTLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
+- item0->Add( item6, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item0->Add( item6, 1, wxGROW, 5 );
+
+ if (set_sizer)
+ {
+@@ -1048,7 +1048,7 @@
+ wxWindow *item3 = new COScopeCtrl(3,1,GRAPH_DOWN,parent);
+ item3->SetName(wxT("dloadScope"));
+ wxASSERT( item3 );
+- item1->Add( item3, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item1->Add( item3, 1, wxGROW|wxALL, 5 );
+
+ wxFlexGridSizer *item4 = new wxFlexGridSizer( 2, 0, 0 );
+ item4->AddGrowableCol( 0 );
+@@ -1089,7 +1089,7 @@
+
+ item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
+
+- item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
++ item0->Add( item1, 1, wxGROW|wxBOTTOM, 5 );
+
+ wxStaticBox *item15 = new wxStaticBox( parent, -1, _("Upload-Speed") );
+ wxStaticBoxSizer *item14 = new wxStaticBoxSizer( item15, wxVERTICAL );
+@@ -1097,7 +1097,7 @@
+ wxWindow *item16 = new COScopeCtrl(3,1,GRAPH_UP,parent);
+ item16->SetName(wxT("uloadScope"));
+ wxASSERT( item16 );
+- item14->Add( item16, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item14->Add( item16, 1, wxGROW|wxALL, 5 );
+
+ wxFlexGridSizer *item17 = new wxFlexGridSizer( 2, 0, 0 );
+ item17->AddGrowableCol( 0 );
+@@ -1138,7 +1138,7 @@
+
+ item14->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
+
+- item0->Add( item14, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
++ item0->Add( item14, 1, wxGROW|wxBOTTOM, 5 );
+
+ wxStaticBox *item28 = new wxStaticBox( parent, -1, _("Connections") );
+ wxStaticBoxSizer *item27 = new wxStaticBoxSizer( item28, wxVERTICAL );
+@@ -1146,7 +1146,7 @@
+ wxWindow *item29 = new COScopeCtrl(3,0,GRAPH_CONN,parent);
+ item29->SetName(wxT("otherScope"));
+ wxASSERT( item29 );
+- item27->Add( item29, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item27->Add( item29, 1, wxGROW|wxALL, 5 );
+
+ wxFlexGridSizer *item30 = new wxFlexGridSizer( 2, 0, 0 );
+ item30->AddGrowableCol( 0 );
+@@ -1187,16 +1187,15 @@
+
+ item27->Add( item30, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 );
+
+- item0->Add( item27, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item0->Add( item27, 1, wxGROW|wxALL, 5 );
+
+ wxStaticBox *item41 = new wxStaticBox( parent, -1, _("Statistics Tree") );
+ wxStaticBoxSizer *item40 = new wxStaticBoxSizer( item41, wxVERTICAL );
+
+ wxTreeCtrl *item42 = new wxTreeCtrl( parent, -1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxSUNKEN_BORDER );
+ item42->SetName( wxT("statTree") );
+- item40->Add( item42, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+-
+- item0->Add( item40, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
++ item40->Add( item42, 1, wxGROW|wxALL, 5 );
++ item0->Add( item40, 1, wxGROW|wxALL, 5 );
+
+ if (set_sizer)
+ {
+@@ -2030,7 +2029,7 @@
+
+ wxStaticText *item2 = new wxStaticText( parent, -1, _("!!! WARNING !!!"), wxDefaultPosition, wxDefaultSize, 0 );
+ item2->SetForegroundColour( *wxRED );
+- item2->SetFont( wxFont( 24, wxROMAN, wxNORMAL, wxNORMAL ) );
++ item2->SetFont( wxFont( 24, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) );
+ item1->Add( item2, 0, wxALIGN_CENTER, 5 );
+
+ wxStaticText *item3 = new wxStaticText( parent, IDC_AMULE_TWEAKS_WARNING, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
+--- a/src/utils/wxCas/src/wxcasframe.cpp
++++ b/src/utils/wxCas/src/wxcasframe.cpp
+@@ -280,11 +280,11 @@
+ #ifdef __WINDOWS__
+
+ memdc.
+- SetFont ( wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) );
++ SetFont ( wxFont ( 6, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ) );
+ #else
+
+ memdc.
+- SetFont ( wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) );
++ SetFont ( wxFont ( 8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ) );
+ #endif
+
+ memdc.
+--- a/src/amuleDlg.cpp
++++ b/src/amuleDlg.cpp
+@@ -763,7 +763,7 @@
+ if ( (true == skinChanged) || (currentState != s_oldState) ) {
+ wxWindowUpdateLocker freezer(m_wndToolbar);
+
+- wxToolBarToolBase* toolbarTool = m_wndToolbar->RemoveTool(ID_BUTTONCONNECT);
++ wxToolBarToolBase* toolbarTool = m_wndToolbar->FindById(ID_BUTTONCONNECT);
+
+ switch (currentState) {
+ case ECS_Connecting:
+@@ -784,8 +784,6 @@
+ toolbarTool->SetNormalBitmap(m_tblist.GetBitmap(0));
+ }
+
+- m_wndToolbar->InsertTool(0, toolbarTool);
+- m_wndToolbar->Realize();
+ m_wndToolbar->EnableTool(ID_BUTTONCONNECT, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia()) && theApp->ipfilter->IsReady());
+
+ s_oldState = currentState;
+@@ -1416,7 +1414,7 @@
+ wxWindowUpdateLocker freezer(this);
+ #endif
+
+- wxToolBarToolBase* toolbarTool = m_wndToolbar->RemoveTool(ID_BUTTONNETWORKS);
++ wxToolBarToolBase* toolbarTool = m_wndToolbar->FindById(ID_BUTTONNETWORKS);
+
+ // set the log windows
+ wxNotebook* logs_notebook = CastChild( ID_SRVLOG_NOTEBOOK, wxNotebook);
+@@ -1507,12 +1505,9 @@
+
+ // Tool bar
+
+- m_wndToolbar->InsertTool(2, toolbarTool);
+ m_wndToolbar->EnableTool(ID_BUTTONNETWORKS, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia()));
+ m_wndToolbar->EnableTool(ID_BUTTONCONNECT, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia()) && theApp->ipfilter->IsReady());
+
+- m_wndToolbar->Realize();
+-
+ ShowConnectionState(); // status in the bottom right
+ m_searchwnd->FixSearchTypes();
+ }
+--- a/src/amule-gui.cpp
++++ b/src/amule-gui.cpp
+@@ -28,6 +28,7 @@
+ #include <common/ClientVersion.h>
+
+ #include <wx/clipbrd.h> // Needed for wxClipBoard
++#include <wx/sizer.h>
+ #include <wx/tokenzr.h> // Needed for wxStringTokenizer
+
+ #include "SharedFilesWnd.h" // Needed for CSharedFilesWnd
+@@ -98,6 +99,11 @@
+
+ CamuleGuiBase::CamuleGuiBase()
+ {
++ // Disable these checks for now. The code really needs updating to
++ // eliminate these inconsistent flag uses, but these checks are new
++ // since wx3.0, and this should just return us to what 3.0 did.
++ wxSizerFlags::DisableConsistencyChecks();
++
+ amuledlg = NULL;
+ }
+