Commit Graph

61083 Commits

Author SHA1 Message Date
Kinaou Herve
38cd4b4769 Don't make wxAuiFloatingFrame root of a top navigation domain
This allows the accelerators associated with it to propagate to the parent
frame, which is what we want to happen in practice.

Closes #16870.
2016-01-30 18:41:18 +01:00
Kinaou Herve
8034e35391 Use IsTopNavigationDomain() in accelerator handling code in all ports
This is more correct than IsTopLevel() as accelerators shouldn't traverse the
"navigation domain" boundaries, by definition, and, even more importantly in
practice, some TLWs shouldn't stop the accelerators propagation, see the next
commit.

See #16870.
2016-01-30 18:40:07 +01:00
Vadim Zeitlin
11f6ecce6b Fix crash when right clicking AUI toolbar while left button is pressed.
Ignore the unrelated mouse events during the item dragging.

This avoids a crash due to m_actionItem being NULL when right clicking an item
while the left mouse button is kept pressed.

Closes #16327.

(this is a forward port of 648d9ce1fbd6d4f2241eda764f2a9679aed6b2c4 from 3.0)
2016-01-30 18:30:13 +01:00
Zane U. Ji
71dfb3b414 Fix invisible captions in high contrast mode
Don't use black text on dark background.

Closes #16186.
2016-01-30 18:27:10 +01:00
Vadim Zeitlin
f74379c751 Avoid duplicate wxEVT_UPDATE_UI for popup menus
Don't call wxMenu::UpdateUI() explicitly in wxMSW, wxGTK and wxOSX code before
showing the popup menu as it is also called when any menu is opened from
port-independent wxFrameBase wxEVT_MENU_OPEN handler, resulting in two events
being generated.

But also don't send the events from wxFrameBase handler only to the frame
itself, by explicitly passing "source" argument to wxMenu::UpdateUI(), as this
prevented the event from being sent to the window popping up the menu. By just
omitting this parameter we ensure that this event is sent to the right window.

Closes #17352 (but notice that there are still duplicate events under OS X,
see #17354).
2016-01-30 17:35:42 +01:00
Priit Laes
4f5dfd96d9 Regenerate autogenerated stuff
This stuff doesn't belong in the git repo though...
2016-01-30 10:00:10 +02:00
Priit Laes
a797d19bb3 Get rid of wxGst_element_query_position 2016-01-30 10:00:10 +02:00
Priit Laes
57049329f3 Replace obsolete wxGst_element_query_duration 2016-01-30 10:00:10 +02:00
Priit Laes
30c443970a Use gconf{audio,video}sink properly 2016-01-30 10:00:10 +02:00
Priit Laes
e733fdb14f Replace deprecated GST_STATE_* defines
Use proper gstreamer-0.10 names instead of mapping 0.8 defines to 0.10
ones:

 * GST_STATE_FAILURE -> GST_STATE_CHANGE_FAILURE
 * GST_STATE_SUCCESS -> GST_STATE_CHANGE_SUCCESS
 * GstElementState -> GstState
2016-01-30 10:00:10 +02:00
Priit Laes
4b70102503 Drop gstreamer-0.8 and gstreamer-0.9 ifdef branches in code 2016-01-30 10:00:10 +02:00
Priit Laes
313f8a3eb7 Drop gstreamer-0.8 from configure.in 2016-01-30 10:00:10 +02:00
Vadim Zeitlin
0ddf12104a Remove the ancient controls sample
It's time to embrace the 21st century.

Closes #15895.
2016-01-30 05:09:32 +01:00
Vadim Zeitlin
5dd5d68e67 Revert "Fix fields initialization in wxCommandEvent copy ctor."
This reverts commit 62763ad541 which seems to
have been completely unnecessary as the fields had been already initialized
and this commit actually broke initialization of the propagation level of the
copied wxCommandEvent objects.

Add a unit test proving that things do work.

