Commit Graph

306 Commits

Author SHA1 Message Date
Robin Dunn
06b08ecc05 Move fixDialogProperty to tweaker_tools, and use it on more property classes 2020-04-23 15:13:40 -07:00
Robin Dunn
2baac81cee Merge pull request #1579 from wxWidgets/fix-1567-AnimationDecoder
Use generic animation classes on all platforms
2020-04-06 20:16:51 -07:00
Per A. Brodtkorb
426258b7b7 Adding missing close for open and replaced "fid=open(filename) fid.close()"
statements with the safer "with open(filename) as fid:" blocks.

Also removed unnecessary "try: ... finally: pass" statements
and refactored code from img2py function into _write_image and _replace_non_alphanumeric_with_underscore

Fixes #1574
2020-03-25 10:36:38 +01:00
Robin Dunn
a263e02639 Some additional default typeVal items for the stubs generator 2020-03-24 18:39:20 -07:00
Robin Dunn
799d94b50f Enable adding extra TypeHeader text in wxListWrapperTemplate 2020-03-24 17:36:22 -07:00
Per A. Brodtkorb
e4e8bf8317 Fixes issue 1571:
Adding missing close for open.
If the "close()" call is missing after a "open(filename)" call, the filename isn't guaranteed to be closed before the interpreter exits.
This is generally a bad practice as explained here: https://stackoverflow.com/questions/7395542/is-explicitly-closing-files-important

Also replaced "fid=open(filename) fid.close()" statements for files with the safer
"with open(filename) as fid:" blocks. See https://www.python.org/dev/peps/pep-0343/
2020-03-23 17:16:44 +01:00
Per A. Brodtkorb
033c18fd9f Fixes issue #1556
Replaced XXX.keys() calls with idiomatic python 3 calls that are compatible with python 2 such as eg:
 * replaced "y = xxx.keys()" or "y = list(xxx.keys())" with just "y = list(xxx)"
 * replaced "sorted(xxx.keys())" or "sorted(list(xxx.keys()))" with just "sorted(xxx)"
 * replaced "if not A in B.keys():" with "if A not in B:"
 * replaced "for A in B.keys():"  with "for A in B:"

See also https://python-future.org/compatible_idioms.html
https://python-future.org/compatible_idioms.html#dict-keys-values-items-as-a-list
2020-03-20 18:51:19 +01:00
Robin Dunn
b503793e5e Add ability to make global name strings from a wchar_t constant 2020-03-17 17:46:56 -07:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
65c8397ddb Tweak 3.x versions in the docs to 4.x, to adjust for the difference in version numbers 2019-12-20 16:34:58 -08:00
Robin Dunn
8614e1ae09 Handle <ndash> and <mdash> tags in the docs xml 2019-10-30 18:19:25 -07:00
Robin Dunn
09404e63f5 Simplify postprocessing, remove changes no longer needed, or edit them for Sphinx 2.2.0. 2019-10-03 14:54:50 -07:00
Robin Dunn
b430a16ec3 Ensure sip knows that wxLog has a default ctor and a dtor 2019-08-13 15:25:40 -07:00
Robin Dunn
a09ddd8c27 Add some missing methods in BitmapComboBox 2019-07-17 12:00:41 -07:00
Robin Dunn
54dc9ac457 Add EnableSystemTheme method to the classes which support it 2019-06-12 13:33:26 -07:00
Robin Dunn
41a4841eb2 Fix extraction of the template parameter name 2019-05-29 14:14:43 -07:00
Robin Dunn
5d078557bf Lots of updates to get caught up with wxWidgets master (3.1.3+) 2019-05-23 21:43:40 -07:00
Robin Dunn
b24dc5088b Give char pointers a value in stubbed code
(cherry picked from commit fc14b8ecc4)
2019-05-21 16:14:29 -07:00
Robin Dunn
0378328d45 Merge pull request #1201 from RobinD42/fix-issue1198
Fix access to members of transient wx.VisualAttributes

(cherry picked from commit d6324a0578)
2019-04-13 16:25:55 -07:00
Robin Dunn
94ce8fc74a Merge pull request #1124 from RobinD42/fix-issue1123
Generate optional stubs for the wxFileSystemWatcher* classes
(cherry picked from commit 792d32a1c4)
2019-01-03 22:16:08 -08:00
Robin Dunn
2f540a91e6 Merge pull request #1034 from RobinD42/fix-issue958-291-wxAccessible
Add wxAccessible and a tool to generate C++ stubs

(cherry picked from commit 3a9f37f2aa)
2018-10-10 19:40:59 -07:00
Robin Dunn
41be300c46 Merge pull request #1022 from RobinD42/fix-issue972
Declare DeleteAllPages in the notebook subclasses

(cherry picked from commit 4b0f0e82c2)
2018-09-27 21:13:04 -07:00
Robin Dunn
974721b93f wxRealPoint::operator* truncates to int before assigning to the new point
object, which seems dumb. So let's make our own implementation which
preserves the floating point result.

