Commit Graph

60279 Commits

Author SHA1 Message Date
Tobias Taschner
2b3633b3c0 Add wxCheckOsVersion() to implement platform based OS version checks.
Windows implements VerifyVersionInfo api since Win2k. Starting with Windows 8.1 GetVersionEx is deprecated and may not return the expected version number if the application does not contain the correct compatibility information in its manifest. VerifyVersionInfo works independent of manifest in the executable (and is the recommend way to check).

Existing code may already use wxPlatformInfo::CheckOSVersion() so the method forwards the call to wxCheckOsVersion if initialized for the current system.
2015-08-06 11:32:38 +02:00
Tobias Taschner
d8e291c27a Remove unused and outdated code in OS X wxGetOsVersion. 2015-08-06 10:16:50 +02:00
Tobias Taschner
93324ebe62 Update utils.h documentation with more current OS versions.
Some OS versions mentioned were a little bit outdated and the paragraph about wxGetHostName on Windows simply didn’t match the implementation any more.
2015-08-06 10:12:17 +02:00
Tobias Taschner
e9c04133d2 Remove code targeted at MacOS versions prior to OS X. 2015-08-06 09:50:47 +02:00
Tobias Taschner
388e82e70c Remove MSW code targeted at versions prior to WinXP.
In 3.1 WinXP is required so remove checks and code for prior versions.
2015-08-06 09:44:20 +02:00
Artur Wieczorek
0b821adf90 Fix layout of wxSlider labels after changing value range.
Size of labels with new values can be different then size of current labels
and hence they should be re-laid out every time when the range is changed.

Closes #17093.
2015-08-05 20:43:06 +02:00
Tobias Taschner
a8c98a1191 Fix wxGetWinVersion() for Windows 10
Check for Windows 10 was implemented as check for version 6.4 but the final version of Windows 10 actually returns 10.0.
2015-08-04 15:04:33 +02:00
Tobias Taschner
c87c432033 Fix wxGetOsDescription() for Windows 10.
Check for Windows 10 was implemented as check for version 6.4 but the final
version of Windows 10 actually returns 10.0.
2015-08-04 14:42:46 +02:00
Tobias Taschner
e97bd98e18 Update supported Windows and MSVC versions in the documentation.
The current master doesn't support Win9x any more but does support Windows 10
and MSVC 15 and while the platform details page of the manual was already
updated to reflect this, the more visible introduction page was not, update it
as well.

Also update MSW installation instructions in install.txt.
2015-08-04 14:41:10 +02:00
Tobias Taschner
0a502cd354 Update OS X version requirement in README.
OS X >= 10.7 is required in 3.1.
2015-08-04 14:37:21 +02:00
Vadim Zeitlin
9bc3ab1ea7 Add wxNativeWindow allowing to easily embed native widgets in wx.
Implement the class for wxMSW, wxGTK and wxOSX/Cocoa, show it in the widgets
sample and add documentation for it.
2015-08-03 17:57:42 +02:00
Vadim Zeitlin
ce95913319 Use wxWindow instead of wxControl in the widgets sample.
Not all widgets are controls and we don't use any of wxControl-specific
methods in the sample, so don't require RecreateWidget() to return a wxControl
when a simple wxWindow suffices.

No real changes.
2015-08-03 17:57:42 +02:00
Vadim Zeitlin
2509e7927a Handle GTK_POLICY_EXTERNAL new in GTK+ 3.16 too.
Apparently this still doesn't display any scrollbars in the window itself, so
from our point of view it is equivalent to GTK_POLICY_NEVER.
2015-08-03 17:57:33 +02:00
Vadim Zeitlin
0bb45d7387 Remove commented out code in wxWindowMac::MacPostControlCreate().
This code was moved into SetPeer() ~4 years ago in d15694e8, there is really
no need to keep a copy of it here as well.

No real changes.
2015-08-03 17:40:56 +02:00
Vadim Zeitlin
004b5a4f49 Don't use "u" option with ar(1).
It seems like it was never really needed as we always delete the archive
before creating it anyhow and there is no advantage in "updating" it if it
doesn't exist. Worse, with recent ar versions (like the one from binutils 2.25
in Debian Sid), using "u" results in a somewhat unclear warning

ar: `u' modifier ignored since `D' is the default (see `U')

