In optimized build g++ warned about the second element of two-element array
passed to encode_utf16() being possibly uninitialized. This wasn't really the
case but change the code just to avoid the warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
OS X g++ warned that "control may reach end of non-void function" in
wxRichTextHelpInfo::ShowHelp(). This wasn't really the case but change the
function logic slightly to (hopefully) suppress the warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The virtual ColourToString() method was hidden and not overridden in the
sample because it didn't use the last argument of the base class method.
Fix this in the most straightforward (albeit not necessarily the most correct)
way to at least ensure that the function is really overridden.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This resulted in (useful) g++ warning and didn't make any sense in any case.
Check for the loop variable value being 0 at the end of the loop instead now.
If the old code was correct it shouldn't change its behaviour and if not, this
might fix a bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Leaving m_hgdiobj uninitialized probably didn't result in any problems
considering how this class is currently used but it did result in g++ warnings
about uninitialized member with aggressive warning flags and also could easily
become a problem in the future so just ensure that we always initialize it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Hopefully this means it won't be forgotten the next time.
Also mentioned that the new docs.wxwidgets.org link should be now already
created when the release is being done.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Revert the changes of r67280 which fixed several typos in these files as they
were getting modified each time gen_iface.py was rerun and we don't want to
touch the original Scintilla files to fix these typos.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Modify the script generating this file itself to produce IsOk() instead of
Ok(). This replaces the changes of r67681 which only modified the generated
file.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For this, it cannot derive from wxCommandEvent. Extracted the bits
from wxCommandEvent useful for passing data between threads into
wxEventBasicPayloadMixin helper class shared by both.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Child documents are virtual documents corresponding to parts of their parent
document which can't be saved nor loaded independently of their parent and are
closed when the parent is closed.
This finally makes some use of wxDocument::m_documentParent field which was
always present in the docview code but never used before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The bug fix of r67990 relied on DateTime_SetSystemtime() returning FALSE if
setting the date failed but, unfortunately, this function doesn't behave
correctly under XP (and presumably earlier systems) and returns TRUE even if
it didn't actually change the date because it was out of range.
Implement an alternative solution not relying on this function return value
but simply checking the range ourselves.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r67619 changed the signature of the virtual Initialize() method
and in doing so broke the existing code overriding it. Avoid this problem by
restoring the old method signature and adding a function with a different name
providing the new functionality.
Also notice in the documentation that there is no real need to override
Initialize() in any case (but this doesn't change the fact that there is
existing code that does do it).
See #13108.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MinGW headers define MSVC-compatible _strdup() even in strict ANSI mode so we
can always use it with MinGW.
This fixes a linking problem when wx itself was built without strict ANSI but
the program using it does use strict ANSI mode (e.g. due to the use of
-std=c++0x g++ option).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The view doesn't have any associated frame when using the special "single
view" mode in the sample, so don't try to show it when creating a new view.
This resulted in a crash when starting the sample with --single command line
parameter.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The internally stored date value was getting out of sync with the real date in
the control itself when SetValue() was called with a date out of the currently
set range. This resulted in an assert failure and other unpleasantness later.
Fix the bug and add a unit test checking for it (and also with some other
basic wxDatePickerCtrl checks).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just refactor the code to allow using CPPUNIT_ASSERT_EQUAL
with wxDateTime in other tests in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMSW native control always has a built-in lower limit as MSW doesn't support
the dates before the year 1601 so wxDatePickerCtrl::GetRange() always returns
a valid range start, even if SetRange() hadn't been called to set it.
As this can be unexpected, document this behaviour clearly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While GTK+ doesn't support imposing ranges for dates selection natively, we
can do it ourselves by preventing the user from selecting any date outside of
the currently valid range.
This allows to use ranges under all platforms and not only in wxCalendarCtrl
itself but in wxDatePickerCtrl as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Latest mingw64 MinGW compiler has the headers required for enabling
wxUSE_DBGHELP, fix the warnings given by g++ when compiling wxDbgHelpDLL code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775