Commit Graph

57921 Commits

Author SHA1 Message Date
Vadim Zeitlin
419480cf22 Fix several problems with number formatting in wxNumberFormatter.
We shouldn't add thousands separators nor remove trailing zeros for the
numbers in scientific format.

Also avoid "-0" as output.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:52 +00:00
Vadim Zeitlin
d49096e10f Portuguese translations update from Manuela Silva.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 19:20:17 +00:00
Vadim Zeitlin
cc8b733082 Remove unnecessary _mingw.h inclusion from wx/msw/missing.h.
This header is already included from wx/platform.h which is always included
before wx/msw/missing.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:56:09 +00:00
Vadim Zeitlin
35ae03b3b2 Move wxCHECK_MINGW32_VERSION() declaration to wx/msw/gccpriv.h.
Unfortunately we can't keep it in wx/compiler.h which is included too early,
before UNICODE macro is defined, and we can't define it before including
wx/setup.h which itself must be included after wx/compiler.h.

So move it to wx/msw/gccpriv.h which is not a great solution, as the best
would be to get rid of this gcc-specific file completely, but at least should
make everything build again and ensure that _mingw.h is included after UNICODE
definition.

Closes #15805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:56:04 +00:00
Vadim Zeitlin
ae31f96132 Revert "Move UNICODE section of wx/platform.h before wx/compiler.h inclusion."
Unfortunately this fix for MinGW broke compilation under Unix, see #15805.

This reverts r75520.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:55:59 +00:00
Vadim Zeitlin
b4acdde8f7 Revert "Define wxUSE_UNICODE on compiler command line in Unix builds too."
This fix only helps with building wxWidgets itself but doesn't help when
building user code using it, so revert it as we need another solution to this
problem anyhow.

This reverts r75536, see #15805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:55:54 +00:00
Vadim Zeitlin
001fb266b6 Simplify and fix column determination code in wxGridStringTable.
The number of columns in the table is now (since r60717) stored in m_numCols,
so there is no need to get it from wxGrid any more. This is not only simpler
and faster but also more correct as the first row might not have the full
number of values yet.

Closes #15809.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:55:49 +00:00
Vadim Zeitlin
654276295a Add Aragonese translations by Jorge Pérez.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:50:15 +00:00
Vadim Zeitlin
26c040dfc6 Fix another wxDOT deprecation warning, this time in wxGTK build.
Use wxPENSTYLE_DOT instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:50:10 +00:00
Vadim Zeitlin
a49d3f4161 Fix tons of warnings in wxMSW after deprecating wxPen/wxBrush int styles &c.
Replacement of FUTURE_WXWIN_COMPATIBILITY_3_0 with WXWIN_COMPATIBILITY_3_0 in
r75532 resulted in tons of warnings as all code using wxSOLID and similar
constants now uses the deprecated methods taking int instead of the preferred
ones taking wx{Pen,Brush}Style (and similarly for wxFont{Style,Weight,Family}).

Fix all of them but this also would seem to mean that this change might not be
such a good idea at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:20:36 +00:00
Vadim Zeitlin
6870e04cef Revert "Hack wxMSW wxNotebook to show the text controls correctly initially."
This hack resulted in showing a black rectangle corresponding to the initial
size of the first notebook page when creating the notebook, as could be seen
in the notebook sample by pressing Alt+2,Alt+1 to recreate the notebook after
the startup.

If the bug that this hack was supposed to fix hasn't been fixed yet (and it
might have been by r73126, but it's hard to be sure as we don't have any test
case for that bug), we could reintroduce this call to Update() but only if
we're not inside a deferred resize (i.e. m_hDWP != 0) as it just can't work
correctly in this case.

This reverts r69793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:59 +00:00
Vadim Zeitlin
010f3b466f Remove unnecessary ::SetWindowLong() call in wxMSW wxNotebook code.
There is no point in manually resetting WS_VISIBLE style before calling
wxWindow::Show(false) which does it too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:56 +00:00
Vadim Zeitlin
169b3be0ee Define wxUSE_UNICODE on compiler command line in Unix builds too.
Under Windows we already define _UNICODE which gets picked up and translated
to wxUSE_UNICODE by wx/platform.h, but under Unix we didn't do it until now.
Do it both for consistency and to fix the build breakage since r75520 which
moved the tests for wxUSE_UNICODE being defined before wx/setup.h.

