]> git.saurik.com Git - wxWidgets.git/log
wxWidgets.git
11 years agoMerged libtiff 4.0.3 changes into the trunk.
Vadim Zeitlin [Mon, 10 Dec 2012 14:01:44 +0000 (14:01 +0000)] 
Merged libtiff 4.0.3 changes into the trunk.

This should help with making libtiff work better in 64 bit builds as libtiff 4
is supposed to support them much better.

Closes #12301.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agotypo fix
Robin Dunn [Sat, 8 Dec 2012 21:04:50 +0000 (21:04 +0000)] 
typo fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDocument wxXmlResourceHandler::GetFloat().
Vadim Zeitlin [Sat, 8 Dec 2012 13:47:45 +0000 (13:47 +0000)] 
Document wxXmlResourceHandler::GetFloat().

Closes #14879.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAlso account for EOL chars correctly in wxStyledTextCtrl::GetLineLength().
Vadim Zeitlin [Sat, 8 Dec 2012 13:27:55 +0000 (13:27 +0000)] 
Also account for EOL chars correctly in wxStyledTextCtrl::GetLineLength().

Make GetLineLength() consistent with GetLineText() after the changes of
r73140.

Closes #13646.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDocument wxWindow::Get{Min,Max}{Width,Height}().
Vadim Zeitlin [Sat, 8 Dec 2012 13:22:28 +0000 (13:22 +0000)] 
Document wxWindow::Get{Min,Max}{Width,Height}().

These methods were not documented and somehow inherited the description of the
first method of the group they were in, which didn't make any sense for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't test for key code being valid unnecessarily.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:38 +0000 (00:37 +0000)] 
Don't test for key code being valid unnecessarily.

The key code was already found to be valid just above, so suppress Coverity
warning about an always true test by not checking it again. This also makes
the code more clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoRemove unnecessary default from a switch statement.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:36 +0000 (00:37 +0000)] 
Remove unnecessary default from a switch statement.

Don't check for impossible enum element value, it's better to not have the
default clause at all to get a warning from g++ if this enum ever changes
later. And for now the presence of default results in a warning from Coverity
about unreachable code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix copy/paste error in UnsetConstraints().
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:33 +0000 (00:37 +0000)] 
Fix copy/paste error in UnsetConstraints().

"top" was mistakenly used in the code dealing with "left" constraint.

Thanks to Coverity for finding this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCheck gtk_tree_model_iter_nth_child() return value in wxChoice code.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:31 +0000 (00:37 +0000)] 
Check gtk_tree_model_iter_nth_child() return value in wxChoice code.

This is probably harmless but check the return value just to suppress Coverity
warning about not doing it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't use values returned by lstat() if it failed in wxFileCtrl code.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:28 +0000 (00:37 +0000)] 
Don't use values returned by lstat() if it failed in wxFileCtrl code.

The buffer may be uninitialized or at least not contain the correct data if
lstat() failed, don't use it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCheck wxDir::GetNext() return value in wxFindNextFile().
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:25 +0000 (00:37 +0000)] 
Check wxDir::GetNext() return value in wxFindNextFile().

This doesn't really change anything as the returned value would be empty
anyhow in case of an error, but suppresses Coverity warning about not checking
the return value of a function whose return value is checked in other places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd a wxHtmlTag helper parsing both absolute values and percents.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:21 +0000 (00:37 +0000)] 
Add a wxHtmlTag helper parsing both absolute values and percents.

This allows to avoid some code duplication in different handlers.

Closes #14868.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't unnecessarily NUL-terminate wxCharBuffer contents.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:17 +0000 (00:37 +0000)] 
Don't unnecessarily NUL-terminate wxCharBuffer contents.

wxCharBuffer already initializes the last byte of the buffer it allocates to 0
so there is no need to do it explicitly.

Also don't allocate an extra byte, wxCharBuffer already adds one to the length
passed to it for the trailing NUL.

