Commit Graph

61668 Commits

Author SHA1 Message Date
Artur Wieczorek
9d137f494a Updated changelog. 2016-06-11 23:24:13 +02:00
Artur Wieczorek
f06bfe37ae Fixed creating wxGraphicContext from native DC with Cairo renderer (MSW).
When x- or y-coordinate of DC origin > 0 then surface created with cairo_win32_surface_create() is not fully operational (for some Cairo operations memory access violation errors occur - see Cairo bug 96482) so in this case we would need to apply a workaround and pass non-transformed DC to Cairo and next apply original DC transformation to the Cairo context operations on our own.

Closes #17564
2016-06-11 23:20:12 +02:00
Artur Wieczorek
a735371b0e Fixed creating wxGraphicsContext with Direct2D renderer.
When render target to draw to a DC (created with ID2D1Factory::CreateDCRenderTarget method) is bound to the device context with ID2D1DCRenderTarget::BindDC method then not only the logical size of a DC needs to be taken into account but also the origin of this DC.
To get proper drawing output the coordinates of all drawing operations should be internally adjusted by this initial origin.
This corrective translation should be used only internally by wxGraphicsContext object and shouldn't be exposed through e.g. GetTransform() function and therefore it is stored separately (in a dedicated variable) and "subtracted" from actual transformation settings for reporting purposes.

See #17564
2016-06-11 23:18:09 +02:00
Vadim Zeitlin
3eae97d2d7 Improve documentation of pickers MUST_EXIST styles
Mention that it's still possible to enter a non-existent file or directory
into a control with wxFLP_FILE_MUST_EXIST/wxDIRP_DIR_MUST_EXIST style if it
has a text control.

Also update SetPath() documentation to mention that non-existent paths are
allowed when text control is used.
2016-06-09 17:03:51 +02:00
Vadim Zeitlin
023ee99ea7 Don't crash in wxTextFile::GetLastLine() if the file is empty
Just return a reference to an empty wxString, as GetFirstLine() already does
(although this is actually questionable -- what if this string is modified?).

See #17283.
2016-06-09 16:48:01 +02:00
Vadim Zeitlin
dd562649f0 Fix recently broken wxPickerBase::SetPickerCtrlGrowable()
Resetting growable flag didn't work correctly after the changes of
0d86c01b8b, fix this and reuse the same code for
both this function and SetTextCtrlGrowable().

See https://github.com/wxWidgets/wxWidgets/pull/296
2016-06-09 15:24:44 +02:00
Jouk
2e67381548 re-adding files that disappeared 2016-06-09 13:57:41 +02:00
Paul Cornett
acc824adc4 Fix building/running with GTK+ < 2.14
See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 22:14:50 -07:00
Paul Cornett
c3a224690e Also fix crash with GTK+ < 3.8 in wxMimeTypesManager code
GtkIconInfo is not a GObject prior to 3.8, not just in GTK+ 2.
See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 21:15:41 -07:00
Vadim Zeitlin
c4d06e8117 Merge branch 'pickers-appearance'
Miscellaneous picker control related fixes, notably fix background and improve
small button size under MSW.

Also make wxSIZE_FORCE_EVENT really work in wxMSW and remove the now unneeded
src/msw/panel.cpp.

See https://github.com/wxWidgets/wxWidgets/pull/296
2016-06-08 20:29:26 +02:00
Vadim Zeitlin
3c4f51df70 Fix crash with GTK+ 2 in wxMimeTypesManager code
Fix the crash introduced by 4dfde501df: we can't
use g_object_unref() to free GtkIconInfo with GTK+ 2.

See https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-08 15:35:58 +02:00
Vadim Zeitlin
bd388e9827 Make wxBU_EXACTFIT buttons less tall in wxMSW
The ellipsis buttons of wxFilePickerCtrl (and similar controls) with
wxFLP_SMALL style looked too big because their min height was greater than
that of the accompanying text control.

Fix this by making the buttons as tall as text controls and not as tall as
standard buttons, this seems to be more aesthetically pleasing.
2016-06-08 03:41:26 +02:00
Vadim Zeitlin
0d86c01b8b Deprecate wxPickerBase::GetDefaultXXXFlag() methods
They just seem completely useless, not documented and only used by wxPickerBase
itself internally. Replace the code using them with wxSizerFlags which is more
clear and also doesn't hard code the border sizes (especially in the case of
the picker control which doesn't even have borders in the first place) and
prepare for removing them later.
2016-06-08 02:51:53 +02:00
Vadim Zeitlin
c5825827fb Ensure that picker controls are laid out
A picker control could have a completely broken appearance if its size was
never changed from the initial size under MSW. For the picker controls inside
a sizer this was indirectly fixed by the previous commit ("Make
wxSIZE_FORCE_EVENT work if only position changed in wxMSW"), but the controls
not managed by a sizer still didn't come up correctly, so add an explicit
Layout() call to ensure they do.
2016-06-08 02:40:18 +02:00
Vadim Zeitlin
9e27a1ca3a Make wxSIZE_FORCE_EVENT work if only position changed in wxMSW
If the position changed but the size didn't, we just call Win32 API for
updating the window geometry but it didn't generate WM_SIZE in this case, so
even when wxSIZE_FORCE_EVENT was used, no wxSizeEvent was sent.
2016-06-08 02:31:19 +02:00
Dimitri Schoolwerth
54e6f6e7b8 Make a public free function private
In 29cd13cc8f the free function
MSWShouldBeChecked was introduced in toolbar.cpp and mistakenly made
inline. Fix by making it static instead.
2016-06-08 00:59:53 +02:00
Vadim Zeitlin
7f603c959f Move wxPanel::HasTransparentBackground() to wxControlContainer
This MSW-specific hack is actually needed by all windows containing more than
one control, even if they don't derive from wxPanel (which is just the most
commonly used class for such windows), otherwise the parts of the window not
covered by the child controls won't have the correct appearance when the
window itself is inside a wxNotebook.

