Commit Graph

58046 Commits

Author SHA1 Message Date
Václav Slavík
f5d12dab44 Fix failing TextFileTestCase::ReadMixedWithFuzzing().
The test failed with 33% probability because it didn't account for
trailing non-newline character.  Fixed and also changed the test to
repeat itself a hundred times, to increase the probability of catching
problems like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 10:15:06 +00:00
Paul Cornett
9d0d2b7e98 Fix wxSetCursorEvent handling
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
0dfeb74e78 Different fix for cursor inheritance and busy cursor/global cursor.
Previous work was not compatible with GTK < 2.18 and did not properly handle some cases
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Vadim Zeitlin
5e6d30aa0b Add support for sorting by more than one column to generic wxDataViewCtrl.
Maintain a list of columns used for sorting instead of a single sort column
index and allow to add/remove columns to/from it interactively by right
clicking them if AllowMultiColumnSort() was used.

See https://github.com/wxWidgets/wxWidgets/pull/3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 22:12:53 +00:00
Václav Slavík
4cbb78cf7d Add line-endings fuzzing test to TextFileTestCase.
Stress-test wxTextFile's handling of unusual CR,LF characters.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:29:03 +00:00
Václav Slavík
8dd971e45b Rewrite wxTextFile's newlines parsing to fix multiple bugs.
Remove the complicated parsing state machine that contained bugs with
unexpected inputs and was very hard to modify correctly.  Replace it
with much simpler code that looks ahead, instead of deducing line
endings from past characters.

The new code never looses lines with data and calls AddLine() on the
first newline character it encounters, peeking ahead to determine the
line ending type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:57 +00:00
Václav Slavík
fe6f8254fb TextFileTestCase: test for \r\r\r\n parsing.
While r75387 fixed parsing of \r\r\n, it still didn't handle triple-\r correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:51 +00:00
Václav Slavík
40eed079ec TextFileTestCase: test for correct parsing of empty Mac lines.
(This is failing both with and without r75387.)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:46 +00:00
Vadim Zeitlin
c866934853 Compilation fix for PCH-less build.
This should fix compilation without PCH after r75785.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 01:04:27 +00:00
Julian Smart
9733b78862 Return true from OnCellClicked if the event was processed, otherwise further processing will use default behaviour which may negate the effect of the event handler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 19:10:22 +00:00
Julian Smart
179d117a35 Added the ability to restore the last selected page in a wxRTC formatting dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 18:57:20 +00:00
Vadim Zeitlin
892a8b47c4 Add XRC handler file to MSVC 10 project.
Closes #15942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 16:40:04 +00:00
Vadim Zeitlin
202678e048 Add new XRC headers to the core project too.
Closes #15942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:57 +00:00
Vadim Zeitlin
9d05d9a009 Allow using wxRearrangeList::Check() to change state programmatically.
Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.

Closes #15940.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:52 +00:00
Vadim Zeitlin
8942262811 Fix transparency in toolbar buttons when not using comctl32.dll v6.
Old versions of comctl32.dll don't support alpha in the toolbar image list, so
use the masks only for them.

Closes #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:47 +00:00
Dimitri Schoolwerth
6d34b1b760 Added support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP events to wxOSX/Cocoa.
See #15762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 09:32:16 +00:00
Jouk Jansen
49ea9ebb64 correction on commit 75776
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 07:37:31 +00:00
Stefan Csomor
9f93667c52 merging in Václav's fix for getting CPU usage down in ShowModal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 20:31:55 +00:00
Stefan Csomor
7df52b73bd passing correct timeout values, patch from Václav
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 17:40:43 +00:00
Jouk Jansen
b09a481c2e synchronizing the definition of wxLoadQueryNearestFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 14:06:40 +00:00
Paul Cornett
95695c0a9f don't avoid no-window widgets in GTKUpdateCursor()
it doesn't work for things like multi-line text control where m_widget is a no-window GtkScrolledWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
adeb914098 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Paul Cornett
fd049a5465 restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Vadim Zeitlin
7baf1ce2fd Don't show windows with "hidden" XRC attribute at all.
This is better than showing them initially and then hiding them if only
because it avoids the unexpected wxEVT_SHOW events being generated.

Closes #15919.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:52 +00:00
Vadim Zeitlin
36e3a58992 Recompute the tooltip width when changing its text in wxMSW.
This avoids unnecessarily wrapping the tooltips if they are set to a longer
string than their initial value later.

Closes #4685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:47 +00:00
Paul Cornett
7b1f4ba70a don't override non-default cursors in native controls when no wxCursor is set, a regression introduced by r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00
Tim Kosse
98bf1dae9b Add Kabyle language, as rare language it uses a three-letter code as per ISO 639-2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 10:39:25 +00:00
Vadim Zeitlin
a23b9cd8ce Use automatic resource management in wxMSW wxDC::DrawRotatedText().
No real changes, just simplify the code by using RAII classes.

Also avoid unnecessary indentation by returning after checking for the special
cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:58 +00:00
Vadim Zeitlin
0a86fd0f4f Support multiline strings in wxDC::DrawRotatedText() in wxMSW.
The native API doesn't support this, so do it by splitting the string into
lines manually.