See #13885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoStrip EOL characters from wxStyledTextCtrl::GetLineText() return value.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:13 +0000 (00:37 +0000)] 
Strip EOL characters from wxStyledTextCtrl::GetLineText() return value.

For consistency with all the other wxTextCtrl-like classes, the value returned
by this method must not include line terminator characters (like '\n'). Notice
that Scintilla-specific GetLine() does still include them, for consistency
with the Scintilla API itself.

Closes #13646.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCatch attempts to create a window with itself as parent.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:10 +0000 (00:37 +0000)] 
Catch attempts to create a window with itself as parent.

This doesn't happen often but when it does, the results are catastrophic and
not always easy to debug, so try catch this as soon as possible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoRemove check of eof() return value validity.
Vadim Zeitlin [Sat, 8 Dec 2012 00:37:08 +0000 (00:37 +0000)] 
Remove check of eof() return value validity.

It's useless and resulted in a warning from Coverity as it correctly
determined that this code could never be executed under Unix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agodisable Ubuntu "overlay scrollbar", see #14871
Paul Cornett [Thu, 6 Dec 2012 05:33:43 +0000 (05:33 +0000)] 
disable Ubuntu "overlay scrollbar", see #14871

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agofix tests for valid pen and brush, broken in r73099
Paul Cornett [Wed, 5 Dec 2012 17:38:30 +0000 (17:38 +0000)] 
fix tests for valid pen and brush, broken in r73099

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agowxRTC text box layout fixes
Julian Smart [Wed, 5 Dec 2012 16:23:12 +0000 (16:23 +0000)] 
wxRTC text box layout fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCompilation fir for VC6 after r73124.
Vadim Zeitlin [Tue, 4 Dec 2012 12:28:28 +0000 (12:28 +0000)] 
Compilation fir for VC6 after r73124.

VC6 doesn't have __debugbreak().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoExplicitly set margins for single line text controls in wxMSW.
Vadim Zeitlin [Tue, 4 Dec 2012 00:39:37 +0000 (00:39 +0000)] 
Explicitly set margins for single line text controls in wxMSW.

The margin used by them was inconsistent and depended on the initial size the
control was created with for some reason. Call EM_SETMARGINS explicitly to
ensure consistent appearance in all cases.

Closes #2438.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd missing critical section locking before accessing shared variable.
Vadim Zeitlin [Tue, 4 Dec 2012 00:39:33 +0000 (00:39 +0000)] 
Add missing critical section locking before accessing shared variable.

WinThreadStart() in wxMSW wxThread implementation accessed the variable
containing the thread state without locking which was wrong, do it only inside
the critical section.

Notice that there is still an unavoidable race condition between exiting the
thread and starting it, so it's not clear at all if we should try to avoid
calling DoThreadStart() here.

Closes #14865.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoOpen debugger at the location of failing assert, if possible.
Vadim Zeitlin [Tue, 4 Dec 2012 00:39:29 +0000 (00:39 +0000)] 
Open debugger at the location of failing assert, if possible.

Break into the debugger in the function containing the assert that failed
instead of inside wxWidgets assert handler which is several (~8) levels below
the last line of the user code. This is much more useful in practice and also
less confusing.

Currently this only works for MSVC as the other compilers don't have any
__debugbreak intrinsice equivalent.

Also update the except sample to test wxTrap() directly too.

Closes #11184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoRemove SashHitTest() "tolerance" parameter
Paul Cornett [Mon, 3 Dec 2012 18:14:55 +0000 (18:14 +0000)] 
Remove SashHitTest() "tolerance" parameter
Mouse events (LeftDown in particular) will only occur if the mouse is over the
sash, so it does not make sense to have a fudge factor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAvoid setting sash resize cursor when mouse is still over border of second pane with...
Paul Cornett [Mon, 3 Dec 2012 18:04:46 +0000 (18:04 +0000)] 
Avoid setting sash resize cursor when mouse is still over border of second pane with wxGTK
This made it possible to have the resize cursor, but not be able to drag the
sash, and happened because wxGTK sends a leave event when mouse leaves client
area instead of outer border of window. Setting the useless SashHitTest()
"tolerance" parameter to zero avoids the problem.
Fixes #1397

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix SashHitTest() returning true one pixel past the sash
Paul Cornett [Mon, 3 Dec 2012 17:37:54 +0000 (17:37 +0000)] 
Fix SashHitTest() returning true one pixel past the sash

