Commit Graph

65326 Commits

Author SHA1 Message Date
JulianSmart
6993b73042 Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions (commit omitted part) 2015-11-14 18:47:33 +00:00
JulianSmart
1675e641e6 Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions 2015-11-14 18:44:45 +00:00
JulianSmart
f2bc1f5e1d Fixes for list style dialog and bullet drawing when no left subindent is specified 2015-11-14 18:37:12 +00:00
JulianSmart
f48374a949 Added line height to wxRTC to allow faster scrolling if needed 2015-11-14 18:31:39 +00:00
ARATA Mizuki
0c02d70fa5 Add a test checking that conversions involving surrogates work
After the fixes in the previous commits conversions between wchar_t containing
surrogates and UTF-{8,16,32} work correctly, so add a test ensuring that this
is the case.

Notice that other conversions are still broken in presence of surrogates.

See #17070.
2015-11-13 20:32:24 +01:00
ARATA Mizuki
e570e8b6ac Fix conversion from wchar_t string with surrogates to UTF-8
Correctly account for the second half of the surrogate in
wxMBConvUTF8::FromWChar() implementation, this makes it actually work for the
strings containing surrogates on the platforms using UTF-16 encoding for
wchar_t (such as MSW).

See #17070.
2015-11-13 19:36:34 +01:00
Vadim Zeitlin
37dd89a0da Don't rely on wxMBConv::cWC2MB(NULL) returning the exact byte count
UTF-32 conversions use a useful optimization by avoiding the extra scan of the
input wchar_t string in their FromWChar() and cWC2MB() implementation when
they are only asked to compute the required buffer size without actually doing
the conversion. However this means that for an input string containing UTF-16
surrogates (which is possible under MSW where wchar_t is 16 bits) the actual
size of the output string can be smaller than that returned by FromWChar(NULL).

Document that this may happen and avoid relying on the exact equality in the
tests.

See #17070.
2015-11-13 19:36:33 +01:00
Vadim Zeitlin
823a2337f6 Make wxTextStream classes work with surrogates under MSW
On the platforms using UTF-16 for wchar_t we can't read nor write Unicode data
one wchar_t at a time as a single half of a surrogate character can't be
converted to or from the encoding of the stream.

To fix this, we may need to store the last wchar_t already read from the
stream but not returned yet in wxTextInputStream::NextChar() and store,
without writing it, the wchar_t passed to wxTextOutputStream::PutChar() until
the second half of the surrogate is written.

See #17070.
2015-11-13 19:36:33 +01:00
Vadim Zeitlin
5cff8c1232 Fix return value of wxMBConvUTF32::cWC2MB() in presence of surrogates
UTF-32 conversions only estimate, from above, the size of the output buffer
needed, so the value returned from the first call to FromWChar(NULL) in
cWC2MB() can be inexact for them and we need to return the value returned by
the second call to FromWChar() doing the real conversion from cWC2MB() itself
to ensure that we return the correct output length.

See #17070.
2015-11-13 19:36:33 +01:00
Vadim Zeitlin
048ba4b509 Fail to convert wide string with incomplete surrogates to UTF-8
Correctly fail if the wide string being converted is UTF-16 encoded (which can
only happen on platforms using 16 bit wchar_t, i.e. MSW) and ends in the
middle of a surrogate pair.

Notice that other conversions still wrongly encode invalid wchar_t sequences
such as 0xd800 not followed by anything, this will need to be fixed in the
future, but for now at least make it work for the most commonly used
conversion.

See #17070.
2015-11-13 19:36:32 +01:00
JulianSmart
308727daed Avoid invisible caret on wxOSX because of hiding the caret multiple times 2015-11-13 15:44:03 +00:00
Vadim Zeitlin
6602eb3384 Fix test for wxOSX in wxSTC code
Use "#ifdef", not "#if", to check for __WXMAC__ to avoid warnings about using #if
without argument under the other platforms.

See #16243.
2015-11-11 15:51:12 +01:00
Bryan Petty
92323b5705 Disable USE_GUI in MinGW AppVeyor build for now. 2015-11-09 18:27:42 -07:00
Dimitri Schoolwerth
522837d0d6 Update OS X and iOS related build files
Some files only appear in Cocoa builds now which iOS is not a part of,
resulting in link errors. Add (Carbon's) settings.cpp and (Cocoa's)
stdpaths.mm to the list of iOS sources to fix this.
The regenerated Xcode projects also include other additions since the
last time they were updated using makeprojects.applescript (and
overwrites project changes that were made manually).
2015-11-09 22:47:56 +04:00
Dimitri Schoolwerth
890d7e2bec Restore missing system metric values in wxOSX/Cocoa
During the transition of wxSystemSettings from a Carbon to Cocoa
implementation some previously available values weren't implemented any
more. Fix by restoring the missing values for GetMetric() :
wxSYS_SCREEN_X, wxSYS_SCREEN_Y, and (stub) wxSYS_DCLICK_MSEC.

