Commit Graph

66061 Commits

Author SHA1 Message Date
New Pagodi
f4e0c1aaee Regenerate wxSTC files after recent changes 2019-03-17 01:49:30 -05:00
New Pagodi
8be4f7dde6 Change wxSTC mapping for SCI_REGISTERIMAGE
Currently the Scintilla message SCI_REGISTERIMAGE is mapped to
wxStyledTextCtrl::RegisterImage(int, const wxBitmap&). This makes
RegisterImage a manually defined method and passes the bitmap directly
to the listbox instead of first converting to an XPM.

To backfill the message map, SCI_REGISTERIMAGE is now mapped to a new
method overload RegisterImage(int, const char* const*). The new method
accepts XPM data instead of a wxBitmap.
2019-03-17 01:48:51 -05:00
New Pagodi
f50b18000a Change wxSTC mapping for SCI_MARKERDEFINEPIXMAP
Currently the Scintilla message SCI_MARKERDEFINEPIXMAP is mapped to the
wxStyledTextCtrl::MarkerDefineBitmap method. This has two
drawbacks. First this requires the XPM image handler be loaded before
this method can be called. Second, any alpha data except for opaque and
transparent is lost in the conversion to XPM format.

Instead have MarkerDefineBitmap be a manually declared method but
reimplemented it in a way similar to how the SCI_MARKERDEFINERGBAIMAGE
message works. The new implementation preserves alpha data if it exists.

To backfill the message map, the SCI_MARKERDEFINEPIXMAP is now mapped to
a new method MarkerDefinePixmap(int, const char* const*). The new method
accepts XPM data instead of a wxBitmap.
2019-03-17 01:48:19 -05:00
New Pagodi
8c180ee7b5 Change the implementation of ListBoxImpl::RegisterImage
The ListBoxImpl::RegisterImage in PlatWX.cpp is supposed to accept an
XPM and convert it into a useable form. For wxWidgets, the useable form
is obviously a wxBitmap. According to the Scintilla specification, the
function should accept both a copy of an XPM file and a set of XPM data.

Currently RegisterImage uses the the wxWidgets XPM image handler. This
has 2 drawbacks. First it requires that the XPM handler is loaded before
the function can be called. Second, the function only accepts a copy of
an XPM file and does not work with XPM data.

Instead use wxXPMDecoder. This class can be decode both types of input
and can be used to build a wxBitmap.
2019-03-17 01:47:36 -05:00
Vadim Zeitlin
cbaab700d0 Merge branch 'milotype-wx-02' of https://github.com/milotype/wxWidgets
German and Croatian translations updates.

See https://github.com/wxWidgets/wxWidgets/pull/1260
2019-03-16 22:14:48 +01:00
milotype
433f307a27 Update hr.po
Minor translation corrections, typgraphic corrections
2019-03-16 21:52:55 +01:00
milotype
cbf3a826da Update de.po
File completion (100%), minor translation corrections, typgraphic corrections
2019-03-16 21:52:05 +01:00
Ilya Sinitsyn
d5a6a5a627 Add unit test for wxWrapSizer::CalcMinFromMinor
Add a unit test for a special case of a wrap sizer min size caclulation.
Test wxWrapSizer::CalcMinFromMinor function for this case, when a wrap
sizer used inside a sizer with the same alignment.
2019-03-15 04:16:41 +07:00
Ilya Sinitsyn
e2a9fb1fba Use CATCH in WrapSizer unit tests
Use CATCH instead of CppUnit for unit tests of wxWrapSizer.
2019-03-15 04:14:22 +07:00
Ilya Sinitsyn
6f3ca5805b Fix wrapsizer min size calculation
Fix the `wxWrapSizer::CalcMinFromMinor` function: at the end of the
calculation a `sumMinor` variable contain minor size sum without minor
size of a last line, so add `maxMinor` size to the result min size.
2019-03-15 03:29:54 +07:00
Vadim Zeitlin
fbd645b2dd Use C99 to compile Expat sources under Unix
Expat requires C99 and doesn't compile without the appropriate command
line option at least under Solaris as <stdbool.h> is not available
without it there.

Closes https://github.com/wxWidgets/wxWidgets/pull/1250

Closes #18352.
2019-03-14 12:39:53 +01:00
PB
2dbe91bb00 Fix library link in doxygen docs for image handlers
The command used for linking to the core library was "@library{core}"
instead of correct "@library{wxcore}". This resulted into plain text
"page_libs_core" being displayed instead of expected "wxCore" hyperlink.