If the sash is n pixels wide, the last position over the sash is start + n - 1, not start + n

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoExclude files in vendor branches from svn hook checks.
Vadim Zeitlin [Mon, 3 Dec 2012 17:05:07 +0000 (17:05 +0000)] 
Exclude files in vendor branches from svn hook checks.

These files correspond to upstream sources and shouldn't be subject to our
checks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agowxGTK linking fix after r73102.
Vadim Zeitlin [Mon, 3 Dec 2012 00:34:28 +0000 (00:34 +0000)] 
wxGTK linking fix after r73102.

Remove SendSelectionChangedEvent() declaration, it's now in the base class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCorrect lookup of Explorer-specific file association information.
Vadim Zeitlin [Sun, 2 Dec 2012 23:50:33 +0000 (23:50 +0000)] 
Correct lookup of Explorer-specific file association information.

The code added in r52154 never worked because it was looking for the Progid
value in a wrong place, look for it under UserChoice subkey where it really
is.

Also add a way to look up the command to open files with the given extension
to the exec sample.

Closes #12302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoNo changes, just reorganize the menu slightly in the exec sample.
Vadim Zeitlin [Sun, 2 Dec 2012 23:50:10 +0000 (23:50 +0000)] 
No changes, just reorganize the menu slightly in the exec sample.

Move all file association related commands under "File" menu from the "Exec"
one, having them there makes more sense and "Exec" menu is already quite big.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAllow specifying -1 as font size to mean "default" in wxMSW.
Vadim Zeitlin [Sun, 2 Dec 2012 23:49:48 +0000 (23:49 +0000)] 
Allow specifying -1 as font size to mean "default" in wxMSW.

This has never been officially documented but used to work in 2.8 and still
works in wxGTK, so make it works in wxMSW too for consistency.

Closes #12541.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoMake wxChoice and wxComboBox behaviour same as in native controls in wxMSW.
Vadim Zeitlin [Sun, 2 Dec 2012 23:49:25 +0000 (23:49 +0000)] 
Make wxChoice and wxComboBox behaviour same as in native controls in wxMSW.

Keep the item selected from the drop down using keyboard when switching away
from the control by pressing TAB: although this generates CBN_SELENDCANCEL
notification, the selection is actually kept by the native controls in this
case, so don't reset it ourselves -- even though it makes sense, it makes wx
applications behave differently from the native ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd wxControlWithItems::SendSelectionChangedEvent() helper.
Vadim Zeitlin [Sun, 2 Dec 2012 23:48:59 +0000 (23:48 +0000)] 
Add wxControlWithItems::SendSelectionChangedEvent() helper.

Reuse the same event generation code for wxChoice in wxMSW, wxGTK and wxOSX
and also wxComboBox in wxMSW and wxGTK instead of duplicating it (incompletely
and so partially incorrectly in wxOSX case).

This is just a refactoring so no changes in behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAvoid using "do { ... } while ( wxFalse )" pseudo-loop.
Vadim Zeitlin [Sun, 2 Dec 2012 23:48:36 +0000 (23:48 +0000)] 
Avoid using "do { ... } while ( wxFalse )" pseudo-loop.

This loop can't be optimized away by the compiler because wxFalse is an extern
variable which can't be known to be always false. Additionally, this creates
many false positives from Coverity as it assumes that the loop can be executed
more than once.

Define wxSTATEMENT_MACRO_BEGIN/END macros abstracting the exact solution used
and replace wxFalse with "(void)0, 0" for now as this seems to placate MSVC
(which warns about using a bare "0" as a condition) while still allowing the
loop to be completely optimized away.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoWarn, don't assert, about unexpected inotify events.
Vadim Zeitlin [Sun, 2 Dec 2012 20:24:38 +0000 (20:24 +0000)] 
Warn, don't assert, about unexpected inotify events.

