Commit Graph

824 Commits

Author SHA1 Message Date
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
Robin Dunn
8e2627e8e3 Merge pull request #1564 from pbrod/Fix_issue1556
Fixes issue #1556
2020-03-20 15:19:40 -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
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
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
topic2k
3387de54d2 Use default position for PopupMenu in wx.lib.agw.ribbon.toolbar.RibbonToolBarEvent 2019-10-23 09:46:21 +02:00
topic2k
0335b898a4 Use default position for PopupMenu in wx.lib.agw.thumbnailctrl.ScrolledThumbnail 2019-10-23 09:45:48 +02:00
topic2k
b7c8ca6023 Use default position for PopupMenu in wx.lib.agw.aui.AuiDefaultTabArt 2019-10-23 09:44:31 +02:00
topic2k
12d33227d7 Use default position for PopupMenu in wx.lib.platebtn.PlateButton 2019-10-23 09:44:29 +02:00
topic2k
533113d07e Use default position for PopupMenu in wx.lib.masked.maskededit.MaskedEditMixin 2019-10-23 09:44:28 +02:00
topic2k
6179bc08c6 Use default position for PopupMenu in wx.lib.agw.hyperlink.HyperLinkCtrl 2019-10-23 09:44:25 +02:00
topic2k
f913668e0d Use default position for PopupMenu in wx.lib.agw.ribbon.buttonbar.RibbonButtonBarEvent 2019-10-23 09:43:54 +02:00
topic2k
b8544ffce5 Use default position for PopupMenu in wx.lib.agw.aui.auibar.AuiDefaultToolBarArt 2019-10-23 09:43:02 +02:00
Robin Dunn
5c09e4eec5 Also import the individual controlTypes constants as documented 2019-10-22 15:12:35 -07:00
Robin Dunn
aa01abddd0 Only use the selection fg color on the columns drawn with the selection bg 2019-10-11 15:15:59 -07:00
Robin Dunn
47c24c96e5 Make sure the default button face color is not one with a fully transparent alpha 2019-10-10 12:32:50 -07:00
Pappenreiter.Thomas
9f96e69ed4 Removing obsolte code block in hypertreelist 2019-10-10 10:23:07 +02:00
Pappenreiter.Thomas
a359f487ab fix issue 1389 2019-10-09 17:26:12 +02:00
Robin Dunn
3d132b719b Move drawing of the row lines to after the item backgrounds are drawn 2019-10-07 16:06:46 -07:00
Robin Dunn
03e8162c75 Use a transparent pen to ensure that the full rect is filled with the bg color, and any previously set pens will not clutter stuff up 2019-10-07 16:05:05 -07:00
Robin Dunn
8395898ea5 Merge branch 'improve-hypertreelist' of https://github.com/ThomasP0815/Phoenix into ThomasP0815-improve-hypertreelist 2019-10-07 13:35:23 -07:00
rr
9cba3914b6 Use the defined text color in a SuperToolTip
Previously, the text color was hardcoded as the system's text menu
color.
2019-09-27 08:25:04 +03:00
Robin Dunn
06d767d68a Merge pull request #1366 from l0stman/fix-intctrl
Initialize the old value of IntCtrl to the default one
2019-09-19 15:45:17 -07:00
rr
78cd863d2b Initialize the old value of IntCtrl to the default one
Previously, it was initialized to zero.  Thus, the EVT_INT event
wouldn't be triggered if we change the value to zero regardless of the
initial value.  This change fixes the issue.
2019-09-17 00:03:33 +03:00
topic2k
873fd00a41 time.clock() is removed in Python 3.8
Two more places where `time.clock()` is called. Adopt the imports accordingly.
2019-09-15 12:55:34 +02:00
Robin Dunn
fea9c980f8 Remove use of some constants that no longer exist in 4.1 2019-09-12 13:13:34 -07:00
Robin Dunn
537c5cec6e Merge pull request #1323 from wxWidgets/add-wxsvg
Add support for parsing and rendering SVG files
2019-09-11 23:23:27 -07:00
Robin Dunn
6206d20bad Various small tweaks and fixes 2019-09-11 12:56:11 -07:00