Commit Graph

58349 Commits

Author SHA1 Message Date
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
Václav Slavík
5c8fe17c83 Revert wxCurrentPopupMenu clearing in HandleMenuPopup().
WM_COMMAND is delivered after WM_UNINITMENUPOPUP and clearing
wxCurrentPopupMenu in the latter's handler broke delivery of the command
event to the wxTextCtrl control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-25 18:07:06 +00:00
Václav Slavík
29d46b6d58 wxTextCtrl: call UpdateUI() when showing OLE-based context menu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-25 18:06:24 +00:00
Václav Slavík
8cbf7a0919 Fix IRichEditOleCallback compilation with MinGW.
MinGW headers declare the IRichEditOleCallback interface and the
corresponding IID, but the libraries don't contain the latter symbol.
Work around it by defining it ourselves.

Fixes #16340.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-25 18:04:59 +00:00
Vadim Zeitlin
4f6daf7149 Generate debug information in MSVC 11/12 builds too.
This partially (as MSVC 10 projects were already correct) backports r76475
from trunk, see #16236.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-25 15:17:37 +00:00
Vadim Zeitlin
c6c70ae7ed Mention the addition of x64 configs in MSVC 8/9 projects in the change log.
Should have been part of the previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 23:56:29 +00:00
Vadim Zeitlin
4af9d1aace Generate 64 bit configurations in MSVC 8/9 projects.
Update bakefile configuration to include x64 configurations into MSVS 2005 and
2008 projects (2003 doesn't support building in 64 bits, 2010 and later are
manually maintained and already have them) and rebake the projects.

See #13675.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 23:52:39 +00:00
Dimitri Schoolwerth
de6fa55214 Fixes for building wxMSW under Cygwin.
Replace a few __WXMSW__ tests with __WINDOWS__ as the former is not
defined any longer (since r73290) when compiling with wxUSE_GUI set to 0.

Tested changes with both wxGTK and wxMSW builds under Cygwin.

Closes #14382.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 02:47:13 +00:00
Dimitri Schoolwerth
a6a5a97bc6 Fix non-MSVS compilation of webview_ie.cpp.
Use wxCRT_StricmpW instead of the Visual C++ specific _wcsicmp.

See #14382.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 02:46:24 +00:00
Vadim Zeitlin
648d9ce1fb Fix crash when right clicking AUI toolbar while left button is pressed.
Ignore the unrelated mouse events during the item dragging.

This avoids a crash due to m_actionItem being NULL when right clicking an item
while the left mouse button is kept pressed.

See #16327.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-22 21:36:24 +00:00
Stefan Csomor
bb277588b1 supporting retina, see #15887
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 13:10:33 +00:00
Tim Kosse
6a66f54c79 wxBitmap::GetMask() asserts on invalid bitmap. Check for valid bitmap before calling GetMask().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-19 09:29:07 +00:00
Václav Slavík
281f6f7c36 Use IRichEditOleCallback for wxTextCtrl's context menu.
In wxMSW, use IRichEditOleCallback::GetContextMenu() to provide our
default context menu for rich text controls, instead of using
EVT_CONTEXT_MENU.

The latter completely overrides native control's handling and in
particular breaks Windows 8's builtin spellchecking support.

Fall back to the previous non-OLE code for older richtext versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-18 12:57:34 +00:00