In practice we seem to be getting some unexpected inotify() events during
heavy IO activity. This shouldn't happen but it does, so at least don't
prevent the program from running by popping up the assertion dialog when it
happens.

Closes #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosimplify code so it always returns the same object
Paul Cornett [Sun, 2 Dec 2012 05:48:24 +0000 (05:48 +0000)] 
simplify code so it always returns the same object

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoclean up wxCairoRenderer initialization mess
Paul Cornett [Sun, 2 Dec 2012 05:11:25 +0000 (05:11 +0000)] 
clean up wxCairoRenderer initialization mess

Remove unused Unload(), wxCairoCleanUp(), m_loaded and gCairoRenderer, and redundant Load()
and EnsureIsLoaded(). Just call wxCairoInit() directly, and for GTK do nothing at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoremove unnecessary include of wx/cairo.h
Paul Cornett [Sun, 2 Dec 2012 03:35:37 +0000 (03:35 +0000)] 
remove unnecessary include of wx/cairo.h

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoRemove nearly empty wx/cairo.h header
Paul Cornett [Sun, 2 Dec 2012 02:28:48 +0000 (02:28 +0000)] 
Remove nearly empty wx/cairo.h header
It does so little now it's not worth having. And it should not have been a public header.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agouse stock colour/pen/brush objects in samples
Paul Cornett [Sat, 1 Dec 2012 23:06:50 +0000 (23:06 +0000)] 
use stock colour/pen/brush objects in samples

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agouse new pen/brush style names in samples
Paul Cornett [Sat, 1 Dec 2012 22:34:07 +0000 (22:34 +0000)] 
use new pen/brush style names in samples

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoremove colour/pen/brush arguments which are the default in the samples
Paul Cornett [Sat, 1 Dec 2012 22:14:36 +0000 (22:14 +0000)] 
remove colour/pen/brush arguments which are the default in the samples

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoUse disabled colour for the dropdown arrow of disabled ribbon.
Vadim Zeitlin [Sat, 1 Dec 2012 00:14:54 +0000 (00:14 +0000)] 
Use disabled colour for the dropdown arrow of disabled ribbon.

Previously the normal colour was used for the arrow in MSW art provider even
if the ribbon was disabled.

Closes #14864.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoMiscellaneous spelling and typo fixes in the documentation.
Vadim Zeitlin [Sat, 1 Dec 2012 00:14:31 +0000 (00:14 +0000)] 
Miscellaneous spelling and typo fixes in the documentation.

Closes #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix premature truncation of brief descriptions in Doxygen comments.
Vadim Zeitlin [Sat, 1 Dec 2012 00:14:07 +0000 (00:14 +0000)] 
Fix premature truncation of brief descriptions in Doxygen comments.

Don't end the brief description at the first period if it's a period which is
part of "i.e." or "e.g.": escape the space following it to prevent Doxygen
from recognizing it as an end of sentence.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix documentation of wxGridBagSizer::Add() spacer overload.
Vadim Zeitlin [Sat, 1 Dec 2012 00:13:40 +0000 (00:13 +0000)] 
Fix documentation of wxGridBagSizer::Add() spacer overload.

Describe the width and height parameters.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoInterface fixes for Phoenix
Robin Dunn [Fri, 30 Nov 2012 22:28:11 +0000 (22:28 +0000)] 
Interface fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosimplify code to return from the end of the function
Paul Cornett [Fri, 30 Nov 2012 18:21:45 +0000 (18:21 +0000)] 
simplify code to return from the end of the function

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoindentation fixes
Paul Cornett [Fri, 30 Nov 2012 18:01:53 +0000 (18:01 +0000)] 
indentation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agomove wxGet{Colour,Font}FromUser() out of utilscmn.cpp so they don't have to be in...
Paul Cornett [Fri, 30 Nov 2012 06:56:50 +0000 (06:56 +0000)] 
move wxGet{Colour,Font}FromUser() out of utilscmn.cpp so they don't have to be in every app that links statically

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't assert when stopping watching a just renamed file.
Vadim Zeitlin [Thu, 29 Nov 2012 22:03:21 +0000 (22:03 +0000)] 
Don't assert when stopping watching a just renamed file.

