Commit Graph

63499 Commits

Author SHA1 Message Date
Vadim Zeitlin
ef0309c141 Fix wxTypeIdentifier::operator==() to be const
Comparing things doesn't change them.

Also rewrite operator!=() in terms of operator==() to ensure
consistency.
2017-11-14 15:58:17 +01:00
Vadim Zeitlin
a98c51e6bc Check for pangoft2 >= 1.38 in configure too
We need to use PKG_CHECK_MODULES(pangoft2) anyhow because we need to
link with its libraries, so make the version check there too and
simplify wxFont::AddPrivateFont() implementation in wxGTK.
2017-11-14 15:27:49 +01:00
Scott Talbert
0d62f728ae Avoid crashing when wxTaskBarIcon is used with a non-X11 display
Fixes #17779
2017-11-13 20:30:59 -08:00
Vadim Zeitlin
5463402e39 Try to show when do X errors happen while running tests
Install an X11 error handler to try to gather more information about the
GUI tests failures on buildbot.
2017-11-14 02:57:57 +01:00
Vadim Zeitlin
f5703673ad Skip focus event test when running under buildbot
This test seems to consistently fail, but the failure can't be
reproduced locally nor debugged on buildbot, so, lacking any other
solution, just disable it.
2017-11-14 02:41:58 +01:00
Vadim Zeitlin
f3b5cc32fa Fix recently introduced crash in ClippingBoxTestCase
Commit fc7f20c419 did fix a memory leak in
this test case, but at the price of introducing a crash due to deleting
the same pointer twice.

The real fix would be to change the code here to avoid returning a
pointer which sometimes needs to be deleted and sometimes must not, but
for now just add a crude check to avoid crashing.
2017-11-14 00:41:31 +01:00
Vadim Zeitlin
ad448da284 Suppress deprecation warnings for g_option_group_free()
Closes #17877.
2017-11-14 00:41:31 +01:00
Vadim Zeitlin
99367a1530 Update glib version check in GetStandardCmdLineOptions()
This code still works fine with glib 2.50.
2017-11-14 00:41:31 +01:00
Vadim Zeitlin
d3b033f432 Allow webview sample to build without wxSTC
There doesn't seem to be any special reason to use wxStyledTextControl
in this sample and doing it unconditionally breaks the build with
--disable-stc, so use wxTextCtrl instead in this case.

Closes #17998.
2017-11-14 00:09:08 +01:00
Vadim Zeitlin
f3995658ff Increase timeout for WindowTestCase::FocusEvent()
The default 100ms doesn't seem to be enough when this test runs under
buildbot.
2017-11-14 00:06:21 +01:00
Vadim Zeitlin
11a5728b32 Replace remaining std::auto_ptr<> with wxScopedPtr in the tests
This should have been done in b8c9cd3528
to avoid all warnings about std::auto_ptr<> being deprecated when using
g++ 6 or later which compiles in C++14 mode by default.
2017-11-14 00:06:18 +01:00
Vadim Zeitlin
283f5a4d56 Remove useless wxFont::ActivatePrivateFonts()
Just "activate" the font immediately when adding it using
AddPrivateFont(), nothing seems to be gained from having two functions
and it just makes things more complicated both when implementing and
when using the API.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
c9d1f9a719 Clean up FcConfig object on library shutdown
Don't just leak it as was done before.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
d99a255e98 Fix private fonts support in wxGTK
Use pango_fc_font_map_set_config() to associate the FcConfig containing
the private fonts with the global Pango context to make them available.

Also use FcInitLoadConfigAndFonts() instead of just FcConfigCreate() to
initialize the new config with all the default fonts instead of just
using our private fonts in it.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
3158a46ce7 Require fontconfig >= 2.8 and change its guard macro name
FcConfigAppFontAddFile() that we use is only available since 2.8, so
check for at least this version of the library in configure.

Also change the macro guarding its use to the more semantically
appropriate "wxHAVE" rather than "wxUSE" and make it more precise by
adding "2_8_0" suffix to it.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
ed655bfcde Add wxFontEnumerator::InvalidateCache()
This is necessary to recognize new fonts, for example those added using
AddPrivateFont(), as being valid: otherwise they were not found in the
cache and couldn't be used in wxGTK.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
5a13e4eda2 Clear wxFontEnumerator face names cache on library shutdown
Don't rely on it being done during statics cleanup as this doesn't work
if the library is shutdown and re-initialized.