so just get rid of it to avoid the warning.
2015-08-03 17:40:30 +02:00
Tobias Taschner
270d1a5916 Changed doc of EnableFullScreenView() to reflect OS X 10.10+ behaviour 2015-08-03 14:39:38 +02:00
Vadim Zeitlin
949d2eeaa5 Provide correct documentation for wxWindow::SetPosition().
Just refer to Move(), this is trivial but necessary as otherwise Doxygen
"helpfully" reuses the first comment in the section for the otherwise
undocumented SetPosition() which didn't make any sense at all.
2015-08-02 19:51:57 +02:00
Vadim Zeitlin
6339837ffa Correct the documentation of wxFrame ctor parent argument.
It doesn't result in the frame floating over its parent, this is what
wxFRAME_FLOAT_ON_PARENT style is for, it just means that the frame is
minimized/restored when its parent is.
2015-08-02 15:31:54 +02:00
Vadim Zeitlin
27bb67355a Avoid deprecation warnings for gtk_widget_modify_bg() in wxGTK3.
We still need to use this function as its replacement is itself deprecated in
GTK+ 3.16, so just suppress the warnings for now.

Closes #17084.
2015-08-02 15:18:14 +02:00
Tobias Taschner
658eca2896 Avoid run-time warnings for OS X version checks under 10.10+.
Remove UMAGetSystemVersion() function calling which produced the following
warning on the console for every call:

WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.4 instead
of 10.10.4. Use NSProcessInfo's operatingSystemVersion property to get correct
system version number.*

Replace UMAGetSystemVersion with wxPlatformInfo::CheckOSVersion() which
internally uses wxGetOSVersion, which uses Gestalt calls not resulting in this
runtime warning.

Closes https://github.com/wxWidgets/wxWidgets/pull/55
2015-08-02 03:15:11 +02:00
Vadim Zeitlin
237739ba01 Update OS X version examples in wxOSX readme.
Don't use the not supported any longer 10.5.
2015-08-02 03:11:37 +02:00
Vadim Zeitlin
8ea6b080bc Update the required OS X version in the introduction manual page.
While the platform details page correctly mentioned 10.7, the more visible
introduction page still spoke about 10.5 and even PPC.
2015-08-02 03:09:02 +02:00
Tobias Taschner
ab065e1ad9 Removed OS X code targeted at versions prior to OS X 10.7.
At least 10.7 is required in 3.1 anyhow, so don't check for it needlessly.

See https://github.com/wxWidgets/wxWidgets/pull/55
2015-08-02 03:05:51 +02:00
Vadim Zeitlin
00dacea7de Correct the default value of wxThread::Wait() flags in the documentation.
It is wxTHREAD_WAIT_DEFAULT, which can be/still is different from
wxTHREAD_WAIT_BLOCK.
2015-08-02 02:44:41 +02:00
Vadim Zeitlin
1f16829c01 Skip drawing empty AUI panes.
This seems to be unnecessary and generates GTK+ warnings as it results in
passing rectangle with negative (after accounting for padding/margins) size to
gtk_paint_box() in wxAuiGtkTabArt, as could be seen e.g. when closing
"wxTextCtrl 2" tab in the aui sample.
2015-07-31 16:45:13 +02:00
Vadim Zeitlin
0e5f3612df Fix assert when adding controls to wxAuiToolBar.
The code was always wrong as it added the control to a new sizer when it was
still element of an old one, but this went unnoticed until the changes of
efce9b2306 which now trigger an assert.

Fix this by deleting the old sizer, and thus breaking the association between
it and the controls inside it, before adding the controls to the new one.

Closes #17080.
2015-07-31 16:40:09 +02:00
Paul Cornett
301f86ad85 reset clipping region in DestroyClippingRegion(), closes #17086 2015-07-30 09:59:51 -07:00
Vadim Zeitlin
f1b2c7ea04 Libtiff compilation fix for pre-C99 compilers.
Don't mix statements and declarations, this is not allowed in C89.

Fixes compilation with MSVC <= 10 after 6caa5e92c1

See #17083.
2015-07-30 00:57:52 +02:00
Vadim Zeitlin
9b029ea88a Expat compilation fix for pre-C99 compilers.
Don't mix statements and declarations, this is not allowed in C89.

Fixes compilation with MSVC <= 10 after 28ba8ed84e

