Skip to content

Commit 9fd143c

Browse files
committed
Add support for wxWidgets 3.3, bump minimum to 3.2
This updates to support wxWidgets 3.3. This amounts to replacing an obsolete version of the `wxDropTarget` constructor with a version that also works under 3.2. This also bumps the minimum wxWidgets version to 3.2 from 3.1.
1 parent f35ec44 commit 9fd143c

7 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/osxbinary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- name: Install dependencies
1717
run: |
1818
brew install automake autoconf
19-
curl -L -O https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxWidgets-3.2.6.tar.bz2
20-
tar xjf wxWidgets-3.2.6.tar.bz2
21-
cd wxWidgets-3.2.6
19+
curl -L -O https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.8/wxWidgets-3.2.8.tar.bz2
20+
tar xjf wxWidgets-3.2.8.tar.bz2
21+
cd wxWidgets-3.2.8
2222
mkdir build-release
2323
cd build-release
2424
../configure --disable-shared --disable-sys-libs

.github/workflows/tools.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242
- name: Install dependencies
43-
run: brew install automake autoconf wxwidgets@3.2
43+
run: brew install automake autoconf wxwidgets
4444
- run: aclocal
4545
- run: automake --add-missing
4646
- run: autoconf
47-
- run: ./configure --with-wx-config=wx-config-3.2
47+
- run: ./configure
4848
- run: make
4949
- run: sudo make install
5050
- run: make osx-dmg

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### General
66
- Officially added support for Python 3.13.
7+
- For graphical interface, added support for wxWidgets 3.3; require minimum of wxWidgets 3.2.
78

89
### Removed
910
- The deprecated functions `Game.read_game`, `Game.parse_game` and `Game.write` functions have

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ if test x$with_gui = xtrue; then
6363
dnl------------------------
6464

6565
dnl check for wx-config
66-
AM_PATH_WXCONFIG(3.1.0, WXCONFIG=1)
66+
AM_PATH_WXCONFIG(3.2.0, WXCONFIG=1)
6767
if test "$WXCONFIG" != 1; then
6868
AC_MSG_WARN([
6969
Did not find a new enough version of wxWidgets; disabling build of
7070
graphical interface. If you want to build the graphical interface,
7171
please check that wx-config is in path, the directory
7272
where wxWidgets libraries are installed (returned by
7373
'wx-config --libs' command) is in LD_LIBRARY_PATH or
74-
equivalent variable and wxWidgets is version 3.1.0 or above.
74+
equivalent variable and wxWidgets is version 3.2.0 or above.
7575
])
7676
AM_CONDITIONAL(WITH_GUI, test x0 = x1)
7777
fi

src/gui/efgdisplay.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
852852
// Copy subtree
853853
const wxBitmap bitmap(tree_xpm);
854854
#if defined(__WXMSW__) or defined(__WXMAC__)
855-
const wxImage image = bitmap.ConvertToImage();
855+
const auto image = wxCursor(bitmap.ConvertToImage());
856856
#else
857857
wxIcon image;
858858
image.CopyFromBitmap(bitmap);
@@ -867,7 +867,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
867867
// This should be the pawn icon!
868868
const wxBitmap bitmap(move_xpm);
869869
#if defined(__WXMSW__) or defined(__WXMAC__)
870-
const wxImage image = bitmap.ConvertToImage();
870+
const auto image = wxCursor(bitmap.ConvertToImage());
871871
#else
872872
wxIcon image;
873873
image.CopyFromBitmap(bitmap);
@@ -882,7 +882,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
882882
// Move subtree
883883
const wxBitmap bitmap(tree_xpm);
884884
#if defined(__WXMSW__) or defined(__WXMAC__)
885-
const wxImage image = bitmap.ConvertToImage();
885+
const auto image = wxCursor(bitmap.ConvertToImage());
886886
#else
887887
wxIcon image;
888888
image.CopyFromBitmap(bitmap);
@@ -901,7 +901,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
901901
if (node && node->GetOutcome()) {
902902
const wxBitmap bitmap = MakeOutcomeBitmap();
903903
#if defined(__WXMSW__) or defined(__WXMAC__)
904-
const wxImage image = bitmap.ConvertToImage();
904+
const auto image = wxCursor(bitmap.ConvertToImage());
905905
#else
906906
wxIcon image;
907907
image.CopyFromBitmap(bitmap);

src/gui/efgpanel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void gbtTreePlayerIcon::OnLeftClick(wxMouseEvent &)
201201
const wxBitmap bitmap(person_xpm);
202202

203203
#if defined(__WXMSW__) or defined(__WXMAC__)
204-
const wxImage image = bitmap.ConvertToImage();
204+
const auto image = wxCursor(bitmap.ConvertToImage());
205205
#else
206206
wxIcon image;
207207
image.CopyFromBitmap(bitmap);
@@ -460,7 +460,7 @@ void gbtTreeChanceIcon::OnLeftClick(wxMouseEvent &)
460460
const wxBitmap bitmap(dice_xpm);
461461

462462
#if defined(__WXMSW__) or defined(__WXMAC__)
463-
const wxImage image = bitmap.ConvertToImage();
463+
const auto image = wxCursor(bitmap.ConvertToImage());
464464
#else
465465
wxIcon image;
466466
image.CopyFromBitmap(bitmap);

src/gui/nfgpanel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void gbtTablePlayerIcon::OnLeftClick(wxMouseEvent &)
6969
const wxBitmap bitmap(person_xpm);
7070

7171
#if defined(__WXMSW__) or defined(__WXMAC__)
72-
const wxImage image = bitmap.ConvertToImage();
72+
const auto image = wxCursor(bitmap.ConvertToImage());
7373
#else
7474
wxIcon image;
7575
image.CopyFromBitmap(bitmap);

0 commit comments

Comments
 (0)