Commit Graph

60356 Commits

Author SHA1 Message Date
Vadim Zeitlin
00dacea7de Correct the default value of wxThread::Wait() flags in the documentation.
It is wxTHREAD_WAIT_DEFAULT, which can be/still is different from
wxTHREAD_WAIT_BLOCK.
2015-08-02 02:44:41 +02:00
Vadim Zeitlin
1f16829c01 Skip drawing empty AUI panes.
This seems to be unnecessary and generates GTK+ warnings as it results in
passing rectangle with negative (after accounting for padding/margins) size to
gtk_paint_box() in wxAuiGtkTabArt, as could be seen e.g. when closing
"wxTextCtrl 2" tab in the aui sample.
2015-07-31 16:45:13 +02:00
Vadim Zeitlin
0e5f3612df Fix assert when adding controls to wxAuiToolBar.
The code was always wrong as it added the control to a new sizer when it was
still element of an old one, but this went unnoticed until the changes of
efce9b2306 which now trigger an assert.

Fix this by deleting the old sizer, and thus breaking the association between
it and the controls inside it, before adding the controls to the new one.

Closes #17080.
2015-07-31 16:40:09 +02:00
Paul Cornett
301f86ad85 reset clipping region in DestroyClippingRegion(), closes #17086 2015-07-30 09:59:51 -07:00
Vadim Zeitlin
f1b2c7ea04 Libtiff compilation fix for pre-C99 compilers.
Don't mix statements and declarations, this is not allowed in C89.

Fixes compilation with MSVC <= 10 after 6caa5e92c1

See #17083.
2015-07-30 00:57:52 +02:00
Vadim Zeitlin
9b029ea88a Expat compilation fix for pre-C99 compilers.
Don't mix statements and declarations, this is not allowed in C89.

Fixes compilation with MSVC <= 10 after 28ba8ed84e

See #17083.
2015-07-30 00:57:43 +02:00
Paul Cornett
fc03d2698c Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2015-07-27 10:35:01 -07:00
Paul Cornett
627b460378 use delete for memory allocated with new, closes #16797 2015-07-27 10:33:47 -07:00
Vadim Zeitlin
0eab786256 Suppress a harmless warning with MinGW 3.4.5 in wxMSW wxTreeCtrl.
Cast NM_DBLCLK to UINT explicitly as it's defined as int in the ancient
version of the headers used with this compiler.
2015-07-27 03:59:42 +02:00
Vadim Zeitlin
b17b0ab151 Work around or suppress gcc -Wunused-value warnings in wxMSW code.
TDM-GCC 4.9.2 gave many of these warnings for the calls to Windows common
controls macros, avoid them by adding error reporting where it makes sense or
just suppressing the warning by explicitly casting to void elsewhere (e.g. for
the macros which have no meaningful return value at all or return something
that we're not interested in instead of just success/failure indicator).
2015-07-27 03:55:01 +02:00
Vadim Zeitlin
73a5c20613 No real changes, just a tiny refactoring in wxMSW wxListCtrl.
Reuse wxListCtrl::SetTextColour() instead of calling ListView_SetTextColor()
from wxListCtrl::SetForegroundColour().

This ensures that the two functions behave consistently, e.g. they now both
use palette-relative colour instead of a raw RGB value in the case of the
latter method as before. This probably doesn't change anything in practice
nowadays.
2015-07-27 03:41:30 +02:00
Vadim Zeitlin
2c61e1b0da No changes, just use helper wxColourToPalRGB() in wxMSW code.
This is shorter than writing out all wxColour components.
2015-07-27 03:40:16 +02:00
Vadim Zeitlin
6caa5e92c1 Fix warnings about pointer/int casts in Win32 part of libtiff too.
Do the same thing for tif_win32.c as f995dfcc20
did for tif_unix.c, i.e. use a union for casting between HANDLEs and ints to
avoid compiler warnings which were given for the explicit casts before.
2015-07-27 03:28:07 +02:00
Vadim Zeitlin
01af56440a Use wxRound() instead of implicit float-to-int conversion in wxSTC.
At the very least, this avoids tons of gcc warnings about implicit conversions
from float to int and it could also be more correct if the coordinates can
really be fractional.
2015-07-27 02:58:07 +02:00
Suzumizaki-Kimitaka
28587c97d8 Add support for Unicode to wxStackWalker.
Use wide-char versions of debug help functions if available, falling back to
the narrow char ones otherwise.

Also improve 64 bit support by using 64 bit versions of the functions if
available as well.

Closes #15138.
2015-07-27 02:44:36 +02:00
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