See #17083.
2015-07-30 00:57:43 +02:00
Paul Cornett
fc03d2698c Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2015-07-27 10:35:01 -07:00
Paul Cornett
627b460378 use delete for memory allocated with new, closes #16797 2015-07-27 10:33:47 -07:00
Vadim Zeitlin
0eab786256 Suppress a harmless warning with MinGW 3.4.5 in wxMSW wxTreeCtrl.
Cast NM_DBLCLK to UINT explicitly as it's defined as int in the ancient
version of the headers used with this compiler.
2015-07-27 03:59:42 +02:00
Vadim Zeitlin
b17b0ab151 Work around or suppress gcc -Wunused-value warnings in wxMSW code.
TDM-GCC 4.9.2 gave many of these warnings for the calls to Windows common
controls macros, avoid them by adding error reporting where it makes sense or
just suppressing the warning by explicitly casting to void elsewhere (e.g. for
the macros which have no meaningful return value at all or return something
that we're not interested in instead of just success/failure indicator).
2015-07-27 03:55:01 +02:00
Vadim Zeitlin
73a5c20613 No real changes, just a tiny refactoring in wxMSW wxListCtrl.
Reuse wxListCtrl::SetTextColour() instead of calling ListView_SetTextColor()
from wxListCtrl::SetForegroundColour().

This ensures that the two functions behave consistently, e.g. they now both
use palette-relative colour instead of a raw RGB value in the case of the
latter method as before. This probably doesn't change anything in practice
nowadays.
2015-07-27 03:41:30 +02:00
Vadim Zeitlin
2c61e1b0da No changes, just use helper wxColourToPalRGB() in wxMSW code.
This is shorter than writing out all wxColour components.
2015-07-27 03:40:16 +02:00
Vadim Zeitlin
6caa5e92c1 Fix warnings about pointer/int casts in Win32 part of libtiff too.
Do the same thing for tif_win32.c as f995dfcc20
did for tif_unix.c, i.e. use a union for casting between HANDLEs and ints to
avoid compiler warnings which were given for the explicit casts before.
2015-07-27 03:28:07 +02:00
Vadim Zeitlin
01af56440a Use wxRound() instead of implicit float-to-int conversion in wxSTC.
At the very least, this avoids tons of gcc warnings about implicit conversions
from float to int and it could also be more correct if the coordinates can
really be fractional.
2015-07-27 02:58:07 +02:00
Suzumizaki-Kimitaka
28587c97d8 Add support for Unicode to wxStackWalker.
Use wide-char versions of debug help functions if available, falling back to
the narrow char ones otherwise.

Also improve 64 bit support by using 64 bit versions of the functions if
available as well.

Closes #15138.
2015-07-27 02:44:36 +02:00
Vadim Zeitlin
20ac03bfd8 Test wxDynamicLibrary::ListLoaded() in debugrpt sample.
The list of loaded dynamic libraries gets included in the debug report, so it
seems logical to test this function independently in this sample to allow
checking whether it works correctly without having to generate a debug report
first.
2015-07-27 02:30:41 +02:00
Vadim Zeitlin
2720a03cb7 Test crashing in wxEVT_TIMER handler too in debugrpt sample.
This test was useful to verify that we don't need a __try/__catch block around
the code processing WM_TIMER as it's not called from the kernel and so doesn't
suffer from the same problem as WM_PAINT, i.e. exceptions happening inside
wxEVT_TIMER handlers are caught without problems.

See #16656.
2015-07-27 02:30:40 +02:00
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00
Vadim Zeitlin
6ae8145e9d Fix incorrect flags in a sizer in wxDebugReportDialog.
Don't use wxEXPAND (implicitly added by SizerFlags()) and wxCENTRE together.
2015-07-27 02:29:49 +02:00
Vadim Zeitlin
03915200af Use the hosts file in debugrpt sample under all systems.
Attach the hosts file under all platforms to the debug report: this makes more
sense the hosts file could be potentially useful, unlike autoexec.bat and
/etc/motd that were used before, is also consistent between the platforms and,
finally, avoids the error due to autoexec.bat not existing any more in the
modern Windows versions.

Closes #16655.
2015-07-27 02:29:49 +02:00
Vadim Zeitlin
28ba8ed84e Fix arithmetic overflow in the bundled Expat library.
This is a modified version of the patch from Mozilla (see
https://hg.mozilla.org/releases/mozilla-esr31/rev/2f3e78643f5c) which was also
applied to Chromium. This version prefers to use the buffer of the correct
size instead of just returning an out-of-memory error if the size needed is
relatively (but not extraordinarily so, e.g. just slightly more than 64KB in
32 bit builds) big.
2015-07-27 00:42:28 +02:00
Paul Cornett
ab1bf213cf indentation fixes 2015-07-24 21:06:43 -07:00
Paul Cornett
36e31e515e avoid shadowed variable warnings with VS2015 2015-07-24 20:56:11 -07:00
Tobias Taschner
64308117e8 Implemented wxPOWER_RESOURCE_SCREEN for OS X versions < 10.9 2015-07-22 14:36:26 +02:00
Peter Tissen
328743bf2d Add Microsoft Visual Studio 2015 solution file for building wxMSW.
Allow building with VC14 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/48
2015-07-21 23:07:06 +02:00
Vadim Zeitlin
cb81c2e914 Danish translations update from Bue Vester-Andersen. 2015-07-21 02:40:14 +02:00
Artur Wieczorek
e0f5b49a07 Fixed searching the elements in wxArrayPGProperty.
Use dedicated Index() function to search elements in wxArray instead of calling custom function.
2015-07-20 21:50:30 +02:00