Commit Graph

61042 Commits

Author SHA1 Message Date
Artur Wieczorek
53b6806b50 Fixed adding 32-bit icons with transparency to wxImageList.
ComCtl32 prior to 6.0 doesn't support images with alpha channel so if we have 32-bit icon with transparency we need to convert it to a wxBitmap and then add this bitmap to wxImageList. If required, bitmap with alpha channel will be converted to the mask in wxImageList::Add.
2016-02-16 21:39:33 +01:00
Vadim Zeitlin
a8b1894628 Add wx/osx/core/colour.h back to the list of installed headers
This file was accidentally removed by 602ea92143.

Closes #17374.
2016-02-15 01:28:45 +01:00
Vadim Zeitlin
64e14e850d Compilation fix for wxMSW without PCH
Add missing header inclusion to fix compilation after changes of
35f35ea407 (see #17360).
2016-02-15 01:21:39 +01:00
Vadim Zeitlin
8e3a317392 Remove useless #ifdef wxUSE_DEBUG_NEW_ALWAYS check
This symbol is tested using "#if", so it should be always defined and there is
no need for testing whether this is the case.

Moreover, doing this useless check triggers warning C4574 (which is disabled
by default, but it's useful enough to enable it explicitly) with VC14 about
using "#ifdef" with a symbol defined as 0.
2016-02-15 01:20:48 +01:00
Paul Cornett
75de19b21f avoid unused variable warning 2016-02-14 13:41:20 -08:00
Paul Cornett
8585f3215a add missing wxOVERRIDE 2016-02-14 13:40:45 -08:00
Paul Cornett
837c3a0df1 remove unused function 2016-02-14 13:40:07 -08:00
Paul Cornett
0ee7565e19 Fix restoring TLW size with wxPersistenceManager on wxGTK
...when window decoration sizes are not known. See #17228
2016-02-14 13:23:49 -08:00
Paul Cornett
f95fd11e08 Allow drawing HiDPI bitmaps with GTK3
1. Override wxWindow::GetContentScaleFactor() to use gdk_window_get_scale_factor()
   when available, and to use correct scale (1.0) otherwise, as wxDC::GetPPI()
   (used by overridden method) is not properly implemented for wxGTK
2. Record scale in wxBitmap(wxImage&) ctor and wxBitmap::CreateScaled()
3. Adjust cairo scale for drawing bitmap, and (inversely) for drawing on bitmap
2016-02-14 13:12:52 -08:00
Vadim Zeitlin
ed09b7b6c0 Remove symlinks time comparison tests from wxFileName test
These tests don't seem to be sound, it's possible for one second or more to
pass between the two calls to GetTimes() and it's apparently possible for the
access time on the symlink to not change (due to /tmp being mounted with
"noatime" option perhaps?), resulting in Travis CI build failures.
2016-02-13 18:55:53 +01:00
Vadim Zeitlin
54c874d488 Don't duplicate information in detailed test output
No need to output wxGetOsDescription() twice.
2016-02-13 18:34:47 +01:00
Vadim Zeitlin
a44bcb4746 Temporarily ensure that the file functions test uses UTF-8
Work around the bug in the library which prevents Unicode file names from
working under Unix unless we use an UTF-8 locale.

Closes #11404.
2016-02-13 17:21:52 +01:00
Vadim Zeitlin
90eae99cd6 Use strict UTF-8 conversion in wxSafeConvertXXX() functions
It doesn't make sense to use any fallbacks when converting to/from UTF-8 and
this wasn't even done consistently as only wxSafeConvertWX2MB() used
MAP_INVALID_UTF8_TO_OCTAL, but not wxSafeConvertMB2WX().

More importantly, UTF-8 conversion can never fail for a valid Unicode string,
so there is no need for any fall backs.
2016-02-13 17:03:47 +01:00
Vadim Zeitlin
0d7f51098d Rewrite switch on wxTextBufferOpenMode to be exhaustive
Get rid of the default clause to allow the compiler to warn us if ever add new
elements to this enum.

No real changes.
2016-02-13 13:52:13 +01:00
Vadim Zeitlin
fe850fccc5 Fix "open mode" variables naming convention in wxTextFile
Start variable name with lower case letters for consistency.

No real changes.
2016-02-13 13:46:25 +01:00
Vadim Zeitlin
d59c6c5add Remove useless c_str() calls from wxTextFile code
There is no need to call wxString::c_str() just to create another wxString
from it.
2016-02-13 13:44:12 +01:00
Vadim Zeitlin
b08985ac24 Don't use std::auto_ptr<> in the test to avoid warnings
When compiling with g++ or clang in C++11 mode, the use of std::auto_ptr<>
triggers warnings about its deprecation, so replace it with wxScopedPtr<> as
this is simpler than choosing between auto_ptr<> and unique_ptr<>.
2016-02-13 13:36:58 +01:00
Rebel_X
35f35ea407 Clean up wxMSW tooltip window on library shutdown
Not doing this prevented the tooltips from working correctly if the library
was shut down and reinitialized again, so add a module ensuring this is done.

Closes #17360.
2016-02-13 12:55:17 +01:00
David Vanderson
ccd361c98f Fix strike-through support in wxFont with GDI+
Pass down the strike-through flag to GDI+ (see #9907).

Closes #17372.
2016-02-13 12:49:21 +01:00
Vadim Zeitlin
d7d5bcaae6 Merge fixes for Unicode support in wxFileSystem::FindFirst()
Closes #11404.
2016-02-13 12:32:46 +01:00
Vadim Zeitlin
bfbdd37a1a Merge native MSW appearance for AUI toolbars
Closes https://github.com/wxWidgets/wxWidgets/pull/200
2016-02-13 12:31:49 +01:00
Vadim Zeitlin
86b1181233 Fix issue with AUI toolbar overflow button always showing up
When resizing a wxAuiToolbar, the overflow button always showed up, and the
SetOverflowVisible() doesn't work as expected. E.g.

	tb->SetOverflowVisible(!tb->GetToolFitsByIndex(tb->GetToolCount()-1));
	tb->Refresh()

This was caused by the logic in OnPaint() ignoring the m_overflowVisible flag
and always drawing (or not drawing) the overflow button.

Add a check for it to fix this.

Closes https://github.com/wxWidgets/wxWidgets/pull/212
2016-02-13 12:22:04 +01:00
Vadim Zeitlin
f9b35855cf Fix amazingly broken wxURI::CharToHex() to only accept hex digits
The valid range for hex digits is A..F, not A..Z.
2016-02-13 04:01:54 +01:00
Artur Wieczorek
5245afa263 Add test cases to test file operations with Unicode file names
File names containing ASCII or non-ASCII (Unicode) characters are used in the
file function tests.
2016-02-13 04:01:28 +01:00
Vadim Zeitlin
314630945a Fix wxURI::Unescape() to work with Unicode strings
Such strings are not really URIs as they should have been encoded if they were
but we can obtain them from e.g. wxFileSystem::FindFirst(), so handle them
correctly here as it's simpler than checking all the places where Unescape()
is called.

Add a unit test checking that decoding an URI containing both Unicode and
percent-encoded Unicode characters works correctly.
2016-02-13 04:01:27 +01:00
Artur Wieczorek
0a555f3c83 Fix ToolsVersion value in minimal sample project file (VS 2010+).
Since minimal.vcxproj file is shared by VS 2010-15 solution files, ToolsVersion value should be set to the value supported by all VS versions since 2010 to avoid warning messages like "Project file contains ToolsVersion="14.0", which is not supported by this version of MSBuild.".
2016-02-12 20:08:09 +01:00
Vadim Zeitlin
d1085c0182 Update WINVER and _WIN32_WINNT to use Windows 10 SDK values
This allows to see the declarations of the functions new in Windows 8.x and 10
if they're available.
2016-02-12 18:58:42 +01:00
Vadim Zeitlin
4a78ed8bb7 Use fixed width font for the RGB values in the drawing sample
This makes them more readable and aligns all colours vertically.
2016-02-12 03:18:30 +01:00
Vadim Zeitlin
6680dbf906 Fix MSVC14 warning about a shadowed variable in the drawing sample
The warning is harmless but avoid it nevertheless.
2016-02-12 03:18:18 +01:00
Vadim Zeitlin
8c7ada391a Reformat the system colour names in the drawing sample
No real changes, just prettify the code a little.
2016-02-12 03:17:46 +01:00
Vadim Zeitlin
baf67813b0 Fix redefinition errors in wxTaskBarButton code with MSVC
After 4475fe36a5 there were ambiguities between
PROPERTYKEY and PROPVARIANT defined in the anonymous namespace and the global
header for the compilers that did define them, such as MSVC.

Fix this by not (re)defining PROPERTYKEY if it had been already defined and
not defining PROPVARIANT at all as it's used as PropVariantClear() parameter
in the beginning of this file, before it was defined by us, so it must work
for all the compilers already anyhow.
2016-02-12 02:20:44 +01:00
Vadim Zeitlin
4475fe36a5 Don't define interfaces inside anonymous namespace in wxMSW
Some interfaces, notably IAutoCompleteDropDown, but also several other ones in
taskbarbutton.cpp, were defined inside anonymous namespace to avoid clashing
with the interfaces possibly (but not necessarily) declared in the standard
headers.

However gcc 4.9 is smart enough to realize that no classes deriving from a
class in an anonymous namespace can exist and so it devirtualizes the calls to
virtual methods of the objects of this type when compiling with optimizations
enabled. And it does it even if it means replacing the call to a virtual
method with just a call to __cxa_pure_virtual(), i.e. crashing during
run-time.

Prevent it from doing this by moving class declarations outside of the
anonymous namespace and fix the crash when using wxTextEntry::AutoComplete()
in the code compiled with g++ 4.9.
2016-02-11 23:39:44 +01:00
Paul Cornett
1908c41f36 Fix linking with gdk_mir_* functions
gdkmir.h header is missing extern "C" wrapper as of GTK+ 3.18.7
2016-02-10 23:22:58 -08:00
Tobias Taschner
49b82e72f2 Add native wxAuiToolbarArt for MSW.
Using UXTheme or generic fallback for executables without manifest.
2016-02-10 20:40:45 +01:00
Tobias Taschner
c8c9f56e0c Prepare platform dependent wxAuiDefaultToolBarArt. 2016-02-10 20:40:30 +01:00
Paul Cornett
39716462e6 avoid deprecated gtk_widget_size_request() 2016-02-10 09:35:22 -08:00
Paul Cornett
2bb8367cba Suppress deprecation warnings for resize grip
We need the code for older GTK3 versions
2016-02-10 09:35:15 -08:00
Tobias Taschner
08ad90937b Ignore Xcode build intermediate files and user settings.
Ignore files create by opening and building the xcode project files.
2016-02-10 16:58:44 +01:00
Tobias Taschner
d7540a05c1 Fix Cocoa Xcode build.
Changes in abe10b8c00 broke building via the Xcode project file.
2016-02-10 16:57:32 +01:00
Vadim Zeitlin
730c1ee79b Merge https://github.com/wxWidgets/wxWidgets/pull/208
See #17218.
2016-02-10 16:17:23 +01:00
Tobias Taschner
abe10b8c00 Fix wxBase build under OS X
Due to recent changes in utils, stdpath and the removal of carbon, building on
OS X was broken by various compiler errors and linker issues.

Closes https://github.com/wxWidgets/wxWidgets/pull/210
2016-02-10 16:12:20 +01:00
Vadim Zeitlin
06458cb89f Fix handling of strings in wxPrintf() when using recent MinGW
MinGW-w64 (and apparently TDM too) defaults to using ANSI stdio functions
nowadays, which interpret format specifiers such as "%s" and "%c" in wide
string functions in the standard-conforming way, i.e. still expecting the
arguments of "char*" type, and not "wchar_t*" as MSVC and older MinGW did.
2016-02-10 15:22:51 +01:00
Paul Cornett
caf63a14cb avoid deprecated gtk_widget_get_requisition() 2016-02-09 23:48:48 -08:00
Vadim Zeitlin
35a56f5c5f Fix a crash when applying wxTextCtrl style with GTK+3
Add missing NULL terminator to gtk_style_context_get() call (thanks g++ for
the warning).
2016-02-10 00:12:14 +01:00
Vadim Zeitlin
f357fcc679 Remove unnecessary checks in the window ID management code
Remove asserts from the functions which are called only once and for which the
caller already performs exactly the same check before calling them.
2016-02-10 00:10:47 +01:00
Vadim Zeitlin
aece1f81b6 Remove tracing from wxWindowID code
wxWindowID objects can be global and thus be destroyed after the library has
been uninitialized and, worse, when some of the global objects have been
already destroyed.

In particular, using wxLogTrace() in DecIdRefCount() called from the dtor
could result in using the possibly already destroyed wxConvLibc object, so
avoid this by not doing any tracing from there.
2016-02-10 00:06:41 +01:00
Vadim Zeitlin
f8bfab5284 Replace out of date comment before wx/windowid.h inclusion
No real changes, just remove the nonsensical comment from wx/defs.h which
completely lost its meaning since wxWindowID typedef was replaced by a class 8
years ago in cf2810aa39.
2016-02-10 00:06:41 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
Artur Wieczorek
088d8cbed5 Added missing references to some dynamically loaded Cairo API's. 2016-02-09 20:44:41 +01:00
Paul Cornett
08c176650c Silence deprecation warnings about gtk_font_selection_dialog_*
We use GtkFontChooser when available
2016-02-08 10:44:50 -08:00