Vadim Zeitlin [Sun, 25 Mar 2012 00:31:47 +0000 (00:31 +0000)]
Fix bug with parsing time formats during DST periods.
wxDateTime::ParseFormat() used todays date as fall back when parsing all
formats, including those involving times, which meant that its results
depended on whether DST was active at the time of the parsing which was
clearly wrong.
Fix this by using a fixed date on which DST is known not to be active as fall
back date.
This fixes unit test failures in DateTimeTestCase::TestTimeFormat() when it
was ran on a DST transition date.
Vadim Zeitlin [Sat, 24 Mar 2012 18:24:19 +0000 (18:24 +0000)]
Allow hiding rows in wxGrid with HideRow().
HideRow() was simply ignored as SetRowSize(row, 0) didn't do anything. Check
for the special value of 0 and allow it, just as it was done for the columns
since r57336.
Vadim Zeitlin [Fri, 23 Mar 2012 15:13:16 +0000 (15:13 +0000)]
Don't cache incorrect length in wxString::DoUngetWriteBuf().
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).
Vadim Zeitlin [Fri, 23 Mar 2012 15:13:13 +0000 (15:13 +0000)]
Don't cache incorrect length in wxString::assign(char*, size_t).
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.
Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.
Vadim Zeitlin [Fri, 23 Mar 2012 15:13:08 +0000 (15:13 +0000)]
Fix caching wrong length in wxString(str, len) ctor in UTF-8 build.
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.
Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).
Vadim Zeitlin [Wed, 21 Mar 2012 00:11:12 +0000 (00:11 +0000)]
Fix display of "const" methods in wxGTK assert dialog.
Don't separate the function name and its arguments types in 2 different
columns in the assert dialog, this doesn't really work with const methods as
"const" can't be separated from the function like this. The old code just
didn't take "const" into account at all and mangled all the const methods by
showing ") cons" (no typo) at the end.
Just show everything in one column to avoid the problem and also simplify the
code.
Vadim Zeitlin [Tue, 20 Mar 2012 23:31:25 +0000 (23:31 +0000)]
Remove empty and unnecessary wxFontDialogBase destructor.
This fixes build with wxUSE_FONTMAP==0 as this dtor was only defined inside
"#if wxUSE_FONTMAP" section. Instead of fixing this, just get rid of this dtor
entirely as it was unnecessary anyhow.
Robin Dunn [Tue, 20 Mar 2012 20:53:15 +0000 (20:53 +0000)]
Document steps needed to update to newer Scintilla. (From memory, will need to be reviewed while actually doing an update to find other things that should be done.)
Vadim Zeitlin [Mon, 19 Mar 2012 12:53:32 +0000 (12:53 +0000)]
Define wxUSE_TASKBARICON_BALLOONS as 1 for wxMSW builds using configure.
Defining it as 1 is better than not allowing to set it at all and this setting
is not important enough to warrant its own command-line configure option.
Vadim Zeitlin [Mon, 19 Mar 2012 12:53:21 +0000 (12:53 +0000)]
Explicitly cast size_t to int to suppress MSVC warnings.
Implicit size_t-to-int conversions provoke warnings when building 64 bit
version (in which sizeof(size_t) > sizeof(int)) with MSVC, so make them
explicit as the size_t values used here will always fit in int range.
Vadim Zeitlin [Sun, 18 Mar 2012 01:35:53 +0000 (01:35 +0000)]
Avoid crashes in wxMSW when using buttons without valid parent.
Child controls such as buttons are supposed to always have a valid parent but
if, somehow, they don't, still don't crash in wxMSW button code but just
trigger an assert failure instead of unavailable button top level parent
instead.
Vadim Zeitlin [Thu, 15 Mar 2012 13:49:49 +0000 (13:49 +0000)]
Pass the original format to wxDataObjectSimple in wxDataObjectComposite.
Some "simple" data objects, such as wxTextDataObject, are actually not simple
and support multiple formats so pass the real format to them so that they
could do the right thing.
Steve Lamerton [Mon, 12 Mar 2012 14:57:44 +0000 (14:57 +0000)]
Add new WX_ASSERT_EVENT_OCCURS macro to improve behaviour of testing asynchronous events. Use it in the wxWebView tests and re-enable previously failing tests.
Vadim Zeitlin [Sun, 11 Mar 2012 23:55:19 +0000 (23:55 +0000)]
Update the text part of combobox when changing text of selected item in wxGTK.
Add a call to SetValue() to wxComboBox::SetString() in wxGTK if the item being
changed is the currently selected one. The new behaviour is consistent with
wxMSW and also makes more sense.
Document it too to remove any doubts about what is supposed to happen in this
case.
Vadim Zeitlin [Sun, 11 Mar 2012 23:41:27 +0000 (23:41 +0000)]
Add a test for wxComboBox::SetString() to the widgets sample.
This allows to easily test this function interactively, notably check what
happens when the currently selected string is changed under different ports.
Vadim Zeitlin [Sun, 11 Mar 2012 23:41:16 +0000 (23:41 +0000)]
Document wxBK_HITTEST_XXX values.
They were previously implicitly documented in HitTest() itself but this was
insufficient for wrappers generation as the constants themselves were never
declared. Do define them now and also correct and update their descriptions.
Steve Lamerton [Sun, 11 Mar 2012 14:32:24 +0000 (14:32 +0000)]
Move getting the unit test event count from wxTestableFrame to the EventCounter class. This reduces the need to have wxTestableFrame pointers all over the unit testing code and should reduce bugs caused by counting the wrong events.
Julian Smart [Sun, 11 Mar 2012 05:31:06 +0000 (05:31 +0000)]
A fix for flicker when the top-level window is disabled or enabled (e.g. by modal dialogs).
Achieved by using IsThisEnabled to determine the visual disabled state and thus requiring no refresh on top-level window enabling/disabling.
Vadim Zeitlin [Sat, 10 Mar 2012 14:26:22 +0000 (14:26 +0000)]
Explicitly document wxMessageOutputFlags.
They were already mentioned in wxMessageOutputBest ctor documentation but now
add the standalone enum too to make the documentation header semantically valid.
Vadim Zeitlin [Thu, 8 Mar 2012 13:23:34 +0000 (13:23 +0000)]
Revert the zoom direction on Ctrl-mouse wheel in wxStyledTextCtrl.
The direction of the zoom in wxSTC didn't correspond to the usual conventions
which is to zoom in on Ctrl-Wheel-Up and zoom out on Ctrl-Wheel-Down, while
wxSTC did exactly the converse. Change it to behave as everybody else.
Vadim Zeitlin [Wed, 7 Mar 2012 23:50:21 +0000 (23:50 +0000)]
Deprecate wxWindow::MakeModal().
Using this function was never the right way to show a modal window and it
didn't really work correctly. Instead of futilely trying to fix it, just
deprecate it.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:57 +0000 (13:00 +0000)]
Override InheritAttributes() to do nothing in wxNonOwnedWindow.
Non owner windows shouldn't inherit attributes from their parent. This wasn't
a problem in wxMSW where InheritAttributes() was never called for them but was
in wxGTK (and possibly other ports) where dialogs inherited font from their
parent.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:55 +0000 (13:00 +0000)]
Override AdjustForParentClientOrigin() in wxNonOwnedWindow to do nothing.
No real changes, just replace an IsTopLevel() check in the base class
implementation of AdjustForParentClientOrigin() and override it for all top
level windows in wxNonOwnedWindow instead.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:51 +0000 (13:00 +0000)]
Remove the wrong "std::" scope prefix before ceil() call.
Fix compilation errors with VC6 (and possibly other compilers) introduced in
r70797 (see #13383): as we only include <math.h> and not <cmath> we don't
necessarily have std::ceil() available, only the extern "C" ceil(). Just use
the latter instead of the former.