(Almost) silently ignore renames of the files which we don't watch any longer
instead of asserting if this happens.

Closes #14863.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoLog invalid inotify() events without a valid watch descriptor.
Vadim Zeitlin [Thu, 29 Nov 2012 22:02:58 +0000 (22:02 +0000)] 
Log invalid inotify() events without a valid watch descriptor.

Apparently we can get events without any valid watch descriptor, even though
this is not supposed to happen. At least warn about them.

See #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCorrect handling of IN_Q_OVERFLOW in wxFileSystemWatcher Linux code.
Vadim Zeitlin [Thu, 29 Nov 2012 22:02:36 +0000 (22:02 +0000)] 
Correct handling of IN_Q_OVERFLOW in wxFileSystemWatcher Linux code.

Don't use wd field if it's -1 which can happen for IN_Q_OVERFLOW.

See #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCope with the common case of utf-8 being specified in the .hhp file, and convert...
Julian Smart [Thu, 29 Nov 2012 10:17:00 +0000 (10:17 +0000)] 
Cope with the common case of utf-8 being specified in the .hhp file, and convert the book title.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agodeclare wxQsort in vector.h as well as utils.h to work around circular header depende...
Paul Cornett [Thu, 29 Nov 2012 07:53:21 +0000 (07:53 +0000)] 
declare wxQsort in vector.h as well as utils.h to work around circular header dependency mess

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDo not use GTKIsUsingGlobalMenu when compiled against gtk1.x
Jouk Jansen [Thu, 29 Nov 2012 07:00:39 +0000 (07:00 +0000)] 
Do not use GTKIsUsingGlobalMenu when compiled against gtk1.x

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix bezel used for bitmap buttons in wxOSX/Cocoa.
Vadim Zeitlin [Wed, 28 Nov 2012 23:56:38 +0000 (23:56 +0000)] 
Fix bezel used for bitmap buttons in wxOSX/Cocoa.

Don't use NSRoundedBezelStyle for bitmap buttons as this bezel has fixed
height. Instead, use NSRegularSquareBezelStyle which can used with buttons of
any size and is the correct bezel to use for the buttons mostly identified by
their icon according to Apple docs.

Notice that we still use the standard bezel for the "small" (where "small" is
arbitrarily defined by the hard coded 20 pixels height) icons as those are
usually used in addition to the text and not replacing it and so it makes more
sense to use the same bezel as for the normal buttons for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoSelect the entire spin control contents when changing its value.
Vadim Zeitlin [Wed, 28 Nov 2012 23:56:16 +0000 (23:56 +0000)] 
Select the entire spin control contents when changing its value.

Selecting the entire contents makes it more convenient for the user to enter
the new value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoHandle Shift-TAB correctly in wxOSX/Carbon wxComboBox.
Vadim Zeitlin [Wed, 28 Nov 2012 23:55:53 +0000 (23:55 +0000)] 
Handle Shift-TAB correctly in wxOSX/Carbon wxComboBox.

The navigation event direction should depend on Shift key state.

See #3821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoadding some additional fixes for programmatic selection handling
Stefan Csomor [Wed, 28 Nov 2012 20:57:59 +0000 (20:57 +0000)] 
adding some additional fixes for programmatic selection handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCompilation fix.
Robin Dunn [Wed, 28 Nov 2012 17:14:35 +0000 (17:14 +0000)] 
Compilation fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCompilation fixes after r73050.
Vadim Zeitlin [Wed, 28 Nov 2012 15:42:18 +0000 (15:42 +0000)] 
Compilation fixes after r73050.

