Commit Graph

60317 Commits

Author SHA1 Message Date
Paul Cornett
9cfda3ca4d IsShown() now returns false for non-selected wxNotebook pages, see #4343 2015-08-15 11:04:20 -07:00
Paul Cornett
34b53e13f9 fix build with wxUSE_UNICODE_UTF8 == 1 2015-08-15 11:03:14 -07:00
Václav Slavík
db9baf9aa5 Only set native label if nonempty in wxWindowMac::SetPeer()
Some native controls don't take kindly to being set setStringValue: with
a value invalid for the control (such as empty string for
NSPathControl). Don't do this if the label is empty anyway to avoid
problems with wxNativeWindow when the underlying native control is like
that.
2015-08-15 18:54:02 +02:00
Vadim Zeitlin
e691cfe83d Fix ZIP64 code compilation under 64 bit Unix platforms.
Calling wxDataOutputStream::Write64() with a wxFileOffset argument is
ambiguous as wxFileOffset is neither wxInt64 nor wxUint64, so cast it to one
of them (it doesn't matter which) explicitly.
2015-08-14 17:15:40 +02:00
Tobias Taschner
b9d46f0719 Add ZIP64 support to wxZipInputStream and wxZipOutputStream.
Zip archives with sizes larger 4GB or containing files larger than 4GB or more
than 65k files are saved in ZIP64 format which adds a few additional footers
and extra fields to allow to exceed these limits.

This implements the PKWARE specification available at:
https://www.pkware.com/support/zip-app-note

It has been tested for compatibility with Windows internal ZIP folders, OSX
Archive Utility and 7-zip.

Closes https://github.com/wxWidgets/wxWidgets/pull/72
2015-08-14 15:39:45 +02:00
Tobias Taschner
0f39ea0963 Add support for UTF8 filenames in wxZipInputstream.
Zip files may mark filenames and comments via bit 11 in the general purpose
flags. If this flag is set use wxConvUTF8 instead of the default wxConv.
2015-08-14 15:38:50 +02:00
Artur Wieczorek
79aea3a9a2 Fix inserting items into unsorted wxBitmapComboBox.
When wxBitmapComboBox::DoInsertItems() is called from
wxBitmapComboBox::RecreateControl() then the existing bitmap array should be
reused and new bitmaps shouldn't be allocated.

Closes https://github.com/wxWidgets/wxWidgets/pull/71
2015-08-14 13:59:08 +02:00
Artur Wieczorek
8a2239e409 Allow initializing sorted wxBitmapComboBox from an array.
When wxBitmapComboBox::DoInsertItems() is called and wxCB_SORT flag is set then
due to the sorting the position of the every element in the final item list
can be different than in the input table. To ensure consistency between item
list and bitmap array all new items should be added one by one. Based on the
actual index of every added item the bitmap array should be arranged
accordingly.

Closes #16627.
See https://github.com/wxWidgets/wxWidgets/pull/71
2015-08-14 13:57:56 +02:00
Vadim Zeitlin
c5d29608b1 Build src/html/chm.cpp as part of wxMSW.
In native MSW builds this file is not needed as wxUSE_LIBMSPACK is always 0
anyhow, but it is required when cross-compiling or using Cygwin and libmspack
was detected by configure.

Closes #16923.
2015-08-14 13:55:07 +02:00
Vadim Zeitlin
5420f96a9c Fix compilation of wxNativeWindow sample for old compilers.
Define BS_SPLITBUTTON ourselves if it's not defined in the headers to at
least create the control even then. Skip the code handling BCN_DROPDOWN as
it's too much trouble to make it compile with the old headers however.

This should fix the build with VC8 currently failing on buildbot.
2015-08-11 20:31:16 +02:00
Vadim Zeitlin
d9e2761ed4 Merge branch 'osx_version_stuff' of https://github.com/TcT2k/wxWidgets
Minor fixes for version-related stuff.
2015-08-10 18:44:20 +02:00
Artur Wieczorek
c746fee94a Compilation fixes for wxUSE_INTL==0 build.
Closes https://github.com/wxWidgets/wxWidgets/pull/70
2015-08-10 18:42:46 +02:00
Paul Cornett
941834fd0e enable wxGraphicsContext offset for wxMemoryDC, see #17091 2015-08-10 09:08:41 -07:00
TcT2k
30e2236646 Add missing word in wxCheckOsVersion() documentation. 2015-08-10 16:33:27 +02:00
Tobias Taschner
5b42e35f81 Suppress deprecation warning in wxGetOsVersion(). 2015-08-10 09:43:56 +02:00
Tobias Taschner
48f32f479a Make Mac OS X string translatable in wxGetOsDescription(). 2015-08-10 09:43:22 +02:00
Paul Cornett
4623c5ad9c Make rectangle size the same as is drawn by raster-based wxDCs
Outlined rectangles are one pixel larger with vector-based drawing,
adjust them to get consistent behavior.
Ellipses do not appear to need adjustment.
See #17091
2015-08-09 22:06:59 -07:00
Paul Cornett
bf6f3e35e8 Fix wxListBox mouse wheel scrolling with GTK3
Allow default handling for GDK_SCROLL_SMOOTH when we don't handle it. Closes #17097
2015-08-09 21:01:48 -07:00
Artur Wieczorek
02784ee671 Show wxART_EDIT icon in artprov sample.
Add this new icon to the resource browser.
2015-08-09 17:18:04 +02:00
Vadim Zeitlin
59beb5a40d Merge wxEditableListBox_button_icons branch of https://github.com/a-wi/wxWidgets.git
This improves wxEditableListBox appearance, especially under GTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/66
2015-08-09 01:39:41 +02:00
Artur Wieczorek
c774494009 Use standard wxArtProvider icons for wxEditableListBox buttons.
This make wxEditableListBox appearance more native under the platforms where
the stock icons are used, e.g. GTK.

Closes #16885.
2015-08-09 01:39:41 +02:00
Artur Wieczorek
75467841ee Moved "edit" icon from wxEditableListBox to wxArtProvider.
"Edit" icon definition used internally in wxEditableListBox is moved to
wxDefaultArtProvider and exposed as wxART_EDIT.

While there is no native version of this icon yet, it could be added in the
future and in the meanwhile this commit will be useful to use only standard
bitmaps in wxEditableListBox.
2015-08-09 01:39:41 +02:00
Catalin
8e9c327221 Always strip trailing separators from wxFileName::GetTempDir() under MSW.
In the unlikely but still possible case when neither TMP nor TEMP environment
variables are defined under Windows, we use the standard ::GetTempPath()
function which can return a path with trailing backslashes, e.g. if it takes
it from USERPROFILE environment variable. Ensure that these backslashes are
stripped in this case as well.

Closes https://github.com/wxWidgets/wxWidgets/pull/67
2015-08-09 01:39:40 +02:00
Artur Wieczorek
c5d6f9d103 Improved retrieving bitmaps from wxArtProvider in propgrid sample.
Retrieve from wxArtProvider bitmaps of required size instead of rescaling them in the application.
2015-08-08 22:27:23 +02:00
Catalin
2a882b2bb3 Mention that temp dir is for current user. 2015-08-08 17:57:21 +03:00
Vadim Zeitlin
1255322426 Provide wxCheckOsVersion() implementation for iOS.
Duplicate the definition from the common code used for all non-OS X ports to
fix wxiOS linking errors.

See https://github.com/wxWidgets/wxWidgets/pull/62
2015-08-08 04:19:48 +02:00
Vadim Zeitlin
f7b38667ea No changes, just remove stray CRs from wxMSW wxGetOsVersion().
Commit 2b3633b3c0 somehow used incorrect EOLs
for this file, see https://github.com/wxWidgets/wxWidgets/pull/62
2015-08-08 04:14:11 +02:00
Vadim Zeitlin
271e8ab62e Don't compile Carbon wxGetOsVersion() as part of wxOSX/Cocoa.
It was already excluded for wxiOS, and this function has also a Cocoa-specific
implementation since 411027d5b4, so don't
compile it twice.

See https://github.com/wxWidgets/wxWidgets/pull/62
2015-08-08 01:29:35 +02:00
Artur Wieczorek
03d9c427e0 Fix size of some bitmaps returned by wxWindowsArtProvider.
Bitmaps obtained using SHGetStockIconInfo can have only some predefined sizes.
If size of the retrieved bitmap doesn't correspond to the needed size or the
size given by wxArtProvider::GetNativeSizeHint() then the bitmap should be
rescaled appropriately.

Closes #17071.

Closes https://github.com/wxWidgets/wxWidgets/pull/64
2015-08-08 01:08:14 +02:00
Artur Wieczorek
244ec264af Factor out duplicated code for bitmap scaling in wxArtProvider.
Move duplicated code responsible for rescaling bitmaps in wxArtProvider to the
shared wxArtPrvider::RescaleBitmap() method.

Additionally, make this new method work even in wxUSE_IMAGE==0 case.

See #17071.

See https://github.com/wxWidgets/wxWidgets/pull/64.
2015-08-08 01:04:46 +02:00
ArnaudD-FR
09e8876c0c Don't use global variables for generic wxDataViewCtrl sorting.
Improve code quality and also fix the following issue: when 2 or more
wxDataViewCtrl were frozen, only the first one was sorted on thaw as g_column
was erased by the first wxDataViewCtrl to be sorted and so preventing the
other one from being sorted.

Closes https://github.com/wxWidgets/wxWidgets/pull/63
2015-08-08 00:53:17 +02:00
VZ
3b573aa4d3 Merge pull request #62 from TcT2k/version_fixes
OS version checks improvements and updates.

Remove code for the no longer supported OS versions (MSW < XP, OS X < 10.7).

Add new `wxCheckOsVersion()` which should be used when testing for the OS version instead of comparing the versions directly which may not work reliably because of compatibility shims.
2015-08-08 00:44:28 +02:00
Tobias Taschner
5d364bf81e Update supported OS versions in Readme files. 2015-08-07 16:55:30 +02:00
Tobias Taschner
8bd14648cd Remove Cocoa code and precompiler defines targeting OS X versions prior to OS X 10.7. 2015-08-07 16:25:28 +02:00
Tobias Taschner
3f63ad5c61 Add constants for OS X 10.10. 2015-08-07 16:02:24 +02:00
Tobias Taschner
3250bae3a2 Implement wxCheckOsVersion() with NSProccessInfo on OS X.
Since OS X 10.10 NSProcessInfo has a method isOperatingSystemAtLeastVersion: which should be used compare the OS version if necessary.
2015-08-07 15:49:52 +02:00
Tobias Taschner
411027d5b4 Implement wxGetOsVersion() and wxGetOsDescription() with NSProcessInfo.
NSProcessInfo is the recommended way to determine OS X OS version, but the operatingSystemVersion property is only available in OS X 10.10+. Because of that a fallback to Gestalt() is implemented.

The NSProcessInfo.operatingSystemVersionString in the form “Version 10.10.4 (Build 14E46)"	now used by wxGetOsDescription() should be more useful to the user than the carbon implementations darwin version.
2015-08-07 15:49:23 +02:00
Tobias Taschner
c581188a73 Remove unused code in cocoa file dialog implementation.
The removed function was used for OS X versions prior to 10.7 and was not used any more.
2015-08-06 11:47:54 +02:00
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