This seems like the simplest solution because otherwise there doesn't seem to
be any single header order which would work under both Windows and Unix: under
Windows we need to include wx/compiler.h, and hence _mingw.h included from it,
before wx/setup.h, which implies that wxUSE_UNICODE must be set before doing
it, but under Unix wxUSE_UNICODE was only defined in wx/setup.h and so
couldn't be tested before including wx/compiler.h.

And just the explanation above should convincingly show that defining
wxUSE_UNICODE in CPPFLAGS makes things simpler.

Closes #15805.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:51 +00:00
Vadim Zeitlin
47a2c12a32 Fix wrong comment in the scroll sample.
Fix coordinates in the comment to match those used by the code.

Closes #15804.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:46 +00:00
Vadim Zeitlin
8920e96933 Reset sorting column index in generic wxDataViewCtrl when clearing columns.
Otherwise we could continue to use the now invalid index for sorting.

Closes #15803.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:41 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Vadim Zeitlin
61728d5d54 Avoid asserts in wxGTK when wxMDIChildFrame::SetSize() is called.
SetSize() doesn't do anything for MDI children in wxGTK and other ports using
TDI version of MDI, but it shouldn't result in an assert from
wxTLW::DoMoveWindow() neither, so override DoMoveWindow() in wxTDIChildFrame
to avoid it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 14:40:08 +00:00
Vadim Zeitlin
7b7f3b0132 Revert "Don't intercept accelerators in wxTextValidator in wxGTK."
Testing for absence of Alt modifier is wrong as it could be specified for the
events generated by AltGr-letter key combinations (AltGr is Alt+Ctrl), so this
commit broke the validation of any such symbols entered from non-US keyboard.

This is worse than the problem it was trying to fix, so revert this for now.
The real fix will need to ensure that the mnemonics are checked first, i.e.
before generating EVT_CHAR, in wxGTK, just as it already happens in wxMSW.

This reverts r75453.

See #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:34:05 +00:00
Vadim Zeitlin
2ff7b588ae Move UNICODE section of wx/platform.h before wx/compiler.h inclusion.
This fixes the build with some versions of MinGW which depend on UNICODE being
defined correctly in _mingw.h which is included from wx/compiler.h, so that
before this change the build was broken as inconsistent definitions of UNICODE
were used there and in windows.h included later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:18:47 +00:00
Vadim Zeitlin
29483c2e15 Define HAVE_VARIADIC_MACROS as 1, not nothing, in wx/cpp.h.
This avoids g++ warning about HAVE_VARIADIC_MACROS redefinition in setup.h if
wx/cpp.h happens to be included before it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:12:58 +00:00
Vadim Zeitlin
c407f6e2bd Don't keep using the old wxBitmap data after modifying it directly in wxGTK.
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in
wxGTK and even if its pixbuf representation was later changed using direct
access to the bitmap pixels, the out of date pixmap continued to be used,
creating the illusion of direct access being completely ignored.

Fix this by purging the old pixmap representation when locking the bitmap for
raw access.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:06:45 +00:00
Robin Dunn
6f25e45af1 Turn off wxUSE_COMPILER_TLS for wxPython builds to avoid crashes on XP.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-02 00:24:32 +00:00
Vadim Zeitlin
97836da5e8 Mention horizontal scrolling in wxScrollBar documentation too.
Up/down can also mean left/right.

Closes #15791.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:47 +00:00
Vadim Zeitlin
b498554460 No real changes, just fix some typos in the comments.
Fix spelling in a couple of comments.

Closes #15790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:43 +00:00
Vadim Zeitlin
0a76afbe9c Use wxScopedArray instead of raw new[]/delete[] and fix memory leak.
Don't leak memory in case of error when reading from the stream in BMP loading
code.