So do this for all classes inheriting from wxNavigationEnabled<>, notably this
fixes the wrong background for all kinds of picker controls (wxDirPickerCtrl,
wxFilePickerCtrl, ...) when they're used inside a wxNotebook.

After moving this method out of wxPanel, src/msw/panel.cpp became empty, so
also delete it and remove it from {bake,make,project} files.
2016-06-07 22:08:51 +02:00
Vadim Zeitlin
45919829c0 Add gtk/mimetype.* files to bakefiles and rebake
This should have been part of 4dfde501df, see
https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:38:41 +02:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
5f01172165 Compilation fix for wxUSE_STATUSBAR==0 build
This should have been part of 152b9fc0eb.

Closes #17553.
2016-06-07 14:29:52 +02:00
Mike Capone
4a3203bbe5 Use backslashes in MSW installation instructions
Also use %WXWIN% in the paths for clarity.

Closes https://github.com/wxWidgets/wxWidgets/pull/295
2016-06-07 14:29:52 +02:00
Mike Capone
b440b8d519 Simplify and extend .gitignore by using wildcards better
Combine lines with a single character difference using [].

Add ignoring 64bit folders from /build/msw/ section.

Add wildcards to the /lib/vc folders to account for possible COMPILER_PREFIX values.

Closes https://github.com/wxWidgets/wxWidgets/pull/294
2016-06-07 14:29:52 +02:00
Jouk
e7e93c9ec9 Update setup for OpenVMS 2016-06-07 13:45:06 +02:00
Dimitri Schoolwerth
392a2f17a9 Add some notes to how-to-release.md 2016-06-06 03:17:23 +04:00
Dimitri Schoolwerth
89dad67b3c Doc updates for 3.1.1 release
Update old version references, remove 3.1.0 release errata, and reset
sha1sums to zeroes.
2016-06-06 03:17:23 +04:00
Dimitri Schoolwerth
9a9a1199d4 Include all repository files in setup exe
Don't exclude non-MSW specific files any longer from the generated
installer for MSW. The space savings are hardly worth the effort:
originally 46.9 MiB (133 MiB installed) and with all files included 48 MiB
(142 MiB installed).
Also by having all files in the installer more exotic builds such as wxGTK
for MSW are available.
2016-06-06 03:05:05 +04:00
Vadim Zeitlin
a5ecde1314 Roughly show the current selection in the grid sample
Allow to quickly check that cell/block/row/column selection works as expected.

This could be made more detailed, e.g. by dumping all the selected cells/rows/
columns if there are not too many of them, but for now this will do.
2016-06-06 01:06:38 +02:00
Paul Kulchenko
e6a6748eaf Fix wxStyledTextCtrl::GetTextRangeRaw() for invalid positions
Don't return garbage if the input positions are out of range, just return an
empty string in this case.
2016-06-06 00:45:21 +02:00
Vadim Zeitlin
e9a836c9dc Work around gcc -Wmissing-field-initializers warning
Use wxZeroMemory() instead of just initializing CREDENTIAL struct with 0
(which probably more efficient, but almost certainly insignificantly so).
2016-06-06 00:30:42 +02:00
Artur Wieczorek
82a0e285d8 Added drawing rounded rectangles to the graphics benchmark.
This test is executed together with standard rectangles benchmark and both benchmarks are enabled with '--rectangles' option.
2016-06-05 23:14:48 +02:00
Artur Wieczorek
81d9208424 Optimize adding rounded rectangle to wxGraphicsPath
In AddRoundedRectangle() we know in advance (angle = 90 deg) or can easily determine (center point) parameters of all arcs at the vertices of the rectangle so instead of using AddArcToPoint() function which is generic and hence computationally expensive we can use AddArc() function which implementation is simpler and execution should be faster.
2016-06-05 22:07:16 +02:00
Artur Wieczorek
edabb01032 Add initial line segment when adding arc to wxGraphicsPath with GDI+
For the sake of compatibility with Cairo (and Direct2D) an initial line segment should be added to the path from the current point (if set) to the beginning of the arc.

