Commit Graph

60241 Commits

Author SHA1 Message Date
Vadim Zeitlin
20ac03bfd8 Test wxDynamicLibrary::ListLoaded() in debugrpt sample.
The list of loaded dynamic libraries gets included in the debug report, so it
seems logical to test this function independently in this sample to allow
checking whether it works correctly without having to generate a debug report
first.
2015-07-27 02:30:41 +02:00
Vadim Zeitlin
2720a03cb7 Test crashing in wxEVT_TIMER handler too in debugrpt sample.
This test was useful to verify that we don't need a __try/__catch block around
the code processing WM_TIMER as it's not called from the kernel and so doesn't
suffer from the same problem as WM_PAINT, i.e. exceptions happening inside
wxEVT_TIMER handlers are caught without problems.

See #16656.
2015-07-27 02:30:40 +02:00
Vadim Zeitlin
39ad820bee Check for Win32 exceptions inside our WindowProc().
Don't let unhandled Win32 (i.e. structured) exceptions escape from wxWndProc()
as they can just disappear into thin air when running under WOW64 as 32 bit
exceptions can't propagate through 64 bit kernel. So catch them immediately
and pass them to the global handler while we have the chance to do it, as
we're never going to get it in the outer __try/__catch block in wxEntry() in
src/msw/main.cpp.

In particular, this allows to catch crashes in wxEVT_PAINT handlers, such as
the one in debughlp sample, again.

Closes #16656.
2015-07-27 02:30:40 +02:00
Vadim Zeitlin
6ae8145e9d Fix incorrect flags in a sizer in wxDebugReportDialog.
Don't use wxEXPAND (implicitly added by SizerFlags()) and wxCENTRE together.
2015-07-27 02:29:49 +02:00
Vadim Zeitlin
03915200af Use the hosts file in debugrpt sample under all systems.
Attach the hosts file under all platforms to the debug report: this makes more
sense the hosts file could be potentially useful, unlike autoexec.bat and
/etc/motd that were used before, is also consistent between the platforms and,
finally, avoids the error due to autoexec.bat not existing any more in the
modern Windows versions.

