Commit Graph

61057 Commits

Author SHA1 Message Date
Vadim Zeitlin
704c177e74 Fix harmless unused parameter warning in wxTaskBarIcon
See https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:28:16 +01:00
Vadim Zeitlin
51b70c895e Remove hard TABs from the sources
Some of them sneaked through, notably during wxNotificationMessage
refactoring.
2016-02-18 23:18:00 +01:00
Vadim Zeitlin
80d4993119 Merge wxNotificationMessage for OS X and MSW 8+
Closes https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:09:05 +01:00
Vadim Zeitlin
5fdddc0b16 Fix wxMSW build with wxUSE_UXTHEME=0
Include wx/msw/uxtheme.h even when wxUSE_UXTHEME == 0 because
wxUxThemeEngine::GetIfActive() and MARGINS struct are still used even then in
anybutton.cpp and menuitem.cpp respectively.
2016-02-18 22:56:12 +01:00
Vadim Zeitlin
3351404c2c Don't use wxOVERRIDE in wxDECLARE_EVENT_TABLE to avoid clang warnings
If a class not using "override" for its other, not wx-related, virtual methods
included wxDECLARE_EVENT_TABLE() with wxOVERRIDE inside it, it resulted in a
clang -Winconsistent-missing-override warning per each virtual method without
it which was very annoying.

Avoid it by not using wxOVERRIDE in this macro and explicitly disabling the
-Winconsistent-missing-override for the methods inside it in case the rest of
the class does use "override".

Notice that this also required rearranging the order of the declarations in
this macro to ensure that a semicolon is still required after it.

Closes https://github.com/wxWidgets/wxWidgets/pull/217
2016-02-18 22:56:11 +01:00
Vadim Zeitlin
59def94f63 Merge wxListCtrl fixes for classic MSW there
Closes https://github.com/wxWidgets/wxWidgets/pull/216
2016-02-18 22:56:09 +01:00
Vadim Zeitlin
ed406caa71 Remove unused variables from wxAuiMSWToolBarArt code
No real changes, just remove the leftover variables to avoid warnings about
unused variables from gcc.

See https://github.com/wxWidgets/wxWidgets/pull/200
2016-02-18 22:56:07 +01:00
Artur Wieczorek
f6268599f1 Use "MultiProcessorCompilation" parameter instead of explicit /MP in the minimal sample project.
Use the user-visible option instead of the command line option which is hidden in the IDE.
2016-02-18 22:52:17 +01:00
Artur Wieczorek
27ea6aea5c Fix MSVC14 warnings about a shadowed variable in the widgets sample.
Just to suppress some harmless warnings.
2016-02-18 22:43:48 +01:00
Artur Wieczorek
51f7074caf Fix MSVC14 warnings about a shadowed variable in the propgrid sample.
Just to suppress some harmless warnings.
2016-02-18 18:46:45 +01:00
Artur Wieczorek
43fe885eb7 Fixed displaying text labels after assigning wxImageList to wxListCtrl.
For ComCtl32 prior to 6.0 all text labels in wxListCtrl need to be re-assigned when new wxImageList is set in order to position them correctly within the control.
2016-02-16 21:39:33 +01:00
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
Tobias Taschner
9345482fbf Add Win8+ toast notification to wxNotificationMessage.
Since Windows 8 there are native toast notifications available via WinRT defined in windows.ui.notifications.h. This adds support for these notifications via wxNotificationMessage. These notifications have to be explicitly enabled via wxNotificationMessage::MSWEnableToasts() because they require a start menu shortcut to the application.
2016-02-10 20:38:12 +01:00
Tobias Taschner
72db8a6265 Add basic support to use WinRT APIs.
Some Windows8+ APIs are only accessible via WinRT which is based on COM. However there are a few dependencies to get to the interfaces via functions defined in roapi.h. Using RoInitialize, RoUninitialize, etc. directly from it's windows headers adds dependencies to the WinRT dlls leaving the resulting exe unable to launch on earlier Windows versions. The wxWinRT functions wrap this with dynamic loading. Additionally wxWinRT::TempStringRef adds a convenient wrapper to HSTRING which is used extensively in WinRT APIs.
2016-02-10 20:38:11 +01:00
Tobias Taschner
816c58e0af Add documentation for wxNotificationMessage::UseTaskBarIcon (MSW).
The method is not new, but was undocumented previously.
2016-02-10 20:38:11 +01:00
Tobias Taschner
bf5e403a68 Restructure wxNotificationMessage.
wxNotificationMessage has been refactored to always use wxNotificationMessageImpl (this was previously already done in the MSW implementation)

This adds various features and fixes to wxNotificationMessage:
- OS X Notification Center implementation
- Generic "toast" notifications
- SetIcon() to specify a custom icon
- AddAction() to add actions to notifications
- Events to get notify of notification clicks, dismiss or actions
2016-02-10 20:38:10 +01:00