(cherry picked from commit 8f07ca5c28)
2018-09-25 12:44:35 -07:00
Mesalu
d1262c44e2 Silently ignore missing methods. 2018-08-07 17:37:16 -07:00
Mesalu
e91ae38e90 Refactor tweaks into a tweaker_tools method, apply to wx.TextEntry, wx.ComboBox, and wx.RichTextCtrl 2018-08-07 17:22:55 -07:00
Robin Dunn
b5bb587145 Merge pull request #897 from RobinD42/add-windowidref
Add wx.WindowIDRef and wx.NewIdRef
2018-06-24 21:37:54 -07:00
Robin Dunn
b77c88a280 Merge tag 'wxPython-4.0.2' into wxPy-4.0.x
(cherry picked from commit 4c56c39e52)
2018-06-17 22:04:22 -07:00
Robin Dunn
156fece679 Merge pull request #838 from RobinD42/fix-issue836
Copy MethodDefs for Start and GetNext from base class
2018-04-30 22:08:21 -07:00
Robin Dunn
693863c2a5 Merge pull request #762 from mesalu/admonish_deprecation
Admonish deprecations
2018-02-22 22:08:02 -08:00
Robin Dunn
449e3056dc Move the deprecation check into a method and only call it from the types where we expect (and support) to find the deprecation tag. 2018-02-19 20:55:25 -08:00
Mesalu
9357988aa7 Comment fixes. 2018-02-19 15:18:14 -08:00
Mesalu
b7569e1e89 Refactor into BaseDef as per @RobinD42's request. 2018-02-19 15:15:07 -08:00
Mesalu
ddf23514e3 Use iteration over children to detect elements matching doxygen's deprecated tags. 2018-02-19 11:22:02 -08:00
Robin Dunn
8c4dffb091 Add virtual dtor for DC classes 2018-01-29 14:11:00 -08:00
Metallicow
c76384d458 Trim trailing whitespace *.py files 2018-01-16 08:47:07 -06:00
Robin Dunn
92468c7a87 Merge branch 'master' into port-gizmos 2018-01-08 20:32:33 -08:00
Mesalu
24a6db6cd9 Add similar tactics to wxArray (and variants)
According to RobinD42, use cases in wxPython should be limited to Arrays that are full (no gaps)
2018-01-06 11:36:39 -08:00
Mesalu
af084599a6 Allow Py-like reverse indexing of wxList 2018-01-06 02:04:41 -08:00
Robin Dunn
deb21aa2ed Merge branch 'master' into port-gizmos 2017-12-06 13:15:14 -08:00
Robin Dunn
03d1e1559c Add MappedType for wxMessageDialog::ButtonLabel,
so MessageDialog methods can take either string or stock IDs.
2017-11-18 19:26:42 -08:00
Robin Dunn
4120f3b56c fix typo 2017-11-01 16:04:58 -07:00
Robin Dunn
66b4a7966d Enable wxArray wrappers to return copy from __getitem__.
This solves problems where an array that is the return value of some method call is indexed immediately and a reference to the array is not held, which could result in garbage values for the indexed item. Currently this is turned on for just GridCellCoordsArray, but others can be switched in the future if needed.
2017-10-12 14:33:15 -07:00
Robin Dunn
fc2c6cda57 Add support for using the /Constrained/ annotation 2017-09-14 19:53:17 -07:00
Robin Dunn
c76880a6c3 Ensure all window classes declare GetClassDefaultAttributes.
Many do not actually have it, but the docs only declare it in wx.Window so we will miss the ones that really do have one unless we let sip know about them.
2017-09-12 16:07:44 -07:00
Robin Dunn
678d6d897f Ensure wx.Notebook (and other bookctrls) declare all the base virtual methods 2017-09-05 16:38:27 -07:00
Robin Dunn
6bf050289f Virtualize Get/SetProperty 2017-07-21 13:23:09 -07:00
Robin Dunn
2e706e7aba Set wx.RefCounter objects to be owned by C++.
Set the /Transfer/ annotation on the ctors, because the C++ objects will always own themselves and will delete themselves when their C++ refcount drops to zero.
2017-05-23 13:18:53 -07:00
Robin Dunn
efa81882e3 Also allow numpy arrays for sequence conversions to value types 2017-04-17 17:22:50 -07:00
Robin Dunn
0b57a79ab0 Merge branch 'master' into release-prep 2017-04-15 10:30:48 -07:00
Robin Dunn
52facb4d7f Add a GetIM() method to Colour, Point, Size, Rect and other ‘value’ types.
GetIM() returns a replicant of the original object that is immutable, so it can be used as a dictionary key, or etc., but still gives access to the properties by name, which using the Get() method to get a tuple of the values does not do.
2017-04-14 19:19:26 -07:00