Closes #16655.
2015-07-27 02:29:49 +02:00
Vadim Zeitlin
28ba8ed84e Fix arithmetic overflow in the bundled Expat library.
This is a modified version of the patch from Mozilla (see
https://hg.mozilla.org/releases/mozilla-esr31/rev/2f3e78643f5c) which was also
applied to Chromium. This version prefers to use the buffer of the correct
size instead of just returning an out-of-memory error if the size needed is
relatively (but not extraordinarily so, e.g. just slightly more than 64KB in
32 bit builds) big.
2015-07-27 00:42:28 +02:00
Paul Cornett
ab1bf213cf indentation fixes 2015-07-24 21:06:43 -07:00
Paul Cornett
36e31e515e avoid shadowed variable warnings with VS2015 2015-07-24 20:56:11 -07:00
Tobias Taschner
64308117e8 Implemented wxPOWER_RESOURCE_SCREEN for OS X versions < 10.9 2015-07-22 14:36:26 +02:00
Peter Tissen
328743bf2d Add Microsoft Visual Studio 2015 solution file for building wxMSW.
Allow building with VC14 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/48
2015-07-21 23:07:06 +02:00
Vadim Zeitlin
cb81c2e914 Danish translations update from Bue Vester-Andersen. 2015-07-21 02:40:14 +02:00
Artur Wieczorek
e0f5b49a07 Fixed searching the elements in wxArrayPGProperty.
Use dedicated Index() function to search elements in wxArray instead of calling custom function.
2015-07-20 21:50:30 +02:00
Vadim Zeitlin
fb61cbd411 Fix wxOSX build broken by OSXHandleMiniaturize() renaming.
This should have been part of 46ab9cb041.

See #16718.
2015-07-20 15:20:00 +02:00
Vadim Zeitlin
a34d9e2817 Basque translations update from Xabier Aramendi. 2015-07-18 23:57:13 +02:00
Vadim Zeitlin
46ab9cb041 Rename HandleMiniaturize() to have OSX prefix and make it non-virtual.
This method doesn't really have to be virtual and this change will allow to
backport the commit adding wxIconizeEvent generation to 3.0 branch.

See #16718.
2015-07-18 15:32:00 +02:00
John Roberts
9bedba0bf3 Don't show wxDatePickerCtrl as being disabled when it isn't in wxOSX.
Use setDrawsBackground: to fix the background colour and adjust the text
colour whenever the control is enabled or disabled.

See #16807.
2015-07-18 15:15:51 +02:00
Vadim Zeitlin
5ceb470c91 Correct wx/osx/activityindicator.h file name in "make install".
It's in osx, not osx/cocoa subdirectory.
2015-07-18 15:01:10 +02:00
sbrowne
bd177b0635 Don't use extra margins around content of wxStaticBox in wxOSX.
This makes top and left borders for the controls inside the box the same as
right and bottom ones.

See #16808.
2015-07-18 14:48:19 +02:00
sbrowne
cb0625b9d9 Adjust inset border values for OS X >= 10.6.
The bottom border was off by one pixel, use the values tested to work for OS X
10.[6789].

See #16808.
2015-07-18 14:46:53 +02:00
Tim Kosse
262ed2c133 Don't allow rich text content in non-rich wxTextCtrl in wxOSX.
Explicitly disable rich text content and automatic quotation marks replacement
in normal multiline text controls to make them behave closer to single line
ones and also multiline ones on other platforms.

See #16805.
2015-07-18 02:29:17 +02:00
Tim Kosse
a4681572cc Fix initial position of controls with layout insets in wxOSX.
For such controls (e.g. wxButton, wxChoice, wxGauge), their initial position
was different from the one specified when creating them, even though calling
SetPosition() later did position them at exactly the position passed as
argument.

See #16780.
2015-07-18 02:29:17 +02:00
Hartwig Wiesmann
7feaa794bc Use available space better in wxDataViewCtrl date renderer in wxOSX.
Try to show as much useful information as possible for the available width,
notably show the time fully, including seconds, which was never done before.

Also add a date column to the dataview sample to allow seeing how this works
in practice.

See #16640.
2015-07-18 02:29:17 +02:00
mj_smoker
8e0799e3e5 Handle wxTE_PROCESS_ENTER with wxTE_PASSWORD correctly in wxOSX.
Controls with wxTE_PASSWORD style didn't send wxEVT_TEXT_ENTER even if they
also had wxTE_PROCESS_ENTER. Fix this by checking for the latter style before
mapping the enter presses to default button activation.

See #14930.
2015-07-18 02:29:17 +02:00
sbrowne
c269398588 Do use disabled control text color for wxStaticText in OS X.
Contrary to an old comment, using it seems to work, while using
secondarySelectedControlColor results in incorrect appearance, different from
the other disabled controls and, worse, makes the labels unreadable as their
colour is too close to that of the background inside nested panels.

See #10524.
2015-07-18 02:29:17 +02:00
John Roberts
7065e26fb3 Fix handling of "Cancel" button in wxSearchCtrl under OS X.
Pressing it results in a control action with an empty, but not null, string.
Recognize it correctly.

See #16869.
2015-07-18 02:29:17 +02:00
Rob Krakora
31e1387541 Implement sending wxIconizeEvent in wxOSX.
Translate windowDid{Miniaturize,Deminiaturize} callbacks to calls to
SendIconizeEvent().

See #16718.
2015-07-18 02:29:17 +02:00
John Roberts
563329f89f Fix wxSearchCtrl appearance under OS X 10.10 Yosemite.
Avoid centered look which renders the control unusable under this version.

See #16871.
2015-07-18 02:29:17 +02:00
John Roberts
4f69410cd8 Fix generating events for WXK_NUMPAD_ENTER in wxOSX.
This allows to properly detected numeric keypad "Enter" key in the code,
notably in wxTextCtrl inside wxWidgets itself.

See #16415.
2015-07-18 02:29:17 +02:00
John Roberts
a79a2c0c8a Handle WXK_NUMPAD_ENTER correctly in wxOSX wxTextCtrl.
Basically just do the same thing for it as for WXK_RETURN.

See #16415.
2015-07-18 02:29:17 +02:00
John Roberts
896e148da5 Fix printing all pages without dialog prompt in wxOSX.
Do set from and to pages if we're not asking the user to choose them,
otherwise nothing is printed at all.

See #16294.
2015-07-18 02:29:17 +02:00
Vadim Zeitlin
bf4426ac10 Don't allow editing "inert" cells in wxDataViewCtrl under OS X.
The cell/renderer mode should override the state at the model level, this is
how the generic and (probably?) GTK versions behave.

Closes #15911.
2015-07-18 02:29:16 +02:00
Vadim Zeitlin
a788351eb6 Don't keep using invalid wxSound object in the sound sample.
If creating a sound object fails, delete it to ensure that it is recreated
later.

This fixes a minor bug: previously, if an invalid file was used as sound file,
only the first attempt to play it resulted in an error and all the subsequent
ones were just silently ignored. Now every attempt to play an invalid file
results in an error message, as expected.
2015-07-18 02:29:16 +02:00
Vadim Zeitlin
605149ed07 No real changes, just get rid of a variable in wxOSX wxSound code.
Don't define a variable which is used exactly once, testing for the async flag
directly is just as, or even more, readable and shorter.
2015-07-18 02:29:16 +02:00
Vadim Zeitlin
a6a3ad0d66 Fix wxSound::Create() and IsOk() return values in wxOSX.
Don't pretend that we created wxSound object successfully without actually
doing it: this means that now passing an invalid (e.g. non-existent or using
wrong format) file to wxSound::Create()/ctor will return false/result in
IsOk() returning false later, just as in the other ports.

It also means that playing a successfully created wxSound object won't give
any error messages, as unexpectedly happened before.
2015-07-18 02:29:16 +02:00
Artur Wieczorek
a0afc17c75 Use wxNullBitmap explicitly instead of wxPG_NULL_BITMAP.
wxPG_NULL_BITMAP macro is not useful because is used only once. In the rest of wxPG code wxNullBitmap is used explicitly many times so for the sake of consistency we can resign from using this macro.
2015-07-17 22:29:37 +02:00
Artur Wieczorek
15d8dae6ff Use IsOk() function to check whether wxBitmap is valid.
Use dedicated function instead of comparing wxBitmap instance with wxNullBitmap.
2015-07-17 22:26:38 +02:00
Vadim Zeitlin
78d09e2e90 Document and test wxDatePickerCtrl::SetRange() date-clamping behaviour.
Document that the current value of the control is adjusted if it doesn't lie
in the newly set range and add a unit test to check for this, now that it
actually passes under all platforms, after the previous commits.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
e3de2916bb Adjust the date in wxDatePickerCtrlGeneric after changing range.
Ensure that the current value remains between the lower and upper range
boundaries in the generic implementation, as it was already done by the MSW
one.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
fc3d2bac2a Avoid bogus assert after calling wxDatePickerCtrl::SetRange() in wxMSW.
If the old value didn't lie inside the new range, it was changed by the native
control internally but the value stored by wxDatePickerCtrl itself remained
unchanged, resulting in asserts later when the mismatch between them was
detected.

Closes #13189.
2015-07-17 17:59:40 +02:00
Vadim Zeitlin
f691e7e28d Fix wxMSW wxFontEnumerator::EnumerateEncodings() parameter handling.
This parameter is a face name, not a family name, and should be handled as
such, it was totally broken before due to a lot of confusion between face
names and family names in the code.

Closes #4715.
2015-07-17 16:10:20 +02:00
Vadim Zeitlin
b6fa548d80 Simplify wxWebViewIE code further by using wxSafeArray<>.
Use the existing class instead of using SAFEARRAY directly.

See f5d2bfa880.
2015-07-17 14:40:16 +02:00
Vadim Zeitlin
14f8c7e7e8 Check for wxUSE_ACTIVITYINDICATOR in the widgets sample.
This fixes the sample compilation with default configuration when using MinGW
as it uses wxUSE_GRAPHICS_CONTEXT=0 by default and so wxUSE_ACTIVITYINDICATOR
is turned off by default for it too.
2015-07-17 14:40:11 +02:00
Vadim Zeitlin
5ae3e4ff12 Fix wxTaskBarButton code compilation in ANSI mode.
Correctly declare SHStrDupW() as always producing a wide char string on output
and pass a wide string to wxStrlcpy() using a wide char buffer.

Closes #17033.
2015-07-17 14:40:01 +02:00
Vadim Zeitlin
5fabf7e60d Add a debug check for HTML tag handlers being available.
This helps to detect the situation when HTML tag handlers are not linked in at
all, as it can happen with MSVC when using static libraries, as this doesn't
prevent wxHTML from parsing HTML, it just doesn't render it correctly at all
and it can be difficult to understand why exactly does this happen, so try to
detect this situation and provide a hint.
2015-07-17 14:38:48 +02:00
Artur Wieczorek
403dd5673f Use enum instead of macros to represent wxPropertyGrid::DoSelectProperty flags. 2015-07-16 21:04:25 +02:00
Artur Wieczorek
4588acb21b Use wxEmptyString instead of dedicated wxPropertyGridInterface member variable. 2015-07-16 21:00:38 +02:00
Paul Cornett
8749496b15 Fix wxSpinButton best size for GTK+ 3.12 and later, closes #17051 2015-07-16 07:13:42 -07:00
Jouk
4b704d4193 Define also != operator, since find on OpenVMS-AXP needs it 2015-07-16 07:47:43 +02:00
Artur Wieczorek
79794391e9 Declare wxPG_DEFAULT_IMAGE_SIZE as wxDefaultSize constant.
wxDefaultSize is an equivalent of wxSize(-1,-1) but is more portable.
2015-07-15 21:45:27 +02:00
Artur Wieczorek
4398e20655 Use wxDefaultCoord instead of explicit -1 value while initializing wxSize and wxPoint variables. 2015-07-15 21:45:08 +02:00