Use a module to do the cleanup, just as it's already done for a lot of
other global data in wx.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
5c17c4b745 Set ATSApplicationFontsPath in Mac app bundle
This is required to allow loading private fonts from the bundle
Resources/Fonts subdirectory and doesn't seem to have any negative
consequences for the applications which don't need this functionality.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
5d134711a1 Add BUNDLE_FONT_RESOURCES and use it in font sample
Allow copying font files to the Fonts subdirectory of the app bundle,
private fonts can only be loaded from there under macOS currently.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
4f5f4af3b1 Compilation fixes for wxUSE_STL==1 build
Add an explicit call to wc_str() in one place where conversion to
wchar_t* is needed and use wxString::operator==() instead of lstrcmp()
to avoid having to perform this conversion explicitly in another place.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
ac4f99fa0d Test for FontConfig availability in configure when using wxGTK
This library is now needed in order to implement wxFont private font
methods.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
28864d3ef6 Clean up private fonts on library shut down under MSW
Ensure we don't keep the values in the global gs_privateFontFileNames
variable if the library is shutdown and reinitialized later, this would
be unexpected.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
149807db26 Move wxMSW wxFont private font methods to src/msw/font.cpp
This ensures that they will be defined and work even when building with
wxUSE_GRAPHICS_CONTEXT==0 (as can happen even by default with old MinGW
versions).

Private fonts are still made available to wxGraphicsContext as well by
providing access to them from GDI+ code via wxGetPrivateFontFileNames().
2017-11-13 22:29:28 +01:00
Vadim Zeitlin
4145a30e06 Report errors if using private font fails in the font sample
Give more information instead of just silently not showing the
corresponding menu item.
2017-11-13 22:29:28 +01:00
Vadim Zeitlin
a7a59a263d Update the version when private font support was added
It will be 3.1.1 and not 2.9.5 as originally planned.
2017-11-13 22:29:28 +01:00
Arthur Norman
547e40b114 Add support for loading fonts from files.
wxFont::AddPrivateFont() can now be used to load a font from a file for the
applications private use. Update the font sample to show this.

Closes #13568.
2017-11-13 22:29:28 +01:00
Vadim Zeitlin
91697a8724 Use correct commit of src/png submodule
Fixes wrong commit accidentally used in the previous commit.
2017-11-13 22:25:59 +01:00
Vadim Zeitlin
760bd1bf4e Update png submodule to avoid -Wundef warnings 2017-11-13 22:16:10 +01:00
Vadim Zeitlin
f65a608993 Remove declared but not implemented wxFont::Unshare() in wxGTK
No real changes, just remove a method which was never defined nor used.
2017-11-13 22:16:10 +01:00
Václav Slavík
926d486f54 Fix NSFont bridging crash with Asian input methods on 10.11
There's a bug in OS X 10.11 where a toll-free bridged font may have an
attributed of private class __NSCFCharacterSet that unlike
NSCharacterSet doesn't conform to NSSecureCoding. This poses a problem
when such font is used in user-editable content, because some Asian
input methods then crash in 10.11 when editing the string. As a
workaround for this bug, don't use toll-free bridging, but re-create
NSFont from the descriptor instead on buggy OS X versions.