Closes #17557
2016-06-05 19:00:13 +02:00
Vadim Zeitlin
cc37031d46 Minor optimization in wxGTK wxYield()
Don't call gdk_window_get_display() if we don't need it because we don't have
any events to put back into the display queue.
2016-06-05 00:55:20 +02:00
Vadim Zeitlin
1a438e786c Add a trivial "About" dialog to the uiaction sample
This will be used later for testing opening (and closing) this dialog
programmatically.
2016-06-05 00:10:13 +02:00
Vadim Zeitlin
ed73e4f624 Merge branch 'uisim-xtest'
Make wxUIActionSimulator work with GTK+3, including when using DPI scaling.
2016-06-04 22:44:25 +02:00
Vadim Zeitlin
b5dbc0eb73 Disable wxUIActionSimulator in wxGTK3 if --without-xtest was given
This class can't work without XTest support with GTK+ 3, so just silently
disable it if XTest was explicitly disabled by user.
2016-06-04 22:43:21 +02:00
yenwu
beaca78962 Fix vertical scrollbar visibility in wxStyledTextCtrl
Vertical scrollbar didn't appear even when the number of lines in the control
became one greater than the maximal fitting number of lines, but only when one
more line was added.

This seems to have been a simple off-by-one error in SetScrollbar() calls, so
fix this by adding 1 to the upper end of the range.

Closes #17548.
2016-06-04 22:27:00 +02:00
Vadim Zeitlin
152b9fc0eb Fix sending of wxEVT_UPDATE_UI events when wxUSE_STATUSBAR==0
wxFrameBase code unintentionally excluded the function generating
wxUpdateUIEvents for the menus from compilation when wxUSE_STATUSBAR was
turned off.

Move OnMenuOpen() out of #if wxUSE_STATUSBAR section to ensure that it's
compiled whenever wxUSE_MENUS==1.

Closes #17553.
2016-06-04 21:59:36 +02:00
Vadim Zeitlin
d68eb10e3d Handle strings with embedded NULs in wxDataStream
Read/write the entire string and not just the part until the first NUL in it.

Closes #17556.
2016-06-04 21:47:12 +02:00
richard67
889cbd8e04 Fix wxTranslations::GetHeaderValue() to look for correct header
Correct the search to completely match the full header name and not only
its beginning by appending ": " to the specified search string.

This prevents GetHeaderValue("Language") from returning "eam: wxWidgets team"
if there is a "Language-Team" header in the catalog, for example.

Closes #17555.
2016-06-04 19:55:19 +02:00
Vadim Zeitlin
690ca5a1b4 Merge branch 'scintilla366' of https://github.com/pkulchenko/wxWidgets
Update bundled Scintilla version to 3.6.6.
2016-06-04 19:47:49 +02:00
Vadim Zeitlin
3536e37092 Merge branch 'secret-store'
Add support for storing passwords using the OS-provided facilities.

Closes https://github.com/wxWidgets/wxWidgets/pull/290
2016-06-04 19:33:59 +02:00
Vadim Zeitlin
b8a7a9809b Add a note about wxSecretValue size limit under MSW
Mention that passwords are limited to 2560 bytes under Windows 7.
2016-06-04 19:21:16 +02:00
Vadim Zeitlin
4154fbb8a3 Add conversions between wxSecretValue and wxString
This is less secure, but more convenient, than using raw pointers and in most
cases the password will already be stored in a wxString anyhow.
2016-06-04 19:19:15 +02:00
Vadim Zeitlin
1de80a72d9 Refactor wxSecretValue creation
No real changes, just add a new platform-specific NewImpl() method instead of
making wxSecretValue ctor itself platform-specific.

This makes adding other ctors for this class simpler.
2016-06-04 18:46:23 +02:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Artur Wieczorek
1f49c4bf40 Fixed adding arc to wxGraphicsPath with GDI+ renderer.
To handle properly all combinations of the start and end angles and to ensure consistency with Cairo renderer behaviour there is necessary:
1. To normalize angle values the same way as it is done in Cairo.
and
2. When end angle equals start angle then actually no arc should be added but current point of the path has to be updated.
3. When difference between end angle and start angle >= 2*pi then in addition to the arc itself also one or more full circles have to be added to the path.

Closes #17558
2016-06-04 11:13:13 +02:00
Artur Wieczorek
9f9d593019 Fixed adding arc to wxGraphicsPath with Direct2D renderer.
To handle properly all combinations of the start and end angles and to ensure consistency with Cairo renderer behaviour there is necessary
1. To normalize angle values the same way as it is done in Cairo.
and
2. When difference between end angle and start angle >= 2*pi then in addition to the arc itself also one or more full circles have to be added to the path.

See #17558
See #17557
2016-06-04 11:12:55 +02:00
Paul Kulchenko
4ad886ca86 Update build files to add new lexer in Scintilla 3.6.6 (LexJSON). 2016-06-02 21:45:09 -07:00
Dimitri Schoolwerth
90b9bcbcf3 Remove docs mentioning which MSVC projects include x64 configurations
Since 202f62b4c4 x64 configurations exist
for MSVC 8 and 9 projects. Because MSVC 7 is the minimal supported
version, and doesn't support 64-bit builds, remove the section in
install.txt about x64 configurations being available only in MSVC 10
project files and later.
2016-06-03 03:10:28 +02:00