Commit Graph

27 Commits

Author SHA1 Message Date
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
Scott Talbert
173d079681 Fix a bunch of Python 3.10 issues with pure-Python classes and demos
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision.  This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets.  There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.

Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.

This is an example of the relevant exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
    r.width = w
TypeError: 'float' object cannot be interpreted as an integer

Fixes #2038.

[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Robin Dunn
75f1081f84 Merge branch 'spelling-fixes' 2020-07-16 20:13:31 -07:00
Robin Dunn
d265d13f6c Spelling fixes in the demo 2020-07-14 12:00:55 -07:00
Scott Talbert
3a7748db47 PG Demo: OR the "help as tooltips" flag instead of setting
This fixes an issue on GTK3 platforms with HiDPI screens.  When using
SetExtraStyle(), all of the existing flags, including native double buffering,
were being cleared.  GTK3 currently has issues when native double buffering is
disabled, so this ensures that the existing default flags aren't overwritten.
2020-07-14 10:06:53 -04:00
Scott Talbert
b2cce38d12 Fix some wxPy 4.1 issues with the PropertyGrid demo
This addresses some issues reported in #1636.
2020-06-04 10:44:54 -04:00
Robin Dunn
5d011f4f04 Merge pull request #877 from RobinD42/fix-issue742
Fix GetValueFromControl and StringToValue
(cherry picked from commit 53c03f9203)
2018-06-04 20:39:25 -07:00
Robin Dunn
76bdfdb4c9 Docstring tweaks 2018-02-13 17:15:09 -08:00
Robin Dunn
4ce9c2b46f Various other propgrid related tweaks 2017-09-14 19:57:26 -07:00
Robin Dunn
1caf4fd24c ImageFileWithLargeEditor is still not great, but it at least doesn't endlessly recurse, or crash any more. 2017-07-21 15:39:58 -07:00
Robin Dunn
261706fca9 tweaks for testing 2017-07-21 13:24:03 -07:00
Robin Dunn
3a24ceb87c Use DoGetEditorClass instead of GetEditor 2017-06-29 12:37:47 -07:00
Robin Dunn
b9287ac78e Add a password property to the PropGrid demo 2017-06-16 20:45:47 -07:00
Robin Dunn
17d110da96 Transfer ownership of arg in AddPrivateChild. 2017-06-14 18:45:31 -07:00
Robin Dunn
9ceff621de Various propgrid demo fixes 2017-06-02 15:29:51 -07:00
Robin Dunn
76df4153bb propgrid demo tweaks 2017-03-11 20:25:25 -08:00
Robin Dunn
97d138914c Use super() 2017-02-24 16:50:20 -08:00
Robin Dunn
8fcc3e3a5d minor demo tweaks 2017-02-24 16:09:47 -08:00
Robin Dunn
ece44c3a20 more little demo fixes 2017-02-21 17:25:07 -08:00
Robin Dunn
f5c5f3365a Minor demo tweaks 2017-02-21 12:46:28 -08:00
Robin Dunn
afce6de5e2 Begin porting the propgrid sample 2017-02-20 19:31:04 -08:00
Metallicow
c273dfa9b1 Trim Trailing Whitespace demos 2016-11-24 19:26:05 -06:00
Robin Dunn
ed4756b902 Remove wx.lib.six and use the stock six module instead,
and add it as an installation dependency.
2016-06-30 20:07:57 -07:00
Robin Dunn
a9595b241a PR64: Various Phoenix and Py3 fixes for the demo and library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 04:48:21 +00:00
Robin Dunn
558fcfa5a3 PR61: Added python shebangs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:44:14 +00:00
Robin Dunn
2bf5a267fa PR58: More fixes for Phoenix deprecations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:20:07 +00:00
Robin Dunn
f96e25db1f Copy the wxPython demo from Classic
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 18:24:09 +00:00