Used values for Cocoa's wxSystemSetting::GetColour() and GetFont() have
also been compared to the Carbon implementation and found to be intact.

Regression since 515fcc66e6 .

Closes #17141
2015-11-09 15:50:29 +04:00
Vadim Zeitlin
6cfae2d658 Support wxICON_PRINT and wxICON_HELP_FOLDER in wxOSX art provider
Map them to the corresponding built-in constants.

Closes #8778.
2015-11-09 03:54:03 +01:00
Vadim Zeitlin
fbf59742a4 Don't always turn on wxTE_PROCESS_ENTER in wxOSX
This style was unconditionally used for all multiline controls for some
reason, meaning that wxEVT_TEXT_ENTER could be received even for the controls
not using wxTE_PROCESS_ENTER explicitly, which was unexpected.

Don't do this any more to conform to the expected behaviour.

Also do use wxTE_PROCESS_ENTER for the text control supposed to allow handling
"Enter" in the text sample: surprisingly, it didn't have this style before,
although it was clearly supposed to.

Closes #1913.
2015-11-09 03:51:18 +01:00
Vadim Zeitlin
a1a06bee7e Set up standard key mappings in wxSTC under OS X
Let users use the familiar key combinations which don't work out of the box in
Scintilla for some reason.

Closes #16243.
2015-11-09 03:43:32 +01:00
Vadim Zeitlin
bfdf70d14a Fix handling of keys with Ctrl modifier in wxSTC under OS X
The real Ctrl key is represented by "meta" modifier bit under OS X as the
"ctrl" bit is used for the Cmd key, but the previously used KeyDown() method
didn't support the meta bit at all, so key combinations using Ctrl didn't
work.

Also remove obsolete code which mapped "meta" to "ctrl", probably predating
the mapping of Cmd to "ctrl" at wx API level.

See #16243.
2015-11-09 03:27:03 +01:00
Vadim Zeitlin
aef9eff1be Make the middle control in the text sample bigger under OS X
This might indicate a bug with the default size being too small for wxTextCtrl
in wxOSX, but without this change the control was barely big enough to show
one line of text under OS X 10.8, so make it bigger to have a more reasonable
initial appearance.
2015-11-09 02:56:59 +01:00
Corey Daley
a118c4243a Implement support for wxHSCROLL in wxTextCtrl under OS X
Make the associated NSTextContainer of infinite size and tell it not to track
the NSTextView width if wxHSCROLL is specified.

Closes #4022.

Closes https://github.com/wxWidgets/wxWidgets/pull/124
2015-11-09 02:56:02 +01:00
Vadim Zeitlin
79f62505bb Fix clang warnings about inconsistent missing "override" keyword
Add wxCLANG_WARNING_SUPPRESS() and wxCLANG_WARNING_RESTORE() and use them to
suppress -Winconsistent-missing-override warnings.

Closes https://github.com/wxWidgets/wxWidgets/pull/99
2015-11-08 19:11:53 +01:00
David Connet
591d888fa0 Fix wxMSW compilation with wxUSE_INKEDIT==1
Include wx/dynlib.h as wxDynamicLibrary is used to load the inked.dll.

Closes #17219.
2015-11-08 19:09:27 +01:00
Paul Kulchenko
223c5cda2b Show as many tabs in wxAuiNotebook as possible
Currently, when a tab is closed in wxAuiNotebook, the tabs are not moved right
to use free space (on the right side of he rightmost tab), which requires
clicking "left" button to make tabs visible.

This commit changes the behaviour to keep as many tabs shown as possible.

Closes #17233.
2015-11-08 19:09:27 +01:00
Vadim Zeitlin
a916a0cc48 Correct validator step description in event handling overview
The validator is still used even if the event handler is disabled.

Closes #17231.
2015-11-08 19:09:27 +01:00
Dimitri Schoolwerth
67004ff75f Provide wxCheckOsVersion() implementation for wxOSX/Carbon
Duplicate the definition from the common code used for all non-OS X
ports to fix wxOSX/Carbon linking error.

See https://github.com/wxWidgets/wxWidgets/pull/62 .
2015-11-08 18:42:18 +04:00
Dimitri Schoolwerth
a1863a397c Fix wxOSX/Carbon build after wxDataViewRenderer changes
Since 361c6357b4 wxDataViewRenderer's
SetAttr and SetEnabled became pure virtual class methods which aren't
implemented for wxOSX/Carbon. Fix by defining the same empty stubs for
these methods as were previously present in the base class.
2015-11-08 18:42:14 +04:00
Dimitri Schoolwerth
ef62616b12 Fix wxOSX/Carbon build after Enable{Max,Min}imizeButton() addition
Define stubs for pure virtual base class methods.

