Commit Graph

967 Commits

Author SHA1 Message Date
Robin Dunn
d8af08a52d Merge pull request #1590 from wxWidgets/fix-issue1581
Use different typecheck code for wxArrayInt and wxArrayString in variant conversions
2020-04-08 10:35:50 -07:00
Robin Dunn
2c03076fa6 Stop fly-out timers before closing the floating pane. 2020-04-07 19:16:01 -07:00
Robin Dunn
7de301c105 Use different typecheck code for wxArrayInt and wxArrayString in variant conversions 2020-04-07 18:30:07 -07:00
Robin Dunn
8750ef29f1 Fix additional incorrect sizer flags 2020-04-06 20:51:09 -07:00
Robin Dunn
a1bfc230e8 Merge branch 'patch-1' of https://github.com/kg-2/Phoenix into kg-2-patch-1 2020-04-06 20:41:34 -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
kg-2
17e580334b Update genericmessagedialog.py
*fixed sizer flags issue in preparation for wxpython 4.1
*fixed unhandled icon style case, will raise ValueError for bad icon mask flag
*fixed general code formatting issues
2020-04-06 07:55:05 -07:00
Robin Dunn
de25f3091f Merge pull request #1576 from pbrod/Fix_issue1570_use_of_tempfile
Fixes issue #1570:
2020-04-01 15:40:07 -07:00
Robin Dunn
7aac38dbcb Updates needed for animation updates in wxWidgets 2020-04-01 15:30:27 -07:00
Per A. Brodtkorb
5cf6dc565e Fixes #1570
Replaced the unsafe "tfname = tempfile.mktemp()" call with
"with tempfile.NamedTemporaryFile(delete=False) as fid: tfname = fid.name"

Also removed unused "import glob"
2020-03-25 11:27:49 +01: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
Robin Dunn
764abb41bf Don't use relative imports in the tools scripts 2020-03-20 15:21:23 -07:00
Robin Dunn
8e2627e8e3 Merge pull request #1564 from pbrod/Fix_issue1556
Fixes issue #1556
2020-03-20 15:19:40 -07:00
Robin Dunn
68e8650a4d Merge pull request #1563 from pbrod/Fix_issue1555
Fixes issue 1555
2020-03-20 15:06:21 -07: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
Per A. Brodtkorb
05ac589e2d Fixes issue 1555
Replace open-close statements by the use of "with"-blocks.

With the "With" statement, you get better syntax and exceptions handling.

"The with statement simplifies exception handling by encapsulating common
preparation and cleanup tasks."