Fixes regression introduced in a77066d530
(#507).
2017-11-13 18:46:37 +02:00
Vadim Zeitlin
af16d8ba5c Explicitly set "update = checkout" option for submodules
It seems that older Git versions don't update submodules when issuing
just "git submodule update" if this option is not set.

We might actually prefer to use "update = rebase" but for now use the
smallest change that will (hopefully) allow people using older Git
versions to get the submodule updates.
2017-11-13 15:24:37 +01:00
Vadim Zeitlin
818a710af6 Update bundled libtiff to not use wxjpeg_boolean any more
This is not needed after e35f01384f.
2017-11-12 23:23:48 +01:00
Artur Wieczorek
4df04a88c5 Set wxPG cell background colour as wxPGComboBox background colour
Default wxGenericComboCtrl background colour is obtained under wxGTK
with wxComboBox::GetClassDefaultAttributes(). For wxGTK 3 returned colour
is fully transparent (00000000) which can cause problems with
proper drawing of controls deriving from wxGenericComboCtrl, like
wxPGComboBox which in turn is used by wxEnumProperty, wxCursorProperty,
etc.
wxPGComboBox should have background with the same colour as the cell
so we can explicitly set background colour to avoid using default one.

Closes #17986.
2017-11-12 22:09:09 +01:00
Paul Cornett
7592595252 fix SetPosition() parameter in documentation 2017-11-12 09:36:33 -08:00
Paul Cornett
142004884f Build fixes for wxUSE_UNICODE==0 2017-11-12 09:35:12 -08:00
Paul Cornett
cdb9436975 Use wxFALLTHROUGH 2017-11-12 09:34:22 -08:00
Paul Cornett
65cc4c1624 Avoid ifdef-ed override specification
Instead, add the base class functions so the derived class always
overrides. If/when wxX11 and wxMotif are removed there won't be an
ifdef that no one ever notices isn't needed anymore.
2017-11-12 09:33:37 -08:00
Vadim Zeitlin
4e226d6784 Merge branch 'extra-warn-fixes'
Fix a few harmless warnings given with -Wextra.
2017-11-12 17:48:16 +01:00
Vadim Zeitlin
4e593b9f06 Document switch to submodules for 3rd party libraries
Update the build instructions and the change log.
2017-11-12 17:47:09 +01:00
Vadim Zeitlin
e35f01384f Merge branch 'jpeg-submodule'
Switch to using submodule and update the library version.
2017-11-12 17:43:22 +01:00
Vadim Zeitlin
fc9d41fad3 Avoid -Wmissing-field-initializers for Dl_info struct
Rely on the default initialization, this is arguably slightly less
clear, but allows to avoid the warning (which is disabled by default,
but still).

Closes #17997.
2017-11-12 17:07:35 +01:00
Scott Furry
b39d29f433 Fix harmless -Wmissing-field-initializers in wxGTK
Closes #17996.
2017-11-12 17:05:55 +01:00
Scott Furry
3653b753d3 Fix clang -Winconsistent-missing-override in wxGLApp
Use "override" for wxGLApp::GetXVisualInfo(), but only for wxGTK2 where
it really overrides it, unlike in wxX11.

Closes #17995.
2017-11-12 17:02:43 +01:00
Vadim Zeitlin
a03441f959 Suppress harmless -Wmissing-fields-initialize in wxSecretStore
This warning is difficult to avoid as we don't want to initialize the
unused/reserved fields of SecretSchema struct, yet the compiler warns
about it (when using -Wextra).
2017-11-12 16:57:40 +01:00
Vadim Zeitlin
cc8657e436 Upgrade libjpeg to the latest version 9b
There don't seem to be any really important changes affecting our use of
the library, but it seems better to use the 2016 version instead of the
1998 one and it also allows to get rid of many hacks that were needed
before as the things they worked around are now taken care of by the
library itself.
2017-11-12 16:32:35 +01:00
Vadim Zeitlin
0fe8d68c11 Replace jpeg subdirectory with a Git submodule
Use libjpeg-turbo repository as upstream, even if we don't use
libjpeg-turno library itself (yet?) because it also has all the historic
libjpeg versions in its repository, including 6b (dating from 1998!)
that our sources were based on.
2017-11-12 00:54:11 +01:00
Vadim Zeitlin
edf0db1eb3 Update libtiff to the latest 4.0.8 version 2017-11-11 23:39:00 +01:00
Vadim Zeitlin
03c81535ab Replace tiff subdirectory with a Git submodule
Try to preserve most of the manual changes done to libtiff sources in
wxWidgets, dropping just some VC6-specific workarounds which are not
needed any more.
2017-11-11 23:39:00 +01:00
Vadim Zeitlin
2cee986e03 Merge branch 'expat-submodule'
Switch to using submodule and update the library version.
2017-11-11 20:51:24 +01:00
Vadim Zeitlin
1a1cfc2d02 Upgrade Expat submodule to the latest 2.2.5 version
No special changes, just propagate submodules changes to the main
repository.
2017-11-11 20:50:51 +01:00