Not all ports define wxBitmapToggleButton class currently, so add a special
symbol which is defined only if this class is indeed available and test for it
in the unit test for this class.
This fixes the tests compilation under wxX11.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test just doesn't want to work on MSW buildbot slaves even though it
works perfectly locally. No idea why but disable it when running on a build
bot slave for now to let the entire test suite pass.
Also add a comment explaining why the test is disabled for wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test fails on MSW buildbot slaves for unknown reasons so disable it to
make the test suite pass. The failure is irreproducible locally so no idea how
to debug this unfortunately.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
ConvertStringToBuf() helper function was defined incorrectly for converting
wxString to a char* buffer as it didn't fill the buffer at all if the string
didn't fit into it entirely instead of putting as much of the string into it
as possible as was already done for the conversion to wchar_t* buffer. This
broke wxSprintf()-related functions in when the ASCII output buffer was not
big enough as it was not filled at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The strings corresponding to %hs and %ls are always narrow/wide independently
of the build so using wxArgNormalizedString which is defined differently in
different builds doesn't make sense in wxPrintf().
Instead, simply expect the parameter of the appropriate matching type for
these conversion specifications. Any conversions to it, if necessary, had been
already done before by wxFormatString.
This fixes some VsnprintfTestCase::BigToSmallBuffer() unit test failures.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Count the number of asterisks before modifying the string we use to do this,
otherwise we were off by one for the format specifications containing two of
them.
This really fixes the handling of asterisks (used for width/precision) in
wxPrintf() format string, it wasn't done correctly by r60120 but now
VsnprintfTestCase::Asterisk() test does pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The call to wxPrintf() should provoke an assert if there are too many
parameters, so update the test to expect it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Somehow the expected assert is not generated by wxString::Format("%d", ptr)
with VC6. Disable this test to make the test suite pass for VC6 for now to at
least be able to monitor the appearance of the new errors in it.
Of course, this one should ideally be debugged (by someone who is interested
in VC6 support) as well...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some reason the test fails with a single item in the control when running
on the buildbot slave, check if this is still the case if we add another item
to the control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't clear a NULL buffer, the code didn't make any sense any more because
it wasn't updated when the function was changed as part of UTF-8 transition.
Closes#12529.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Include or forward declares the classes used by the header to make it
self-contained. Do not include wx/wx.h from the source file to make compiling
it faster when not using PCH.
This fixes compilation under Unix after SOC2010_RTC_IMAGES branch merge.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These pragmas are not necessary and may actually be harmful, no idea why were
they added in the first place to a new file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added floating images and image property dialog to wxRichTextCtrl, by Mingquan
Yang as part of GSOC 2010. Also changed image block creation to use a memory
stream instead of creating a temporary file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix asserts in 64 bit builds due to using %u (expecting 32 bit values on a
typical Unix LP64 platform) for 64 bit long values.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ignore the unknown types of the script result, in particular don't crash
trying to dereference an uninitialized pointer if the script didn't return
anything.
Closes#12361.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.
To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.
Closes#12330.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to include wx/defs.h that (indirectly) defines wxUSE_RADIOBOX
before testing for it in wx/radiobox.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.
This is similar to r65210 fix for wxUSE_CHECKLISTBOX.
Closes#12526.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move wxObjectEventFunctor::operator() definition after wxEvtHandler
declaration as it uses call through a pointer to member of this class and Sun
CC refuses to compile this without having the full class declaration.
Closes#12452.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxString::utf8_str() and FromUTF8() to convert to and from UTF-8. This is
more efficient than using wxConvUTF8 as the code did before as it avoids the
conversion entirely when wxString uses UTF-8 internally (as it does by default
in wxX11) and also has the advantage of compiling in STL build unlike the old
code.
Closes#12518.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use unnecessary explicit casts of wxCharBuffer to "const char *".
Use wxCharBuffer::length() instead of strlen().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The close button in the dialog title bar should work even if there are no
buttons in the dialog itself (unlike the Escape key which works as an
accelerator for a button), so close the dialog explicitly if the emulated
button click wasn't processed in wxDialogBase::OnCloseWindow().
Closes#12513.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Document the enum itself and also correct GetLocalizedResourcesDir()
documentation which didn't specify the default value for the category
parameter.
Closes#12523.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
std::tr1::unordeded_map<T *>::find() doesn't accept "const T *" pointer, at
least with MinGW 4.4.0 standard library version, so add an explicit
const_cast<> to fix compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly choose the comparison operator to use when comparing wchar_t and
int values, otherwise MinGW (correctly) complains about ambiguity between
(int, int) and (wchar_t, const wxUniChar&) overloads.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There doesn't seem any reason to allow access to all the other struct Tm
fields but not yday so make it public, fill it in correctly when creating Tm
without using its ctor from struct tm and document struct Tm itself including
its yday field.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set Tm::yday to a fixed value in the ctor as well instead of not initializing
it at all.
This bug actually didn't have any visible consequences as yday is currently a
private member of struct tm and didn't seem to be used anywhere but it at
least avoids MinGW 4.x warnings about possibly uninitialized variable and
might become important in the future if we allow accessing this field.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Several warnings were generated for wxLogLastError() calls inside
CALL_CARET_API macro by MinGW 4.4. Fix them by adding the extra braces.
See also r61475.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775