See #14862.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd "rect" paramerer to wxRichToolTip::ShowFor().
Vadim Zeitlin [Wed, 28 Nov 2012 14:18:17 +0000 (14:18 +0000)] 
Add "rect" paramerer to wxRichToolTip::ShowFor().

Allow to show the tooltip at the exact specified position instead of placing
it automatically.

Closes #14862.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd missing wxUSE_OLE checks to safearray.cpp.
Vadim Zeitlin [Wed, 28 Nov 2012 14:17:53 +0000 (14:17 +0000)] 
Add missing wxUSE_OLE checks to safearray.cpp.

Fix compilation with wxUSE_OLE==0.

Closes #14860.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCompilation fix for wxDocManager after r73004.
Vadim Zeitlin [Wed, 28 Nov 2012 14:17:30 +0000 (14:17 +0000)] 
Compilation fix for wxDocManager after r73004.

Define GetXXXVector() methods after all the classes are fully declared to
ensure that static_cast<> inside wxList::AsVector() they use compiles with the
OpenVMS compiler.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosupport for inheriting non-standard attributes (explicit fonts instead of window...
Stefan Csomor [Wed, 28 Nov 2012 10:13:41 +0000 (10:13 +0000)] 
support for inheriting non-standard attributes (explicit fonts instead of window variants), fixes #3583

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosupporting selection methods when not focused, closes #1480
Stefan Csomor [Wed, 28 Nov 2012 08:51:56 +0000 (08:51 +0000)] 
supporting selection methods when not focused, closes #1480

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosimulating focus events, see #13495
Stefan Csomor [Tue, 27 Nov 2012 19:16:21 +0000 (19:16 +0000)] 
simulating focus events, see #13495

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosupport for simulating focus events since not all controls can be focused
Stefan Csomor [Tue, 27 Nov 2012 19:09:41 +0000 (19:09 +0000)] 
support for simulating focus events since not all controls can be focused

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoemulating wx' focus-lost behavior
Stefan Csomor [Tue, 27 Nov 2012 13:23:46 +0000 (13:23 +0000)] 
emulating wx' focus-lost behavior

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agospell error fixed
Stefan Csomor [Tue, 27 Nov 2012 13:22:26 +0000 (13:22 +0000)] 
spell error fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoworkaround, see #14856
Stefan Csomor [Tue, 27 Nov 2012 08:29:24 +0000 (08:29 +0000)] 
workaround, see #14856

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix OpenVMS makefile
Jouk Jansen [Tue, 27 Nov 2012 07:42:19 +0000 (07:42 +0000)] 
Fix OpenVMS makefile

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoMore interface fixes for Phoenix
Robin Dunn [Tue, 27 Nov 2012 01:19:31 +0000 (01:19 +0000)] 
More interface fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoCompilation fix to docview sample after r73004.
Vadim Zeitlin [Mon, 26 Nov 2012 23:53:44 +0000 (23:53 +0000)] 
Compilation fix to docview sample after r73004.

Don't use wxDocManager::GetDocumentsVector() with VC6 which doesn't have it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agodisconnect "toggled" signal in dtor when style has wxALIGN_RIGHT
Paul Cornett [Mon, 26 Nov 2012 18:30:08 +0000 (18:30 +0000)] 
disconnect "toggled" signal in dtor when style has wxALIGN_RIGHT

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agofix for GTK assert after r72696, a draw/expose_event signal may also be attached...
Paul Cornett [Mon, 26 Nov 2012 17:53:01 +0000 (17:53 +0000)] 
fix for GTK assert after r72696, a draw/expose_event signal may also be attached to parent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDisable CallAfter() for MSVC 7 too, it can't compile this code.
Vadim Zeitlin [Mon, 26 Nov 2012 15:51:04 +0000 (15:51 +0000)] 
Disable CallAfter() for MSVC 7 too, it can't compile this code.

It was already disabled for VC6 but VC7 doesn't compile this code neither, so
disable it for this compiler as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoBracket vararg macro definition with wxHAS_VARIADIC_MACROS.
Vadim Zeitlin [Mon, 26 Nov 2012 15:50:37 +0000 (15:50 +0000)] 
Bracket vararg macro definition with wxHAS_VARIADIC_MACROS.

This should fix tests compilation with VC6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAnother Nepalese translations update.
Vadim Zeitlin [Mon, 26 Nov 2012 13:50:13 +0000 (13:50 +0000)] 
Another Nepalese translations update.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix wxALWAYS_SHOW_SB behaviour in wxGTK.
Vadim Zeitlin [Mon, 26 Nov 2012 13:14:39 +0000 (13:14 +0000)] 
Fix wxALWAYS_SHOW_SB behaviour in wxGTK.

Don't show the scrollbar always if it's not enabled at all, i.e. if the
corresponding wxHSCROLL or wxVSCROLL style is not specified.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix harmless warning about uninitialized variable in fswatcher sample.
Vadim Zeitlin [Mon, 26 Nov 2012 13:14:15 +0000 (13:14 +0000)] 
Fix harmless warning about uninitialized variable in fswatcher sample.

Just always initialize it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix warnings about using type attribute on forward declaration.
Vadim Zeitlin [Mon, 26 Nov 2012 13:13:47 +0000 (13:13 +0000)] 
Fix warnings about using type attribute on forward declaration.

This results in many, many warnings in OS X build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix wxGenericListCtrl scrolling by not processing the events twice.
Vadim Zeitlin [Sun, 25 Nov 2012 23:18:20 +0000 (23:18 +0000)] 
Fix wxGenericListCtrl scrolling by not processing the events twice.

Scrolling wxGenericListCtrl was broken since r72939 because its OnScroll()
event handler explicitly called wxScrollHelper::HandleOnScroll() which was
also called by the base class ProcessEvent().

Arguably, wxScrollHelper::ProcessEvent() should be updated to allow handling
events directly like this by not processing it again if the event wasn't
skipped but for now just do skip the event and let the default handling take
place which at least makes wxGenericListCtrl work correctly again.

Closes #14852.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoFix TAB navigation in wxGTK broken by r72663.
Vadim Zeitlin [Sun, 25 Nov 2012 23:17:56 +0000 (23:17 +0000)] 
Fix TAB navigation in wxGTK broken by r72663.

Don't call SetCanFocus(true) for container windows with focusable children,
this doesn't play well at all with wxGTK focus handling and in particular
totally disabled TAB navigation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoRestore generic GetPartialTextExtents() version use in wxGTK and wxMSW.
Vadim Zeitlin [Sun, 25 Nov 2012 23:17:33 +0000 (23:17 +0000)] 
Restore generic GetPartialTextExtents() version use in wxGTK and wxMSW.

Non-wxWindowDC-derived wxDC classes in wxGTK, such as wxGtkPrinterDCImpl, have
to fall back on the generic implementation of GetPartialTextExtents() as Pango
version can't be used with them.

This fixes a crash due to using NULL Pango layout when printing wxRichTextCtrl
in wxGTK.

Closes #14847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't dereference NULL output pointer in wxTextMeasure.
Vadim Zeitlin [Sun, 25 Nov 2012 23:17:10 +0000 (23:17 +0000)] 
Don't dereference NULL output pointer in wxTextMeasure.

Check that pointers are non-NULL before assigning 0 to them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoHandle UBUNTU_MENUPROXY=0 as "not using global menu".
Vadim Zeitlin [Sun, 25 Nov 2012 11:51:21 +0000 (11:51 +0000)] 
Handle UBUNTU_MENUPROXY=0 as "not using global menu".

Although the correct way to disable the global menu bar under Ubuntu is to
set UBUNTU_MENUPROXY to an empty string, many guides on the web advise setting
it to "0", so handle this special case in wxApp::GTKIsUsingGlobalMenu() too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoavoid functions deprecated in GTK3
Paul Cornett [Sun, 25 Nov 2012 03:41:42 +0000 (03:41 +0000)] 
avoid functions deprecated in GTK3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agofix wxBitmapComboBox Gtk-CRITICAL assertion `GTK_IS_ENTRY (entry)' failed
Paul Cornett [Sun, 25 Nov 2012 02:49:42 +0000 (02:49 +0000)] 
fix wxBitmapComboBox Gtk-CRITICAL assertion `GTK_IS_ENTRY (entry)' failed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agonon-pch build fix
Paul Cornett [Sun, 25 Nov 2012 02:30:08 +0000 (02:30 +0000)] 
non-pch build fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoSimplify GetDefaultAttributesFromGTKWidget() by passing the widget to use,
Paul Cornett [Sun, 25 Nov 2012 02:23:34 +0000 (02:23 +0000)] 
Simplify GetDefaultAttributesFromGTKWidget() by passing the widget to use,
rather than a pointer to a function to create the widget

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoUse idle time menu updating when using global menu bar in wxGTK.
Vadim Zeitlin [Sun, 25 Nov 2012 00:15:49 +0000 (00:15 +0000)] 
Use idle time menu updating when using global menu bar in wxGTK.

We don't get wxEVT_MENU_OPEN events when using the global menu bar so don't
rely on them for updating the menu items status and fall back to idle time
menu updating if the global menu bar is used.

This required changing wxUSE_IDLEMENUUPDATES tests from compile- to run-time
ones.

Closes #14302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd wxApp::GTKIsUsingGlobalMenu() helper to wxGTK.
Vadim Zeitlin [Sun, 25 Nov 2012 00:15:26 +0000 (00:15 +0000)] 
Add wxApp::GTKIsUsingGlobalMenu() helper to wxGTK.

This allows to check whether the global menu is being used and will be mostly
useful for working around various bugs/problems uncovered by it.

See #14302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoIgnore menu events while modal dialogs are shown in wxGTK.
Vadim Zeitlin [Sun, 25 Nov 2012 00:15:03 +0000 (00:15 +0000)] 
Ignore menu events while modal dialogs are shown in wxGTK.

Normally menus are disabled in this case but not when running under Ubuntu
Unity, so add an explicit test for this to avoid breaking the program expected
flow of control by allowing the user to show the same modal dialog twice, for
example.

This is not ideal, it would be better to visually disable the menu while the
modal dialogs are shown but is better than nothing.

Closes #14823.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoBlind compilation fix for VC6 after r73004.
Vadim Zeitlin [Sat, 24 Nov 2012 23:01:45 +0000 (23:01 +0000)] 
Blind compilation fix for VC6 after r73004.

Define wxDocTemplateVector for VC6 too, it's used in docview.cpp.

Also wrap too long lines.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agosilence GCC warning "enumeral and non-enumeral type in conditional expression"
Paul Cornett [Sat, 24 Nov 2012 21:49:04 +0000 (21:49 +0000)] 
silence GCC warning "enumeral and non-enumeral type in conditional expression"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd wxDocManager::Get{Views,Documents,Templates}Vector().
Vadim Zeitlin [Sat, 24 Nov 2012 17:37:12 +0000 (17:37 +0000)] 
Add wxDocManager::Get{Views,Documents,Templates}Vector().

Add accessors returning more convenient wxVectors to supplement the existing
ones giving access to internally used wxLists.

Closes #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoAdd wxList::AsVector<>() helper.
Vadim Zeitlin [Sat, 24 Nov 2012 17:36:44 +0000 (17:36 +0000)] 
Add wxList::AsVector<>() helper.

This can be useful in legacy code using wxList to progressively replace it
with wxVector.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

11 years agoDon't include wx/utils.h from wx/vector.h.
Vadim Zeitlin [Sat, 24 Nov 2012 17:36:19 +0000 (17:36 +0000)] 
Don't include wx/utils.h from wx/vector.h.

This will allow to include wx/vector.h from wx/list.h which is itself included
from wx/utils.h by breaking this circular dependency.

Don't use wxMin(), defined in wx/utils.h, in order to do this.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775