See #17133.
2015-11-08 18:42:12 +04:00
Vadim Zeitlin
69584dd3b4 Show make version as well in AppVeyor MinGW builds
Also remove quotes which are not needed in Windows shell and show just the
first line of the versions.
2015-11-07 23:37:42 +01:00
Vadim Zeitlin
1d1c54cc6c Display binutils version in AppVeyor MinGW build
Just to get more information about the mysteriously failing ar command.
2015-11-06 20:31:07 +01:00
Pavel Maryanov
4eef0ac404 Update a few strings in Russian translations 2015-11-06 14:34:12 +01:00
ARATA Mizuki
d399d544f1 Suppress clang warning [-Winconsistent-missing-override] in DECLARE_HELP_PROVISION(). 2015-11-06 16:33:36 +09:00
ARATA Mizuki
450d9ce2b5 Suppress clang warning [-Winconsistent-missing-override] for GetClassInfo() in wxDECLARE_ABSTRACT_CLASS. 2015-11-06 16:33:36 +09:00
ARATA Mizuki
f90205951c Add macros to conditionally suppress clang warnings.
The added macros wxCLANG_WARNING_{SUPPRESS,RESTORE} are similar to
wxGCC_WARNING_{SUPPRESS,RESTORE}, but the `wxCLANG_' version will expand to
compiler pragmas only when the warning name is known to the compiler.

They use clang's __has_warning feature.
2015-11-06 16:33:16 +09:00
Bryan Petty
3de5077c7a Fixed missing wxUSE_STL config for MinGW AppVeyor build. 2015-11-04 19:07:15 -07:00
Bryan Petty
8fc8b6f110 Quick fix to version string in AppVeyor config. 2015-11-04 07:33:43 -07:00
Bryan Petty
2090988484 Added initial AppVeyor config. 2015-11-04 07:31:05 -07:00
Artur Wieczorek
8aad22b3e2 Update documentation regarding alpha support in wxGenericColourDialog. 2015-11-02 23:19:36 +01:00
Artur Wieczorek
9409b7eb80 Don't use directly wxColourData data members in wxGenericColourDialog.
wxColourData data members are public for backwards compatibility only and shouldn't be used directly.
2015-11-02 23:19:33 +01:00
Artur Wieczorek
02c03096b6 Fix initialization of custom colours for generic colour dialogs in dialogs sample.
Use number of custom colours taken from wxColourData instead of using explicit numeric value.
2015-11-02 23:19:30 +01:00
Artur Wieczorek
8fee6a9a2b Modify dialogs sample to present also generic colour dialog with alpha support.
Added separate submenu and menu items to show generic colour dialogs with opacity control enabled/disabled.
2015-11-02 23:19:26 +01:00
Artur Wieczorek
fa7c2de28d Add slider labels in wxGenericColourDialog. 2015-11-02 23:19:23 +01:00
Artur Wieczorek
880ad7f6f8 Add alpha channel support to wxGenericColourDialog.
Added opacity slider and custom colours (with alpha) previews (implemented with wxStaticBitmap controls). This feature is controlled by wxColourData::GetChooseAlpha().
2015-11-02 23:19:19 +01:00
Artur Wieczorek
809a07a65d Add opacity control feature to wxColourData.
Added internal flag (with corresponding accessors) which purpose is to enable/disable modifying the opacity of the colours in colour dialogs.
2015-11-02 23:19:16 +01:00
Artur Wieczorek
3dc013920b Fix type of member variable in wxGenericColourDialog
Variable to hold the size should be of type wxSize, not wxPoint.
2015-11-02 23:19:12 +01:00
Artur Wieczorek
7399fb3428 Optimize wxGenericColourDialog
Variable to hold the size of the custom colour box doesn't need to be a member variable since it's used only locally in wxGenericColourDialog::CalculateMeasurements.
2015-11-02 23:19:09 +01:00
Vadim Zeitlin
6af5329710 Fix waiting for threads in MSW in presence of events
We need to handle WAIT_OBJECT_0+2 value which can be returned by
WaitForThread() since 6c40531fb7 as it now waits
for two objects and not just one, failure to do this resulted in an endless
stream of asserts if any Windows messages were pending when we started waiting
for the thread.
2015-11-02 18:17:03 +01:00
Paul Cornett
3e75b231b0 fix GdkCursor memory leaks 2015-11-02 08:50:39 -08:00
Paul Cornett
9f8deb74a7 avoid gdk_cursor_new(), deprecated in GTK+ 3.16 2015-11-02 08:28:18 -08:00
Paul Cornett
ed817dd366 Fix drawing checkbox and radiobutton in checked state with GTK+ >= 3.14, see #17240 2015-11-01 19:46:01 -08:00