In addition, it will automatically close the file. The with statement provides
a way for ensuring that a clean-up is always used.
2020-03-20 15:03:09 +01:00
Per A. Brodtkorb
f2dbd64253 Fixes issue #1557 by replacing call to tempfile.mktemp with tempfile.NamedTemporaryFile. 2020-03-20 14:51:28 +01:00
Robin Dunn
1f33298627 Add new font families and weights 2020-03-13 10:42:08 -07:00
Robin Dunn
ad4fd0db53 Initialize self._middleicon, verify it is valid before trying to use it 2020-03-13 10:40:00 -07:00
Robin Dunn
9f2cc54b48 Update copyright years 2020-03-10 11:41:39 -07:00
Linneweber, Thorben, Dr. (G-GEAC)
9dc006f6a7 Fixed a bug in the tabHeight calculation. 2020-02-27 10:21:09 +01:00
Robin Dunn
c1b18e0cc2 Merge pull request #1524 from Metallicow/fix2-time.clock
time.clock is removed in py3.8 use perf_counter
2020-02-26 20:00:28 -08:00
Metallicow
63268a83f6 time.clock is removed in py3.8 use perf_counter
time.clock is removed in py3.8 use perf_counter
2020-02-21 03:00:55 -06:00
Robin Dunn
73e6aa759c Initialize __oldvalue 2020-02-18 15:12:01 -08:00
Robin Dunn
99f4506929 Merge pull request #1516 from jmoraleda/bugfix1350
Fixes pdfviewer when using PyMuPDF version 1.15 or above. Fixes #1350
2020-02-18 14:48:57 -08:00
Jorge Moraleda
54b065f1fd Always perform full initialization of pdfViewer so that expected pdfViewer attributes always exist. Now, instead of performing a partial initialization, correctly handle the case where the containing window is still being initialized and is not reporting a correct client size. Fixes issue #1177 2020-02-17 18:00:02 -08:00
Jorge Moraleda
0e15258d96 Fixes pdfviewer when using PyMuPDF version 1.15 or above. Fixes #1350 2020-02-13 16:53:13 -08:00
Metallicow
733c38850b fix links http: -> https: 2020-01-20 23:00:08 -06:00
Robin Dunn
c51cdd2334 Merge pull request #1474 from wxWidgets/fix-wget-typos
Fix typos and trim whitespace
2019-12-31 16:08:30 -08:00
Robin Dunn
e3ef0db163 Fix typos and trim whitespace 2019-12-31 14:13:20 -08:00
Kevin Schlosser
da89035e82 corrects moving of the text in the ctrl when resize occurs.
This was caused by the use of GetClientSize being used when the control is constructed and then event.GetSize() when a size event took place. These 2 methods eturn different values and causes the text to shift. After this issue was solved another issue existed. there is a border around the control. this border is not directly specified to be drawn when the widget is rendered. the dc defaults to a white pen with a width of 1. a pen is not set before drawing the box. so the white pen there for gets used. This white border is not taken into consideration when the text is drawn and causes the text to be offset slightly. this corrects the offset issue. There is also no calculation in place to determine the actual width and actual height of each character and without having that it is more like a guess to figure out exactly where to draw the characters to have them be centered correctly inside of the box. I kept the same mechanism in place and made an adjustment to fix this issue i believe. I do think that the current wat it is being done makes the code a tad more difficult to read and could be simplified. This is something I may take care of in a future PR.
2019-12-22 01:43:34 -07:00
Robin Dunn
42762bb439 Fix typo 2019-12-10 13:04:53 -08:00
Robin Dunn
bd2b8e972b iteritems --> items 2019-12-05 13:01:08 -08:00
Robin Dunn
f3b370b6da Merge pull request #1448 from wxWidgets/fix-issue1444
Verify parameter types for Check and Set3StateValue
2019-11-22 15:58:06 -08:00
Robin Dunn
e1c44da146 Verify parameter types for Check and Set3StateValue 2019-11-22 13:39:16 -08:00
Scott Talbert
d050934321 Fix SyntaxWarning in wx.lib.masked.maskededit 2019-11-22 10:41:58 -05:00
Robin Dunn
171df70a43 Fix SyntaxWarnings 2019-11-14 12:22:45 -08:00
Robin Dunn
8f5bfd6484 Add option to the plot demo for toggling the scrollbars 2019-11-13 12:00:52 -08:00
Robin Dunn
5b91b8443e Decouple showScrollbars property from the actual showing/hiding of the scrollbar widgets. Instead it indicates whether the scrollbars are allowed to be shown if _adjustScrollbars() determines that they are needed.
Also fix issues with calculating scrolled view positions when scrolling with the scrollbars.
2019-11-13 12:00:32 -08:00
Robin Dunn
8e054e37bf More long() --> int() fixes 2019-11-12 13:52:06 -08:00
Robin Dunn
9740c8e455 Use stock IDs for stock menu items 2019-11-12 11:45:42 -08:00
Robin Dunn
5c9716f503 Switch from layout constraints to a sizer 2019-11-12 11:45:05 -08:00
Robin Dunn
f76ff43755 Update siplib for 4.19.19 2019-11-08 19:07:19 -08:00
Robin Dunn
840ba95f30 switch wx.svg to use wxPython's version number, instead of its own 2019-11-01 15:24:29 -07:00
Robin Dunn
db9781dcdf fix typos 2019-10-31 12:28:48 -07:00
topic2k
3387de54d2 Use default position for PopupMenu in wx.lib.agw.ribbon.toolbar.RibbonToolBarEvent 2019-10-23 09:46:21 +02:00