Closes #16739.
2016-01-30 05:02:54 +01:00
Vadim Zeitlin
a7d31701ab Work around a crash in wxD2DContext when using gcc
Don't call GetSize() method as gcc can't handle aggregates returned by value
from D2D libraries currently and the code just crashes if this method is
called.

See #17171.
2016-01-30 04:43:46 +01:00
Vadim Zeitlin
0220d86ef4 Fix missing wxContextMenuEvent for wxTreeCtrl in wxMSW
This reverts 54753c3d75 and (partially)
dbd5b2ce42 (leaving the unit test added by it)
and implements yet another fix for the original problem of duplicate
wxContextMenuEvents generated in wxMSW which doesn't break the generation of
wxContextMenuEvents entirely in wxTreeCtrl.

wxTreeCtrl is special as its DefWindowProc() sends WM_CONTEXTMENU directly to
its parent, and not to the control itself, when handling WM_RBUTTONUP, so the
code checking that WM_CONTEXTMENU was not coming from one of the window own
children added in dbd5b2 filtered out all messages from it completely. As it's
probably not the only control behaving in this way, abandon the idea of the
message origin check and instead set things up so that we still pass the
message to DefWindowProc() (because not doing it breaks built-in context menus
in wxTextCtrl, for example), but don't do anything when the message is
propagated upwards from it.

This should ensure that we only process the message once in MSWHandleMessage()
of the first window which gets it, whether it's the original window or its
parent, which ensures the event propagation on wxWidgets side of things, but
prevents it being done by Windows itself.

See #13683.
2016-01-30 04:43:45 +01:00
Vadim Zeitlin
585b49474d Restore sending wxEVT_CONTEXT_MENU for wxTE_RICH controls in wxMSW
Since the changes to use IRichEditOleCallback in wxMSW wxTextCtrl (i.e.
bd650ec3d9 in master), wxEVT_CONTEXT_MENU was
not sent for it any more as the control consumed it after using the callback.

Send the event manually before the default handling takes place to fix this.
2016-01-30 01:03:32 +01:00
Vadim Zeitlin
56a6bc8006 Use correct version string for wxHTTP User-Agent header by default
Just reuse the existing version string macro instead of duplicating the
version here.

Closes #17199.
2016-01-30 00:55:39 +01:00
Steffen Olszewski
13039d5548 Fix REG_EXPAND_SZ values handling in wxRegKey::{Copy,Format}Value()
Don't expand these string when reading them.

See #16719.
2016-01-30 00:48:52 +01:00
Steffen Olszewski
d00fef689f Guard against invalid string values of length 1 in wxRegKey
It is not really clear if it can happen, but avoid integer underflow in case
it somehow does and just discard the single byte which can't represent a valid
UTF-16 character anyhow.

See #16719.
2016-01-30 00:45:40 +01:00
Vadim Zeitlin
142edf8b78 Report type mismatch when reading registry values
Instead of asserting, report a user-visible error when trying to use a wrong
key, this should give more information to the developers and users if (when)
things go wrong.

See #16719.
2016-01-30 00:44:35 +01:00
Artur Wieczorek
3d476369ec Fix inserting owner drawn menu items in wxMSW after menu creation
When menu item is inserted to the menu using wxMenu::DoInsert(), it is first
added to the list of all menu items in wxMenuBase::DoAppend() and then it is
added to the physical menu in wxMenu::DoInsertOrAppend(). Prior to adding the
menu item to the menu all already existing menu items are set as owner drawn,
so the list of items is iterated and SetOwnerDrawnMenuItem() is called for
each item. Because the new item is on the list but doesn't yet physically
exist, it has to be skipped in the iterations to avoid assigning wrong data
(like address of handler) to the wrong item.