Closes https://github.com/wxWidgets/wxWidgets/pull/1259
2019-03-14 02:37:05 +01:00
Cătălin Răceanu
c42bda6bd5 Avoid crashes due to signals/events when destroying wxWindowQT
Don't handle any pending signals or events for the windows about to be
destroyed.

Closes https://github.com/wxWidgets/wxWidgets/pull/1253
2019-03-13 17:42:23 +01:00
Paul Cornett
993334c48a Avoid clipping wxCheckBox focus indicator on GTK3
GtkCheckButton "outline" is drawn outside of widget's allocation with Adwaita theme
See #18353, #18043
2019-03-12 10:11:20 -07:00
Stefan Csomor
f163578c94 macOS expose scroll invertion in event
applied patch from #18358, thanks for the patch Andy
2019-03-12 12:22:41 +01:00
Jouk
593257ea05 Link tiff library as shareable image on OpenVMS 2019-03-12 08:20:16 +01:00
Jouk
bd47bca4f6 Link tiff library as shareable image on OpenVMS 2019-03-11 17:04:11 +01:00
Juha Sointusalo
b5e7b0a621 Allow specifying optional libraries with WX_CONFIG_CHECK
wx-config has --optional-libs command line option for requesting linker
flags for libraries that an application could optionally use but might
not be available in current wxWidgets build.

Make this feature available to Autoconf macro users.

Closes https://github.com/wxWidgets/wxWidgets/pull/1256
2019-03-11 00:44:10 +01:00
milotype
7a5e649b9e Add Croatian translation by Milo Ivir
Closes http://www.wxwidgets.org/about/translations/
2019-03-11 00:42:52 +01:00
Cătălin Răceanu
ca68cd50f2 Do not explicitly set selection to -1 when deleting all pages
Avoid calling wxNotebook::SetSelection(-1) when the notebook is cleared.

Closes https://github.com/wxWidgets/wxWidgets/pull/1254
2019-03-11 00:37:26 +01:00
Stefan Csomor
bb27020ab3 macOS do not show font panel in context menu unless wxTE_RICH|2
fixes #18357
2019-03-10 18:57:57 +01:00
Stefan Csomor
099de4ecab Guarding call to wxOSXDrawNSImage with a valid m_cgContext
Fixes #18356
2019-03-10 09:54:08 +01:00
Artur Wieczorek
e8395fb88c Fix typo in documentation 2019-03-09 18:59:56 +01:00
Artur Wieczorek
86af7d5ee9 Get rid of unnecessary overriding function
OnValidationFailure() in derived class wxEnumProperty has the same implementation (empty body) as the implementation in the base class wxPGProperty so overriding this function in derived class is not necessary.
2019-03-09 18:57:56 +01:00
Artur Wieczorek
47bba8764a Fix drawing invalid wxPGProperty
Invalid wxPGProperty needs to be redrawn after setting wxPG_FL_CELL_OVERRIDES_SEL because this flag
is used to select proper colors to mark property as invalid.
This order of operations is important under e.g. wxMSW when redrawing with DrawItemAndChildren() is done immediately.

Closes #18351.
2019-03-09 18:57:11 +01:00
Vadim Zeitlin
50bbfedb31 Rewrite wxToolBar sizing code to avoid TB_AUTOSIZE
This message just seems too weird and unreliable, so get rid of it and
compute the toolbar size entirely on our own, which at the very least
gives predictable and reproducible results and makes GetSize()
consistent with GetBestSize().

The toolbar height doesn't remain exactly the same as before, with 1px
differences here and there, but now the height is the same initially and
after changing the toolbar styles, while previously the height changed
when doing this.
2019-03-09 16:17:53 +01:00
Vadim Zeitlin
5a78b82673 Add support for passing nullptr to wx pseudo-vararg functions
Allow passing literal nullptr as an argument corresponding to "%p" in
the format string.

See https://github.com/wxWidgets/wxWidgets/pull/1251

Closes #18355.
2019-03-09 01:14:31 +01:00
iwbnwif
f33ee85566 Fix printing 64 bit pointers in wxMemStruct code
Don't truncate addresses under Win64 when printing debug messages using
wxMemStruct.

This avoids build errors if wxUSE_DEBUG_CONTEXT = 1 when building on
Win64.

Closes https://github.com/wxWidgets/wxWidgets/pull/1249
2019-03-07 14:39:37 +01:00
Vadim Zeitlin
63c08fada5 Merge branch 'uri-path-fixes'
Minor fixes for parsing URLs in wxURI.

