Commit Graph

58711 Commits

Author SHA1 Message Date
Václav Slavík
96d714660a Add window variant support to XRC.
Fixes #16247.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 17:10:49 +00:00
Vadim Zeitlin
dbf432f126 Fix wxListCtrl sort callback signature in the test under Win64.
Use wxIntPtr instead of long which is not big enough to hold a pointer in
Win64 builds.

Closes #4309.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 15:50:43 +00:00
Vadim Zeitlin
1c922274d1 Fix window position calculation in wxMSW when using RTL.
Just use the native ::MapWindowPoints() to do the coordinate transformation
instead of doing it ourselves: we did it wrongly by inheriting the layout
direction from wxTheApp instead of from the parent window, so fix this in the
best possible way by not doing it at all and just relying on Windows to do it
for us.

In particular, this corrects the display of wxStatusBar in RTL frames.

Closes #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:15 +00:00
Vadim Zeitlin
5528d864b0 Refresh the window when its layout direction changes in wxMSW.
Rearrange the window children and/or redraw its contents when its layout
direction changes.

See #15031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:11 +00:00
Vadim Zeitlin
78d8dde178 Don't activate hidden buttons when Enter is pressed in wxMSW.
The keyboard handling code could decide to activate a button which wasn't
currently visible at all, e.g. because it was on a non-current, and hence
hidden, page of a wxBookCtrl. This didn't make any sense, so check for the
button visibility before activating it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:07 +00:00
Vadim Zeitlin
014e8d6215 Correct wxGrid column labels when using SetTable() with native header.
Ensure that the table pointer inside wxGrid is updated before initializing the
native column header as it uses wxGrid::GetColLabelValue() which doesn't work
correctly without a valid table pointer.

Closes #16399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-02 12:19:18 +00:00
Václav Slavík
1e0b7e2784 Only filter requested events in wxEventBlocker.
Contrary to the documentation, wxEventBlocker always behaved as if the
event type to block was wxEVT_ANY: while it returned false for events
not on the blacklist, it never actually called the existing event
handler as it was meant to.

Fix by calling wxEvtHandler::ProcessEvent() in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-01 18:04:08 +00:00
Vadim Zeitlin
ac770a6e8d Fix static initialization order problem in wxStopWatch under MSW.
Don't rely on the static global gs_perfCounter being already initialized when
wxStopWatch::DoStart() is called, this may not be the case if wxStopWatch
variable is global.

Work around this by wrapping the variable inside a function to ensure that it
is initialized before being used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-27 23:04:35 +00:00
Vadim Zeitlin
d1471a66b3 Add support for "%V" and "%G" to wxDateTime::Format().
This is useful for creating ISO 8601 week number based stamps.

Closes #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-27 23:04:30 +00:00
Vadim Zeitlin
0cfd00335d No changes, just update the file name in the header.
Update the name in the header to match the actual file name.

See #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 10:50:29 +00:00
Vadim Zeitlin
c93368ea3c Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:41:30 +00:00
Vadim Zeitlin
fcacaaf237 Write delay between frames correctly when saving GIF files.
Deal with delays greater than ~2.5s correctly, their most significant byte was
previously lost resulting in 0 delay being written to the file.

Closes #16392.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:12 +00:00
Vadim Zeitlin
8b38ba9726 Fix background of wxRadioBox buttons and wxSlider labels in wxMSW.
Handle WM_CTLCOLOR correctly for them, this wasn't done before because the
code assumed that sub-windows (i.e. HWNDs which belong to the same logical wx
control) were always children of the main window, but they could also be its
siblings (like in at least the two above mentioned cases).

Account for this case in wxControl::DoMSWControlColor() too now.

Closes #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:07 +00:00
Tim Kosse
5c51b91562 Fix compilation if configured with --disable-coldlg
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-21 13:44:13 +00:00
Vadim Zeitlin
91b2f84f9f Don't consider hidden root item to be visible in wxGenericTreeCtrl.
This fixes wrong results returned by GetFirstVisibleItem() in the tree control
with wxTR_HIDE_ROOT style.

