53 Commits

Author SHA1 Message Date
Alexandre Detiste
66a9320917 finish removing six 2025-02-02 20:30:33 -05:00
Alexandre Detiste
0257f755cf remove most of Python2 compatibility code 2025-02-02 20:17:45 -05:00
DietmarSchwertberger
7e2c7d69c9 remove demo dependency on distutils; fixes issue 2519 2024-01-24 23:51:43 +01:00
Robin Dunn
0295297913 Use images on the Notebook tabs on Mac too, and clean up some other old hacks 2022-06-07 19:28:24 -07:00
Robin Dunn
1eef4d9390 Add InitLocale method 2021-10-26 12:35:04 -07:00
Robin Dunn
15b5f94e3b minor demo tweaks 2020-10-13 13:22:31 -07:00
Robin Dunn
d265d13f6c Spelling fixes in the demo 2020-07-14 12:00:55 -07:00
Scott Talbert
c38e5297bf Fix event.Checked() calls in demo
Fixes #1652
2020-05-28 17:34:34 -04: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
7a05d20d82 Merge pull request #1572 from pbrod/Fix_issue1571
Fixes issue 1571:
2020-03-23 16:07:22 -07:00
Robin Dunn
41c5af9cde Merge pull request #1569 from pbrod/Fix_issue1554
Fixes issue # 1554:
2020-03-23 15:35:41 -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
fc1823315b Fixes issue # 1554:
Replaced "== None" and "!= None" with "is None" and "is not None", respectively, because the former is slower and error-prone.
2020-03-23 11:53:36 +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
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Robin Dunn
7734fb1f10 Minor demo tweaks 2019-10-29 15:22:44 -07:00
Robin Dunn
762863aae0 Only decode the file content on Py2 2019-10-22 15:26:08 -07:00
Robin Dunn
6206d20bad Various small tweaks and fixes 2019-09-11 12:56:11 -07:00
Mesalu
033fe60a92 Fix logic so command line switch overrides system settings. 2019-06-17 15:47:01 -07:00
Mesalu
a805eed69a Attempts to enforce system settings in the demo page panel.
Adds a block in the wx.stc.StyledTextCtrl version of DemoPageEditor that will try to match system settings for caret period.
Also adds the ability to read a switch off of sys.argv to manually disable cursor blinking.
2019-06-17 15:37:47 -07:00
Robin Dunn
f0e0d80dd8 workaround bad default size of wx.SearchCtrl on gtk3
(cherry picked from commit 1d1f4f712a)
2019-04-12 20:33:06 -07:00
Robin Dunn
705aa63d75 Merge branch 'more-windowidref' into wxPy-4.0.x
(cherry picked from commit ada7b2fc51)
2018-06-25 19:12:00 -07:00
Robin Dunn
b1b0c9e297 wx.NewId() --> wx.ID_ANY or wx.Window.NewControlId() as appropriate 2018-06-19 10:31:56 -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
32e1341df2 Sizers now assert if there is an alignment flag used with wx.EXPAND 2018-02-10 12:53:48 -08:00
Robin Dunn
97002a8803 Not sure why it was commented out, but the taskbar icon needs to be destroyed in order for the MainLoop to exit normally. 2017-08-04 17:19:48 -07:00
Ben Hagen
ba7f63cba4 Use wx.Icon instead of wx.IconFromBitmap 2017-07-09 13:14:38 +02:00
Robin Dunn
9754a8e15a typo in comment 2017-04-07 12:21:46 -07:00
Robin Dunn
4b16ccc7d1 Update copyright in demo 2017-02-13 15:30:04 -08:00
Metallicow
c273dfa9b1 Trim Trailing Whitespace demos 2016-11-24 19:26:05 -06:00
Robin Dunn
07a5a1a9f9 The InspectionTool will call Init() itself when needed, we don't need to do it here. 2016-08-24 14:14:07 -07: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
549df8a6d0 Merge branch 'gtk3' of git://github.com/swt2c/Phoenix into gtk3 2016-03-02 18:26:08 -08:00
Robin Dunn
9b789781c4 Change main_globals to demodata 2016-02-29 22:40:59 -08:00
Werner F Bruhin
4c45ee11db - last one from me for the work Metallicow has done
- adding a few demos
- moved demo list and image list to external module
2016-02-29 22:40:59 -08:00
Scott Talbert
a57bec2e71 Add support for building with GTK3 2016-02-29 20:22:58 -05:00
Robin Dunn
73e5622e54 Fix loose version check 2016-02-28 22:37:54 -08:00
Robin Dunn
ca15e52650 Merge pull request #22 from wernerfb/2015-july-demo
demo corrections and loosening demo version check
2016-02-27 16:50:47 -08:00
Robin Dunn
85301c6c0d Icons on notebook tabs look VERY non-native on Mac. 2015-12-01 18:25:51 -08:00
wernerfb
760fba6ca9 - customtreectrl is now in wx.lib.agw 2015-07-06 14:09:18 +02:00
wernerfb
d9d75bb835 - loosen demo version check 2015-07-06 14:08:49 +02:00
Robin Dunn
571668a23f Remove the old CVS $Id: tags.
They don't work in git, and don't work by default in SVN either.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 02:39:35 +00: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
48dbde99f3 Some changes needed for the demo framework to start up and run with Py3.
Probably still needs some more work...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 08:28:06 +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
ea181b5b72 PR57: Mainly style changes, a few white space stuff and an xrange to range change.
* Phoenix FONTFAMILY, STYLE, WEIGHT Fixes
* PENSTYLE_ & BRUSHSTYLE_ Fixes
* Fix FONTWEIGHT to FONTSTYLE typo
* Phoenix Deprecations: wx.OPEN to wx.FD_OPEN
* Phoenix Deprecations: wx.SAVE to wx.FD_SAVE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:19:55 +00:00
Robin Dunn
495309db7d New RichToolTip Demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 22:24:56 +00:00
Robin Dunn
015592545a tree.GetItemPyData to tree.GetItemData
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 22:23:55 +00:00
Robin Dunn
e009fbd7d0 New NotificationMessage Demo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 22:22:55 +00:00
Robin Dunn
4f8e935257 Generate demo/version.py in the build script.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 06:18:20 +00:00