Closes #17350.
2016-01-30 00:09:00 +01:00
Vadim Zeitlin
b4d835090f Merge branch 'bitmap_image_conversion' of https://github.com/a-wi/wxWidgets
Closes #14582.
2016-01-30 00:05:19 +01:00
Vadim Zeitlin
fbe7fc85b2 Suppress harmless warning in a standard header with VC14
imagehlp.h from 8.1 SDK contains an extraneous "typedef" in an enum
declaration which results in several warnings when building, avoid them.
2016-01-29 22:35:17 +01:00
Vadim Zeitlin
0dc57e9e23 Avoid 1px gaps between consecutive underlined words in wxHTML
At least when using standard fonts under MSW, the underlines under the
consecutive words didn't overlap, resulting in ugly gaps between them when
using more than one word as the link text, for example.

Work around this by drawing an extra, slightly offset, underlined space when
the previous cell was drawn underlined.
2016-01-29 17:19:29 +01:00
Vadim Zeitlin
9f15ca5f53 Don't use "-B" make option in Travis CI builds
This just seems unnecessary.
2016-01-29 15:16:15 +01:00
Vadim Zeitlin
7aedb3f064 Revert to using -stdlib=libc++ as part of CXX under OS X
Putting it in LDFLAGS breaks compilation of plugins using shared-ld-sh script
for linking as it doesn't support this option.
2016-01-29 15:15:14 +01:00
Vadim Zeitlin
9e6af23062 Use -stdlib=libc++ explicitly with clang under OS X in Travis CI
Fix the compilation of the sample using non configure-generated makefile in OS
X Travis CI build.
2016-01-28 15:15:59 +01:00
Vadim Zeitlin
e1c7b0fc6a Also add C++11 options to OBJCXXFLAGS in configure
We need these options in both CXXFLAGS and OBJCXXFLAGS, otherwise
Objective-C++ code would fail to compile when including C++11 headers such as
<type_traits>.
2016-01-27 04:22:41 +01:00
Vadim Zeitlin
96522491ad Add -stdlib=libc++ to {CXX,LD}FLAGS and not CXX
This allows things work even if a non-default of CXX is specified on the
command line.
2016-01-27 03:41:16 +01:00
Vadim Zeitlin
bef874a674 Skip network tests when running under Travis CI
These tests fail sporadically for some reason outside of our control, just
skip them rather than have frequent false positives.
2016-01-26 23:19:51 +01:00
Artur Wieczorek
68eae6ba5b Fix disabling control tools in wxMSW wxToolBar
Tools containing controls should be enabled/disabled in a different way from
the button tools in wxToolBar::DoEnableTool(). The control and its label (if
any) need to be explicitly enabled/disabled for wxToolBarBase::EnableTool() to
work properly.

Closes #17346.
2016-01-26 21:49:38 +01:00
Artur Wieczorek
fadda15db1 Add Visual Studio 2015 specific folder to the list of ignored files/folders.
VS 2015 specific folder .vs (with solution user options and cache) should be ignored in commits by default.
2016-01-25 23:37:33 +01:00
Vadim Zeitlin
12ee10040a Merge branch 'travis'
Set up Travis CI builds using clang, C++11 and OS X.
2016-01-25 02:57:54 +01:00
Vadim Zeitlin
a358c898c5 Don't account for the border size twice in wxMSW wxListCtrl
When computing the best control width from height, or vice versa, don't
account for the border size twice, once inside ListView_ApproximateViewRect()
and another time in our own code in the base class.

As we can't change the former, just compensate what the latter does by
returning the best width or height of the client part of the control, as
indicated by the DoGetBestClient{Height,Width}() methods names.
2016-01-25 02:51:06 +01:00
Vadim Zeitlin
e6db20d908 Pass -std=c++11 when using Unix makefile on Travis explicitly
wx-config doesn't include -std=c++11 in its output currently and it's not
clear whether it should (consider c++11 vs gnu++11 or even vs c++14), so add
this compiler option explicitly in C++11 Travis builds.
2016-01-25 01:56:10 +01:00
Vadim Zeitlin
6a3b6600dd Test builds with newer g++, clang and OS X on Travis CI
Configure the build matrix to test building on more platforms and using clang
as well and also test C++11 builds using both g++ and clang.
2016-01-24 21:26:43 +01:00
Vadim Zeitlin
844a7e426a Extract Travis before install script steps into a separate file
This allows to do make these steps more complicated, e.g. avoid using apt-get
under non-Linux (and even non-Debian/Ubuntu) platforms.