Closes #4482.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-16 22:54:34 +00:00
Vadim Zeitlin
e3a6ac0a37 Update the checksum of the reuploaded wxMSW-3.0.1_vc120_Dev.7z file.
The original version was somehow corrupted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-15 17:15:34 +00:00
Vadim Zeitlin
481fe98fa3 Ensure that wxCmdLineParser::FoundSwitch() asserts when used wrongly.
This makes CmdLine unit test pass with the assertions backported from trunk,
where FoundSwitch() does assert when called for a non-switch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-14 11:54:42 +00:00
Vadim Zeitlin
0de26e62a7 Fix inserting an element of wxArrayString itself back into it.
Do the insertion/addition before deallocating the old memory to allow things
like array.Add(array[0]) to work correctly.

Closes #2290.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 14:27:29 +00:00
Vadim Zeitlin
7da4930b12 Fix memory leak in ArraysTestCase unit test.
Clear the items in PTR array explicitly, this is not done by the array itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 14:27:23 +00:00
Vadim Zeitlin
3e8afdd342 Fix socket leaks in wxFTP if starting up/downloading fails.
Add the missing delete statements.

Closes #2250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 13:53:00 +00:00
Julian Smart
957cba59ab Fix for context menu key under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:52:19 +00:00
Julian Smart
15ef465412 Fix for text parsing when the text object has properties
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:47:23 +00:00
Tim Kosse
87ca7e242a wxBitmapComboBoxBase uses wxArrayPtrVoid, so we need to #include "wx/dynarray.h". This fixes a compile error in situations where wx/dynarray.h is not implicitly included through other headers, e.g. when building wx with many features disabled.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-12 08:31:39 +00:00
Tim Kosse
63ec0754a3 Fix a compile error with some compilers introduced in r76812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-10 09:55:19 +00:00
Vadim Zeitlin
644af9fa6c Correct the addition of wxLANGUAGE_KABYLE.
Repair (too late?) the ABI breakage for all the language constants following
wxLANGUAGE_KABYLE in alphabetical order by adding this enum element at the end
of the enum instead of in the middle.

Also add wxLANGUAGE_KABYLE to langtabl.txt so that it doesn't disappear when
the generated fragments are updated by running misc/languages/genlang.py the
next time.

This corrects/supersedes r75753.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 17:11:37 +00:00
Tim Kosse
bf19b89735 Tools can be specified without name in the XRC, so GetID() of the node returns wxID_ANY. Use the auto-assigned ID of the tool to refer to it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 09:33:25 +00:00
Stefan Csomor
cf6844b735 reverting incorrect fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-07 05:15:33 +00:00
Stefan Csomor
db50ad17bc adding padding nuls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 19:39:47 +00:00
Tim Kosse
419f0f194e Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 11:31:31 +00:00
Tim Kosse
254ca4fb22 Fix typo in documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:05:44 +00:00
Tim Kosse
b629ff2b9e Do not assert if not editing a label when calling wxGenericTreeCtrl::EndEditLabel
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:01:38 +00:00
Tim Kosse
b60b063163 Fix compilation if configured with --disable-printarch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:43:26 +00:00
Vadim Zeitlin
0445ddf58d Skip mouse button release events in wxGenericListCtrl.
This is similar to r76093 for wxGenericTreeCtrl and fixes a similar problem:
clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking
logic because it didn't get some events.

Closes #16365.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:22:27 +00:00
Vadim Zeitlin
15ed55e357 Fix typo in wxTreeCtrl::AppendItem() documentation.
The greater sign got lost in Doxygen translation, restore it.

Closes #16366.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:16:35 +00:00
Vadim Zeitlin
2306e9f9ff Remove accidentally committed wxCompilerPrefix setting.
Don't use "vc120" compiler prefix by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 11:50:00 +00:00
Vadim Zeitlin
56657b8ea3 Extract setup.h copying into a separate project for MSVC11+.
This fixes problems with parallel builds in Visual Studio 2012 or 2013 IDE as
multiple projects may try to copy setup.h file at once, resulting in errors.

Use _custom_build project as a common dependency to ensure that the copy step
is done only once.