Closes #15789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:37 +00:00
Vadim Zeitlin
5cd81ca598 Allow initializing wxScopedArray more conveniently.
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.

Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:34 +00:00
Paul Cornett
dd4291f962 fix memory leak, closes #15785
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 19:14:24 +00:00
Stefan Csomor
87eb540094 moving special characters handling for EVT_CHAR into SetupKeyEvent, fixes #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 11:49:40 +00:00
Stefan Csomor
45bb71b485 routing to common code, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 10:39:12 +00:00
Stefan Csomor
26f22d609f copy over all modifiers for single char events, fixes shift-tabs for single line controls, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 09:04:13 +00:00
Robin Dunn
7d00c5c477 Add missing wxMenuItem methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:23:01 +00:00
Robin Dunn
da4efa3fe3 Slight tweaks for the wxWebKitCtrl doc.
Remove inline function bodies.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:52 +00:00
Robin Dunn
69cfa7ca5c Add wxWebKitCtrl header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:43 +00:00
Robin Dunn
d8ba2748b6 Document ctors and dtor for wxListView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:33 +00:00
Robin Dunn
a768c33557 Add the ability to show a CallTip in the stc sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:24 +00:00
Robin Dunn
37df5cf045 Guard against trying to use extend() with None
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:15 +00:00
Vadim Zeitlin
b72899d142 Don't intercept accelerators in wxTextValidator in wxGTK.
Key events with modifiers shouldn't be filtered by the validator as they are
used as accelerators and not for the text entry at all.

Closes #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:17 +00:00
Vadim Zeitlin
cb20b3453e Simplify wxTextValidator EVT_CHAR handler.
Ignore the event by default to reduce the number of event.Skip() calls.

No changes in the code behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:15 +00:00
Vadim Zeitlin
aff918ab1d Handle Unicode keys correctly in wxTextValidator.
Don't allow entering arbitrary Unicode keys in wxTextValidator limited to
digits only, for example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:12 +00:00
Vadim Zeitlin
a425e9f70d Make wxTextValidator validation error messages more informative.
Saying that "something is invalid" really doesn't help much at all, so try to
be at least a bit more informative.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:47 +00:00
Vadim Zeitlin
39edfa27a2 Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
Only check for its violation once the full text is entered as otherwise
nothing could ever be entered when it was used.

Closes #15778.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:43 +00:00
Vadim Zeitlin
2d3a1aab74 Fix handling of menu items checked before being attached in wxMSW.
Calling wxMenuItem::Check() before appending the item to a menu didn't have
any effect, fix this by checking the item state when actually attaching it.

Closes #15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:38 +00:00
Vadim Zeitlin
32dc4cc8db Avoid crashes when deleting owned top level windows.
Don't delay the TLW destruction if it has a parent and its parent is already
being deleted: we can't delay the inevitable in this case and only succeed in
making the program crash if we try.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:33 +00:00
Vadim Zeitlin
9955f6fd86 Prevent wxGrid rows/columns from becoming too small on double click.
The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:28 +00:00
Vadim Zeitlin
c3d1d22f66 Fix harmless MSVC warning.
Avoid "converting value to bool" warning introduced by r75310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:25 +00:00
Vadim Zeitlin
c0984e8382 Update the generated file after gen_iface.py change.
Regenerate the file to use the symbolic constants instead of the raw values.

See #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:30 +00:00
Vadim Zeitlin
3d5f3bcac7 Use symbolic constants names in the generated wxSTC files.
Update the script generating stc.cpp to put the symbolic constants names and
not their raw numeric values into the generated code. This makes it much
easier to read and understand.

Closes #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:25 +00:00
Vadim Zeitlin
03c0dc0235 Mention that raw pixel access is efficient only with DIBs under MSW.
While accessing DDBs (now) works too, it's inefficient and should be avoided.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:36 +00:00
Vadim Zeitlin
11d0e0f943 Make raw pixel access work even with DDBs under MSW.
This is inefficient, because we need to copy pixels to and from them, but
better than silently doing nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:34 +00:00
Vadim Zeitlin
7ce66e3c43 Use wxPENSTYLE_{SOLID,TRANSPARENT} instead of deprecated versions in the docs.
Don't push people to use the deprecated wxSOLID and wxTRANSPARENT.

Closes #15775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-23 16:43:51 +00:00