Also install GTK+ development package explicitly, while it's already available
on the older Travis Ubuntu 12.04 VMs, this is not the case for the newer 14.04
ones.
2016-01-24 21:25:31 +01:00
Vadim Zeitlin
c86168132d Really check building using the installed version in Travis builds
The command to do this at the end of the script didn't actually do anything
because the minimal sample had been already built in tree before.
2016-01-24 21:25:30 +01:00
Vadim Zeitlin
3ea3be5bcb Make Travis logs more readable by folding the different sections
See https://github.com/travis-ci/travis-ci/issues/2285 for more information
about log folding on Travis.
2016-01-24 21:25:30 +01:00
Vadim Zeitlin
b67ca545cc Add --enable-cxx11 configure option
Make it simpler to enable C++11 support when building wxWidgets, in particular
take care of using the correct standard library under OS X in this case.

Notice that currently we still build the library using C++98 if no C++11
compiler is available, even with this option. We may want to change this to
give an error in such case later instead.

Also skip the check for <type_traits> in configure when C++11 is used, we know
that it's available in this case, so don't waste time checking for it (there
are probably several more checks that could be skipped in C++11 mode too...).
2016-01-24 21:22:15 +01:00
Vadim Zeitlin
c3504663ef Set minimal supported OS X version to 10.7 in configure
We don't support anything earlier any more, so it's completely wrong to use
-mmacosx-version-min=10.5 by default.
2016-01-24 21:21:37 +01:00
Vadim Zeitlin
cdef013a8a Suppress harmless warnings about string literals in test code
We rely on string literals being of non-const char or wchar_t pointer type for
this code to compile, even if this results in warnings, so we're not
interested in these warnings in the test code itself.
2016-01-24 21:21:25 +01:00
Vadim Zeitlin
96f5a24f6d Consider g++ ABI up to 1010 to be compatible with 1002
This is not completely true, but the changes in the versions 9 and 10 of g++
ABI don't (seem to?) affect wxWidgets, so allow using later versions of the
compiler for building the code using the libraries created using earlier ones.
2016-01-24 21:18:54 +01:00
pb101
a03df746f0 Fix harmless parameter shadowing warnings
Rename local variables to avoid clashes with the function parameters.

Closes #17343, #17344.
2016-01-22 14:41:23 +01:00
mgimenez
78b19e6811 Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper().

Closes #17291.
2016-01-22 14:41:06 +01:00
Vadim Zeitlin
0fa1ddb368 Check that the dialog had been created in wxTextEntryDialog
Don't crash if setter functions are called before Create() which could happen
for the default-constructed dialogs.

See #17291.
2016-01-21 22:49:42 +01:00
Artur Wieczorek
f6787b7208 Convert 32bpp wxBitmap with alpha flag set to wxImage with alpha channel values.
Create wxImage with alpha values if bitmap is explicitly marked as an ARGB one. Otherwise it will be checked automatically whether 32bpp bitmap contains real alpha channel values or not and output wxImage will be created with or without alpha channel values.
2016-01-21 17:33:02 +01:00
Artur Wieczorek
a99e58e074 Add method to convert wxDIB to wxImage enforcing alpha channel values (wxMSW).
wxDIB::ConvertToImage called with Convert_AlphaAuto converts wxDIB to wxImage with automatic checking if 32 bpp DIB contains real alpha values (legacy way).
When it is called with Convert_AlphaAlwaysIf32bpp then automatic checking is disabled and 32 bpp DIB is unconditionally converted to ARGB wxImage.
2016-01-21 17:31:48 +01:00
Maarten Bent
3b98570f57 Miscellaneous improvements to the multimedia keys support
Simplified mapping keys on Windows.

Handle multimedia keys in the keyboard, text and treetest samples.

Ignore multimedia keys in wxRichTextCtrl.
2016-01-20 18:56:03 +01:00