Closes #9686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:53 +00:00
Paul Cornett
17a5323672 build fix for GTK3, see #15930
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 18:26:09 +00:00
Vadim Zeitlin
67cbb04051 Try to detect invalid wxHtmlWindow title format earlier.
Assert directly in wxHtmlWindow::SetRelatedFrame() instead of doing it much
later, hopefully people will read the comment at the assert point.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 16:06:43 +00:00
Vadim Zeitlin
637d4a3837 Add xh_ribbon.cpp to MSVC 10 ribbon library project.
Fix linking errors when using wxRibbonXmlHandler.

Closes #15927.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:46 +00:00
Vadim Zeitlin
448a4ac22a Reduce the number of realloc() calls in wxHtmlTableCell.
Don't call realloc() after adding each row, this is horribly inefficient, so
preallocate more memory to avoid this.

Closes #15931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:40 +00:00
Vadim Zeitlin
d0d22874c8 Correctly detect cancelled drag-and-drop operations in wxGTK.
The status of the drop operation wasn't propagated back to the initiator of
drag and drop, so failing to drop data over a possibly accepting recipient
could result in wrong behaviour and even data loss.

Closes #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:35 +00:00
Vadim Zeitlin
98da482d7a Deprecate wxTipProvider::PreprocessTip().
It is completely useless, and there is no reason to keep it.

Closes #15916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:29 +00:00
Vadim Zeitlin
aeadb41900 Update copyright year in the library versions.
Update the version info dialog and the version info included in MSW DLLs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 03:32:49 +00:00
Vadim Zeitlin
b02ba7c9ff Don't mark wxMSW applications as being DPI aware.
Because they are not, fully. While our standard controls do appear correctly
in any DPI, anything using bitmaps/icons (e.g. toolbars, AUI title bars, ...)
isn't usable at all without scaling at high DPI, so it's better to avoid
pretending that we're DPI aware at all rather than doing it without being it
for 100%.

This reverts the changes of r63990.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:29:54 +00:00
Vadim Zeitlin
67fe66530d Fix a bug which could result in two default buttons in wxMSW dialogs.
Exchange the order of setting/resetting the new/old button as the default one
when focus is lost/gained to avoid the possibility of having two simultaneously
default buttons at once.

Closes #9528.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:26:00 +00:00
Vadim Zeitlin
3ded9e191d Fix handling of wxSET, wxCLEAR and wxINVERT ROPs in wxMSW.
Avoid passing source HDC to MaskBlt() for these ROPs which only use the
destination HDC as they produce garbage instead of just ignoring the source in
if it's non-NULL.

Closes #2047.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:56 +00:00
Vadim Zeitlin
afb49a224b Fix wxClientDC::Clear() for scrolled windows in wxMSW.
Take the DC origin into account when clearing a window DC and not only a
memory one.

Closes #2048.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:51 +00:00
Vadim Zeitlin
41569662e3 Fix wxPrinterDC::DrawIcon() in wxMSW.
Make DrawIcon() work when printing: it previously didn't, as we used
::DrawIconEx() Windows function which wasn't supported when printing.
Work around this by using DrawBitmap() if necessary.

Closes #379.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:45 +00:00
Vadim Zeitlin
cc4658d1f4 Fix display of bitmaps with alpha in wxStaticBitmap under MSW.
Avoid double alpha pre-multiplication by converting the bitmap into a non
pre-multiplied format before passing it to STM_SETIMAGE.

Closes #2395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:41 +00:00
Vadim Zeitlin
0a411fd5da Virtualize wxXmlNode methods used by wxAuiToolBarXmlHandler.
This fixes the DLL build of aui library as it can now be linked without
leaving any unresolved dependencies to the code in xml library (where
wxXmlNode is implemented).

Closes #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:36 +00:00
Vadim Zeitlin
d94f3f5aba Fix bug with non-NUL-terminaed inputs in wxMBConvUTF8.
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.

Fix this and add a test for it.

Closes #15901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:14 +00:00
Vadim Zeitlin
8d5a37c184 Fix embarrassing typo in the last commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 16:52:11 +00:00
Vadim Zeitlin
e7a50b3c00 Add forward declaration of wxCmdLineParser to fix compilation.
This should fix the build after the previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:45:23 +00:00
Vadim Zeitlin
5cfbf0dc4d Allow iterating over wxCmdLineParser arguments in order.
This allows the meaning of the options to depend on their order relatively to
the other options which wasn't possible before.

See http://review.bakefile.org/r/557/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:04:55 +00:00
Robin Dunn
ded7644999 Add some of the Draw* methods that have been available in wxPython.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-27 07:53:26 +00:00
Vadim Zeitlin
f4c9767b49 Try rounding the values when resizing wxImage instead of truncating.
This would seem to make more sense and might also fix the test failures
resulting from tiny differences in arithmetic operations when compiled with
different compilers/under different architectures.

Regenerate the test files and commit (disabled) change to the unit test
allowing to do it again in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 16:24:42 +00:00
Vadim Zeitlin
ca5f92da94 Don't keep dangling pointers in other wxRibbonButtonBar members neither.
This should have been part of r75710: after deleting the button, also reset
any stored pointers to it.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 14:08:23 +00:00