See https://github.com/wxWidgets/wxWidgets/pull/1239
2019-03-07 14:35:44 +01:00
Paul Cornett
d4b4b3c48c Fix non-Unicode build 2019-03-06 09:49:04 -08:00
Paul Cornett
61d59dfc85 non-pch build fix 2019-03-06 08:49:05 -08:00
Vadim Zeitlin
d841f7b34e Merge branch 'wxQt-memory-leaks' of https://github.com/catalinr/wxWidgets
Fix many memory leaks in wxQt port.

See https://github.com/wxWidgets/wxWidgets/pull/1243
2019-03-05 23:36:41 +01:00
David Connet
c2c3096530 Detect MSVS 2019 in msvc/wx/setup.h correctly
_MSC_VER 1920 should be detected as MSVS 2019, which corresponds to 14.2
toolset value, rather than 14.1.
2019-03-05 23:28:20 +01:00
Vadim Zeitlin
f670cf2d29 Remove stray CR characters from msvc/wx/setup.h
See 46ba9ca2f9 which accidentally added
them.

No real changes.
2019-03-05 23:25:34 +01:00
Vadim Zeitlin
b8a5276bc8 Use a symbolic constant for toolbar height adjustment hack value
No real changes, just avoid hard-coding this 3 as it's going to be used
in another place in the upcoming commit.
2019-02-28 23:50:41 +01:00
Vadim Zeitlin
acfd714743 Make toolbar height compatible with previous wx version
Restore the hack with making the toolbars with wxTB_FLAT style 3px less
tall than the value given to them by TB_AUTOSIZE.

There is no real explanation for doing this, this adjustment was added
by 98b9643647 back in 2002 with the
rationale "make flat toolbars look slightly better", but after doing it
for 17 years during which nobody complained about this, we probably
should keep doing it now.
2019-02-28 23:36:18 +01:00
Vadim Zeitlin
fa16db08c1 Remove the extra height hack from wxToolBar::DoGetBestSize()
There doesn't seem to be any good reason to add 3px to the vertical
component of the toolbar best size and it's not clear how can the
original problem be reproduced.

This basically reverts c118d8b06e.
2019-02-28 23:24:40 +01:00
Vadim Zeitlin
1661f277d5 Only use packing in horizontal direction for toolbar controls
Tool packing seems to be relevant only in the major toolbar direction,
i.e. horizontally when the controls are shown, and adding it in vertical
direction too made the toolbar too tall.
2019-02-28 23:23:15 +01:00
VZ
6374aef924 Use explicit constructor for better type restriction
Co-Authored-By: catalinr <catalinr@users.noreply.github.com>
2019-02-27 22:11:50 +02:00
Cătălin Răceanu
934698d8ac Change Qt smart pointers with wx ones to fix compilation 2019-02-27 22:06:47 +02:00
Cătălin Răceanu
088d698c08 Don't give focus to a frame when clicking outside a focused child
Closes https://github.com/wxWidgets/wxWidgets/pull/1238
2019-02-27 17:17:06 +01:00
Cătălin Răceanu
66f6559a58 Replace accessor with an older version 2019-02-27 17:46:02 +02:00
Cătălin Răceanu
1578240b6e Change a couple of data types and simplify code a bit 2019-02-27 17:42:01 +02:00
Cătălin Răceanu
113822d024 Change member variable type 2019-02-27 16:58:35 +02:00
Vadim Zeitlin
0b973fb357 Use critical alert style for wxICON_ERROR too in wxOSX
After the changes of 6b8b3ee379 we could
use NSCriticalAlertStyle for message boxes with wxICON_WARNING, if they
also has Yes/No or Cancel button, but never for wxICON_ERROR, for which
just NSWarningAlertStyle was used, which seems counterintuitive, so
change the code to use NSCriticalAlertStyle for either wxICON_WARNING or
wxICON_ERROR message boxes asking the user about something.

Closes https://github.com/wxWidgets/wxWidgets/pull/1242
2019-02-27 01:42:53 +01:00
Cătălin Răceanu
c00187eaeb Do not leak menus and menu items 2019-02-27 02:07:06 +02:00
Cătălin Răceanu
82523b3d3b Do not initialize base class variable and do not leak old allocation 2019-02-27 01:39:14 +02:00
Cătălin Răceanu
315a9460c0 Remove memory leaks by using smart pointers or explicit delete 2019-02-27 01:12:03 +02:00
Cătălin Răceanu
dc4854f916 Do not reallocate base class member, which also led to a leak 2019-02-26 23:36:14 +02:00
Cătălin Răceanu
e6e6b1ea38 Do not initialize member variables of base classes 2019-02-26 23:32:38 +02:00