This is a backport of r76419 from trunk, see #16177.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 11:31:00 +00:00
Vadim Zeitlin
ce97d7eccc Still continue to use QuickTime framework in wxOSX/Carbon builds.
Amend the changes of r76803 to only avoid QuickTime framework when using
Cocoa, under Carbon it's needed by wxSound too, and not only wxMediaCtrl, and
there is no real reason to avoid it in the first place anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 22:51:55 +00:00
Tim Kosse
ba2758a28e Items appended via the menu have no item data. Don't crash if right-clicking these items.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 16:45:23 +00:00
Tim Kosse
4929275dd5 Add some files created by building with Visual Studio 2013 to svn:ignore.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 14:33:34 +00:00
Tim Kosse
c6d6d3c75e wxListTextCtrlWrapper::Finish and wxTreeTextCtrl::Finish cannot be called multiple times without crashing. wxListTextCtrlWrapper already used to protect against this in the past, but revision 51150 removed the safety check.
This patch reimplements the functionality in a slighly different way for both controls, so that Finish is not called multiple times.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-03 14:16:37 +00:00
Vadim Zeitlin
e05ca77bf5 Don't link with QuickTime framework unnecessarily under OS X.
Only use QuickTime when wxUSE_MEDIACTRL is true.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-02 12:06:14 +00:00
Tim Kosse
68bd393b27 Disabled bitmaps of toolbar tools are now rendered at the correct position if using GTK3. Extend toolbar sample to include a button with a custom disabled bitmap.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 18:41:30 +00:00
Vadim Zeitlin
73052bd106 Check for conversion failure correctly in wx[F]File::Write().
Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.

This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.

Closes #16348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 01:00:16 +00:00
Vadim Zeitlin
c78b1fa01c Don't call strlen() unnecessarily in wxFFile::Write().
We already have the length of the string, either in the buffer if we actually
converted the string from Unicode to multi-byte, or in the string itself in
non-Unicode build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 01:00:10 +00:00
Vadim Zeitlin
72448a032a Don't use C++ streams in wxString::FromCDouble() implementation.
This doesn't work if the global C++ locale had been changed and we can't call
imbue(locale::classic()) to ensure that the stream we use here uses the C
locale because imbue() is hopelessly broken in some implementations.

So just get rid of this code and keep only the hack replacing the decimal
separator with the dot explicitly. This is ugly but should always work in
practice and is also consistent with ToCDouble().

Closes #16343.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 00:27:13 +00:00
Vadim Zeitlin
fd254fe843 Fix appearance of custom drawn wxToggleButton in wxMSW.
Ensure that the owner-drawn toggle buttons are drawn in the pressed state when
they are pressed, even if they are also selected or under mouse.

Closes #11665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 00:03:44 +00:00
Vadim Zeitlin
f9e00f46a6 No real changes, just fix a harmless warning under OS X.
Don't use "size" variable unnecessarily under non-Mac platforms, this also
fixes a warning about reassigning it immediately after assigning a previous
values to it under Mac.

Closes #16353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-29 23:42:38 +00:00
Vadim Zeitlin
dab29e4f52 Fix harmless unused parameters warnings in builds without wxLogTrace().
Fix warnings appearing when building with --disable-debug under Unix by
either referencing the parameters or variables which become unused then,
because wxLogTrace() calls are compiled out, or by not compiling the code
whose only purpose is to call wxLogTrace() at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-29 23:42:34 +00:00
Tim Kosse
ef884f9228 Fix wxStaticBox' clipping region in RTL mode.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-28 10:36:23 +00:00
Tim Kosse
bc505febf1 Improve handling of right-to-left support in wxStaticBox on wxMSW.
Back in #8101 I made fixes for wxStaticBox and right-to-left handling under Windows.

While this worked fine in wx2.8, the old patch has some unfortunate consequences on wx3:
* Since the box is always set to LTR, its children also inherit LTR
* Text was always right-aligned

This follow-up patch removes the RTL-specific code from wxStaticBox. Instead, the wxMemoryDC in wxStaticBox::OnPaint is made to inherit attributes from the wxPaintDC.

Tested on XP (both XP and classic theme), Windows 7 and 8.1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-28 09:47:45 +00:00