At least some versions of MinGW don't define 64 bit integer types resulting in
errors when they're used in libtiff code, so explicitly include basetyps.h to
make sure these types are defined.
Closes#14897.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes compilation of wxGTK under Windows after the changes of r72779 and
r72780, where _wchdir() would need to be used but we don't currently have a
wxChdir() CRT function wrapper so use wxSetWorkingDirectory() instead.
Closes#14886.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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