Commit Graph

4038 Commits

Author SHA1 Message Date
Robin Dunn
6167177c1a Add a button to the mainloop sample to test wx.PostEvent
(cherry picked from commit 53219c9e00)
2019-02-27 12:59:17 -08:00
Robin Dunn
005fcc90c6 fix typo
(cherry picked from commit 53e8370e02)
2019-02-27 12:59:06 -08:00
Robin Dunn
fd1c26d2e1 Add info about wx.NewIdRef to MigrationGuid, and update OnHTMLOpeningURL section too. 2019-02-12 18:51:28 -08:00
Robin Dunn
4b39ae25af Merge pull request #1167 from RobinD42/fix-issue1068
Fix the use of the output parameter in HtmlWindow.OnOpeningURL
(cherry picked from commit c201f558bd)
2019-02-12 17:36:44 -08:00
Robin Dunn
7b9a27321a Add changelog item for #1150
(cherry picked from commit 5c70b8624d)
2019-02-02 16:07:33 -08:00
Robin Dunn
38ebb70786 Merge pull request #1143 from RobinD42/fix-issue1140
Added missing setters for the wheel-related properties in wx.MouseEvent
(cherry picked from commit c3cbf2e68a)
2019-01-15 16:03:04 -08:00
Robin Dunn
35990a6027 Merge pull request #1142 from RobinD42/fix-issue1141
Added missing HtmlWindow.ScrollToAnchor method
(cherry picked from commit 47c3d96760)
2019-01-15 16:02:52 -08:00
Robin Dunn
beac13c0bb Merge pull request #1131 from swt2c/fix_access_test
Xfail unimplemented access test instead of failing it
(cherry picked from commit 92fc4afa9d)
2019-01-15 16:02:37 -08:00
Robin Dunn
58e9c1da8c Merge pull request #1130 from swt2c/fix_joystick_stubs
Fix joystick stub compilation
(cherry picked from commit 4d50f773ab)
2019-01-15 16:02:16 -08:00
Robin Dunn
fde6792936 Merge pull request #1127 from swt2c/fix_vlbox_test
Fix vlbox test on Python 3
(cherry picked from commit 8c9b379bc4)
2019-01-15 16:01:59 -08:00
Robin Dunn
13d32e3ef5 Add section for 4.0.5
(cherry picked from commit c9948488d49603f3c761e674f5f8ed551e633d89)
2019-01-15 14:06:56 -08:00
Robin Dunn
f975c392c5 Fix some stub generator warnings 2019-01-08 11:25:00 -08:00
Robin Dunn
30a4c8b680 Final tweaks from 4.0.4 for CHANGES.rst 2019-01-08 11:00:20 -08: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
1d427573b3 Merge pull request #1122 from kg-2/patch-1
Update FCObjects.py
2019-01-03 21:59:06 -08:00
kg-2
f8add4de3f Update FCObjects.py
raises a ValueError instead of an AttributeError b/c self.Image is never set
2019-01-02 19:08:40 -08:00
Robin Dunn
b02def8ce6 A little more info in the changelog
(cherry picked from commit 8245182fc2)
2019-01-02 16:16:16 -08:00
Robin Dunn
b34f320faa Add changelog item for hhctrl.ocx fix
(cherry picked from commit de840d4654)
2019-01-02 16:15:55 -08:00
Robin Dunn
c3879c4a83 Merge pull request #1118 from RobinD42/fix-issue1095
Add missing methods in wx.ListBox
(cherry picked from commit f0224794ab)
2018-12-31 15:20:34 -08:00
Robin Dunn
f4984db1b5 Move new item to end of list, and fixed typos 2018-12-21 14:47:36 -08:00
Robin Dunn
999bf9f92b Merge pull request #1096 from Metallicow/aui-fixes-Dec2018
Aui fixes dec2018
(cherry picked from commit d3deff2ed8)
2018-12-21 14:45:49 -08:00
Robin Dunn
cb1488a295 Merge pull request #1111 from a358003542/master
toasterbox.py
2018-12-21 14:20:37 -08:00
Robin Dunn
7876de4a32 Merge pull request #1110 from jensgoe/fix_newline_tokenize
ignore newline added by Tokenize module since Python 3.6
2018-12-21 14:18:15 -08:00
Robin Dunn
3a83977348 Merge pull request #1100 from jensgoe/fix_fancytext_setY
fixed argument assignment
2018-12-21 14:13:53 -08:00
Robin Dunn
4060a8eedc Merge pull request #1093 from swt2c/reenable_python3.7_ci
Re-enable Python 3.7 in CircleCI builds
(cherry picked from commit c403d25113)
2018-12-21 14:12:29 -08:00
Robin Dunn
a76d836c95 Merge pull request #1092 from swt2c/cleanup_ci_deps
Clean up CircleCI dependencies
(cherry picked from commit 185eeeec92)
2018-12-21 14:11:09 -08:00
wanze
b10595e713 toasterbox.py 2018-12-13 15:15:53 +08:00
jensgoe
714a9a222d ignore newline added by Tokenize module since Python 3.6 (fixes #1109) 2018-12-12 16:00:46 +01:00
jensgoe
5d80f94f21 fixed argument assignment 2018-12-05 14:12:16 +01:00
Robin Dunn
e5d24078fd Merge pull request #1087 from cbeytas/master
Fix bugs in CustomTreeCtrl and HyperTreeList
2018-11-30 14:55:02 -08:00
Robin Dunn
1f735769a1 Merge pull request #1082 from Metallicow/Fix-Image-Issues
Fix image issues
2018-11-30 14:52:26 -08:00
Robin Dunn
cfed8387fd Merge pull request #1088 from mickp/FixSortForDisplay
Don't try to compare Colours in SortForDisplay.
2018-11-30 14:48:41 -08:00
Robin Dunn
78196de84e Merge pull request #1090 from swt2c/remove_hardcode_spin
Remove hard-coded sizes from wx.SpinButton and wx.SpinCtrlDouble in demo
(cherry picked from commit 475d533888)
2018-11-30 14:45:40 -08:00
Robin Dunn
ccd9874d1c Merge pull request #1083 from swt2c/fix_pubsub_test
Fix pubsub provider test - restore expected whitespace
(cherry picked from commit f797aec0e6)
2018-11-30 14:45:22 -08:00
Robin Dunn
a023509f9b Merge pull request #1081 from swt2c/fix_filectrl_tests
Fix filectrl tests - wait a little longer to ensure event loop runs
(cherry picked from commit f7d6303690)
2018-11-30 14:44:56 -08:00
Robin Dunn
ad25565baa Merge pull request #1080 from swt2c/fix_dataview_test
Fix dataview test on Python 2
(cherry picked from commit d565a3500f)
2018-11-30 14:44:39 -08:00
Robin Dunn
ba3a638839 Merge pull request #1079 from swt2c/skip_unimplemented_tests
Skip unimplemented tests instead of failing them
(cherry picked from commit 66049df936)
2018-11-30 14:44:24 -08:00
cbeytas
714ac142e7 Add GetCount method to HyperTreeList
Was missing from the monkey-patched method list.
2018-11-29 23:00:25 -05:00
cbeytas
72d5646f17 Fix DeleteChildren in HyperTreeList
The TreeListItem.DeleteChildren() method iterates over the list of a
parent item's children (self._children) and calls tree.Delete(child)
on each one (hypertreelist.py line 1365):
	for child in list(self._children):
		child.DeleteChildren(tree)
		if tree:
			tree.Delete(child)

The TreeListMainWindow.Delete(item) method however removes the child
from its parent's list directly (hypertreelist.py line 2546):
	parent = item.GetParent()
	if parent:
		parent.GetChildren().remove(item)  # remove by value

This ends up modifying the list as we are iterating over it. The end
result is that every other child and its children do not get cleaned up
properly before being deleted. The biggest issue being that any windows
belonging to the children won't be destroyed, and instead orphaned in
the control.
2018-11-29 22:52:49 -05:00
Mick Phillips
2560dc3c7a Don't try to compare Colours.
If any two elements of self._value are equal, sorted tries to sort by the next element in the zipped tuples, resulting in
TypeError: '<' not supported between instances of 'Colour' and 'Colour'
Specifying a key to sort only by the first element prevents this.
2018-11-23 12:48:39 +00:00
cbeytas
f6e7064b55 Fix bad window position on add
If a window is created and added to CustomTreeCtrl or HyperTreeList its initial position will be incorrect and if the item it was added to is hidden (child of collapsed item) the window will be shown in an incorrect spot (usually 0,0 i.e. top-left of control).
2018-11-22 21:39:51 -05:00
cbeytas
c06fef9ccb Comment mistake 2018-11-21 19:36:59 -05:00
cbeytas
d1361f3d0b Fix bug in HyperTreeList and CustomTreeCtrl demos
Throws ValueError: chr() arg not in range(256) if any special key is
pressed while editing text control.
2018-11-21 15:17:23 -05:00
cbeytas
fb10da6aab Fix typo in CustomTreeCtrl and HyperTreeList demos
Context menu "Change Item Icons" would throw an exception due to typo.
2018-11-21 14:46:06 -05:00
cbeytas
7a8789347e Properly update tree when windows added or removed
In CustromTreeCtrl and HyperTreeList when a window is added or deleted
from an item the row height can change causing the entire tree to
change shape. This sets the _dirty flag so the tree gets recalcualted
during the next Idle handler.
In HyperTreeList deleting an item didn't properly remove it from the
_itemWithWindow list.
2018-11-21 14:45:03 -05:00
cbeytas
e11848f735 Fix hide items in HypreTreeList
Hiding items was only partially implemented and very buggy.
This feature does not exist in CustomTreeCtrl but I see no reason why
it couldn't be added in the future. This fix requires the arrow key fixes
in order for arrow keys to work reliably in a tree with hidden items.
Hidden items always report they are disabled and not expanded.

Also updates the demo of HyperTreeList to add hide options to context
menu so the feature can be tested.
2018-11-21 14:43:07 -05:00
cbeytas
46dfbacfed Fix item window positions on scroll with arrow keys
Fix item window positions on scroll with arrow keys (Issue #1059).

Affects CustomTreeCtrl and HyperTreeList.
Child window positions don't get updated when using the arrow keys to
move up/down through the tree on most platforms (msw, osx, gtk3).
It seemed to only work in gtk2.8.

Switching from using the SetScrollbars() method to the Scroll() method
repositions child windows more reliably.
2018-11-21 14:38:38 -05:00
cbeytas
5196fff16b Add DeleteItemWindow method to HyperTreeList
Missing method. It's best to discourage calling methods directly on
TreeListItem objects since often the tree won't be updated properly.
2018-11-21 14:32:23 -05:00
cbeytas
dbf22d7f02 Set window positions during CalculatePositions
In CustomTreeCtrl and HyperTreeList the `CalculatePositions` method
scans the tree and recalculates positions of all items. It is called
whenever the tree topology changes and also in the `OnInternalIdle()`
handler when the `self._dirty` flag is set.

The `CalculateLevel` method must also position child windows properly
to avoid glitches when the tree is drawn. Previously, child window
positions would only be updated when their item's row was painted.
Since the tree is drawn top to bottom the old window position could
occlude painting of previous rows until the position was updated,
leaving blank patches in the tree. This is most visible when the
TR_ROW_LINES style is used.

Also adds a 2-pixel margin to HyperTreeList OnPaint() method.
This is done to match the 2-pixel margin added in the
`CalculatePositions` method:
```y, x_colstart = 2, 0```
CustomTreeCtrl also does the same thing. Avoids needless
repositioning of child windows.
2018-11-21 14:31:40 -05:00
cbeytas
f280855a03 Set wx.Locale to avoid assertion errors
If customtreectrl.py or hypertreelist.py modules are run the latest
wxPython versions will throw Assertion errors if the locale is not set.

wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C")
== 0" failed at ..\..\src\common\intl.cpp(1579) in wxLocale::GetInfo():
You probably called setlocale() directly instead of using wxLocale and
now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating
wxLocale objects to avoid this!
2018-11-21 14:30:17 -05:00