Commit Graph

58827 Commits

Author SHA1 Message Date
Vadim Zeitlin
1e2af26e47 Recognize MSVC 14 a.k.a. Visual Studio 2015 compiler.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).

See #16854.

(this is a backport of f350bab from master)
2015-06-13 18:34:54 +04:00
Vadim Zeitlin
c06c8edb5a Don't redefine snprintf() for MSVC 14 in libtiff.
This MSVC version does add snprintf(), finally, and doesn't allow
pre-#defining it before including its stdio.h, so don't do this.

See #16854.

(this is a backport of 0a41db1 from master)
2015-06-13 18:32:08 +04:00
Vaclav Slavik
fd08f641ae Call SetThreadUILanguage() on Windows
Starting with Vista, SetThreadLocale() does basically nothing and does
not affect UI language. We need to call SetThreadUILanguage() as well
from wxLocale::Init() to have the locale reflected in e.g. standard
dialogs.
2015-06-10 18:32:49 +02:00
Vadim Zeitlin
264f01824b Don't end converting prematurely on encountering consecutive NULs.
Don't stop converting subsequent chunks just because the length of one of them
was 0: this can happen if the first character of a string is a NUL or if there
are two (or more) NULs in it later.

Simply remove the check for this and continue as usual even in this case.

Also add a unit test verifying that we do translate NULs in input into NULs in
output.

Closes #16620.

(this is a backport of f99ff49 from master)
2015-06-08 14:06:23 +04:00
Stefan Csomor
b67dea6fc0 In order to get all focus set events, store field in editor and catch
becomeFirstResponder there

See #14269.

(this is a backport of cea11b5 from master)
2015-06-08 02:44:11 +04:00
Stefan Csomor
6a961dd2d9 Allowing reentrancy on NSPanels makeResponder as in NSWindow
See #14269.

(this is a backport of 3ba1c7e from master)
2015-06-08 02:44:11 +04:00
Stefan Csomor
7dc6d1876e Refactoring to common code for updating selections, using common focus
code

See #14269.

(this is a backport of e65104f from master)
2015-06-08 02:44:11 +04:00
Stefan Csomor
6749ca7405 Refactoring to common code for focus set and lost events, so that
changes can be made a single place

See #14269.

(this is a backport of 2b99f92 from master)
2015-06-08 02:44:11 +04:00
Stefan Csomor
8d2956100f Using the base class wxHAS_NATIVE_ENABLED_MANAGEMENT in Cocoa
disabling/enabling child windows

Fixes #16232, fixes #15495.

(this is a backport of 91f25e0 from master)
2015-06-08 02:44:11 +04:00
Dimitri Schoolwerth
97eb03c9a7 Re-enable symbols visibility support for the Clang compiler
Visibility support for Clang was disabled in 7198c33 because of linking
errors when building shared libraries, related to non-inline methods in
exported template classes.

The last Clang version to have these problems is version "4.1
(tags/Apple/clang-421.11.66)" as part of Xcode 4.5.2, and the next
release fixes them (version "4.2 (clang-425.0.24)", Xcode 4.6). Check
for the Clang version and only disable visibility support when compiling
with Apple Clang < 4.2.

Note that Apple Clang 4.2 is based on official Clang 3.2 so also check
for that version in case of non-Apple builds. The only official Clang
that has been tested successfully is 3.4 which worked fine with
visibility. Other versions that were tried (3.1 and 3.2) segfault while
compiling wx.

(this is a backport of 7cacde3 from master)
2015-06-08 02:36:52 +04:00
Vadim Zeitlin
2923d95264 Fix flickering when resizing a frame with status bar in wxMSW.
The flicker was only visible under Windows XP or when using a class theme
and was due to mis-positioning the status bar initially in PositionStatusBar().
Fix this by adjusting its position by the toolbar offset before calling its
SetSize().

Closes #16705.

(this is a backport of 8d12e07453 from master)
2015-06-01 00:15:48 +02:00
Dimitri Schoolwerth
9a922899de Fix unused variable warning in wxRichText
Don't define variable 'bottom' which is initialised but not
referenced any longer (since ab4b767).
2015-05-31 04:53:59 +04:00
Vadim Zeitlin
4b073ab140 Fix recently added wxFileName::MakeRelativeTo() unit test for non-Unix.
Don't hard code the use of slashes as path separators.

(cherry picked from commit ef30f6fe63)
2015-05-31 03:51:06 +04:00
Vadim Zeitlin
0eb1658ca7 wxOSX: don't call strlen() on possibly null pointer.
Use wxCharBuffer::length() instead, this is more efficient and safer as it
correctly returns 0 in case the conversion fails.

Closes #9967.
2015-05-29 16:37:05 +02:00
Vadim Zeitlin
b3b8d8c4a8 Compilation fix after stray wxFALLTHROUGH in the last commit.
Remove wxFALLTHROUGH backported from trunk but which doesn't exist in 3.0.

See #17010.
2015-05-29 16:32:14 +02:00
Vadim Zeitlin
de891ddb03 Fix wxFileName::MakeRelativeTo() for directory relatively to itself.
The expected result in this case is ".", but the filename became empty instead
when wxPATH_NATIVE was used.

Fix this by examining GetFormat(format), which takes care of mapping
wxPATH_NATIVE to its real value, instead of wxPATH_NATIVE itself.

Also add a unit test verifying that this works as expected.

Closes #17010.
2015-05-29 16:25:45 +02:00
Artur Wieczorek
a029ac7690 Revert "Add wxABI_VERSION guard around wxFloatProperty::DoGetAttribute virtual method body."
This reverts commit 192a61b391.
2015-05-27 22:12:37 +02:00
Artur Wieczorek
192a61b391 Add wxABI_VERSION guard around wxFloatProperty::DoGetAttribute virtual method body.
To prevent compilation errors (when wxABI_VERSION < 30003) also the body of newly overridden method needs to be guarded by wxABI_VERSION.
(See 7b25b65a2f).
2015-05-27 19:43:23 +02:00
Vadim Zeitlin
7b25b65a2f Add missing wxABI_VERSION checks and version script entries.
Newly overridden virtual methods must be taken in wxABI_VERSION checks as
otherwise any program using the class deriving from the one containing this
method would reference the method in the vtbl of that class and so become
ABI-incompatible with the earlier shared library versions.

Also add wxABI_VERSION guard around the entire wxSimplebookXmlHandler class
added in 3.0.2.
2015-05-27 15:07:05 +02:00
JulianSmart
877b972d8f Use OnEndSession/OnQueryEndSession events instead of calling the functions directly. 2015-05-26 12:10:07 +01:00
JulianSmart
ab4b7674c0 Fixed clipped borders on scaled-to-fit images, and fixed a floating image layout bug. 2015-05-26 11:47:54 +01:00
Paul Cornett
0ed1e641d2 backport mouse capture fixes 00cc023 and dc555a9
this change was supposed to be part of 69c7a8c405
2015-05-13 20:19:45 -07:00
Paul Cornett
69c7a8c405 backport mouse capture fixes 00cc023 and dc555a9
00cc023 "fix releasing mouse capture before showing modal dialog"
dc555a9 "notify all windows in capture stack about capture lost, and empty the stack"
closes #16647
2015-05-13 10:13:49 -07:00
Paul Cornett
a2f1bc1fde Fix wxPrintDialog when used directly, see #16821 2015-05-11 10:14:34 -07:00
Iwbnwif Yiw
3f4304f6ab Update wxGrid correctly in presence of hidden rows/columns.
Use GetRowHeight()/GetColWidth() instead of accessing m_rowHeights/m_colWidths
arrays directly as the functions handle the hidden rows/columns correctly.

This fixes bug with corruption of wxGrid appearance if any rows/columns were
inserted into or deleted from a grid containing some hidden rows/columns.

Closes #16980.
2015-05-10 03:17:53 +02:00
Kevin B. McCarty
8277848a5f Don't assert in wxGenericFileCtrl if there is no selected file.
Don't use the list control item if there is no selection in it.

Closes #16684.
2015-05-09 18:57:42 +02:00
Knut Petter Lehre
d1f3be5846 Fix adding blocks to existing selection in wxGrid by Ctrl-drag.
Allow using Ctrl-dragging to add more blocks to the existing selection,
similarly to how spreadsheets work.

Closes #14141.
2015-05-09 18:03:06 +02:00
Vaclav Slavik
7c108690e5 Add LANG_FRISIAN win32 record for wxLANGUAGE_FRISIAN 2015-05-01 11:38:51 +02:00
Vadim Zeitlin
56b30625d0 Guard against NULL m_fileHistory in wxDocManager::OnMRUFile().
Don't crash if wxDocManager was created with "initialize = false" ctor
argument in which case m_fileHistory remains false.

Closes #16973.
2015-04-29 14:08:14 +02:00
Paul Cornett
acc9d5db2f Fix GTK warnings after 92c45ba when TLW is closed while editor is still shown, see #16850 2015-04-26 11:02:26 -07:00
Paul Cornett
92c45ba41d Fix drawing of cell editing controls with GTK3
Get rid of the ugly and unnecessary hack of making the control a child
of the GtkTreeView "behind its back", which was a terrible idea and
bound to cause problems.
See #16850
2015-04-24 09:50:53 -07:00
Vadim Zeitlin
82d4f005d3 Measure wxBitmapComboBox height correctly if it has images.
This fixes a regression introduced in 45e216b (see #14279):
wxBitmapComboBox must be higher than a normal wxComboBox if it has big
enough bitmaps. Closes #16690.

This is the backport of 7e869a5 from master.
2015-04-24 03:53:41 +04:00
Dimitri Schoolwerth
52975d72fd Work around failing file watcher test under XP.
Under only Windows XP the test FileSystemWatcherTestCase::TestTrees fails
during the RmDir(treedir) call (SHFileOperation strangely returns
ERROR_DIR_NOT_EMPTY). To make the test pass remove the treedir first and
only then the singledir. This is merely a workaround while the actual
problem is still to be investigated.

This is the backport of 2d5ce25373 from
master.
2015-04-23 00:39:41 +04:00
Vadim Zeitlin
03adb6fd2e Ensure that wxTestableFrame is shown on the (main) screen.
Undo the accidental commit of local modifications in
13a119cca8 .

This is the backport of 498f07a5b2 from
master.
2015-04-22 17:05:35 +04:00
Vadim Zeitlin
12b857a329 Fix infinite loop when deleting columns from wxTreeListCtrl.
Wrong variable was checked in the loop adjusting the columns values resulting
in an infinite loop.

Closes #16955.
2015-04-22 14:50:33 +02:00
Vadim Zeitlin
35a3ca5a1e Disable wxSleep() test case for buildbot builds.
This test keeps failing just because the buildbot machine are too heavily
loaded. This is not really an error, so just avoid running this test there.

This is the backport of f641dfd7 from master.
2015-04-22 14:27:06 +02:00
Vadim Zeitlin
5f003c9ffb Avoid using negative width in generic wxTimePickerCtrl.
If there is not enough space for the text, make it of size 0, not negative.

Closes #16960.
2015-04-22 14:15:22 +02:00
Paul Cornett
eb4aab5639 Avoid "Gtk-Message: GtkDialog mapped without a transient parent", closes #16863 2015-04-21 21:44:35 -07:00
Vadim Zeitlin
c2543cd474 Fix using custom paper format in wxOSX.
Do actually use the custom paper object the code creates.

Closes #16959.
2015-04-21 15:56:52 +02:00
Vaclav Slavik
b6d3a64fae Don't check for always-available CGColorCreateGenericRGB
This function is available on OS X since 10.5, which is the minimum
supported version of wx 3.0.

Fixes Xcode 6.3 warning triggered by checking availability of a symbol
that wasn't marked as weak_import.
2015-04-19 13:15:09 +02:00
Vadim Zeitlin
52c8a3684c Disable surrogate-related unit test for MSW.
This test can't work when the in-memory representation is UTF-16, as we can't
convert surrogates to anything else in this case.

This fixes the unit tests broken since r76622, see #16298.

This is the backport of 0bb7676889 from master.
2015-04-19 01:45:20 +02:00
Paul Cornett
0c02b05d92 Avoid freeze count mismatches with GTK 2.18+ when impl_window changes while frozen, see #16795 2015-04-17 08:45:55 -07:00
Vadim Zeitlin
84f6686e39 Avoid warnings about not checking chdir() result in wxGTK.
Give error if changing directory when wxFD_CHANGE_DIR or wxDIRP_CHANGE_DIR
flags are used, this is a good idea generally speaking and it also avoids
warnings about not checking chdir() return value that we got under Ubuntu.

This is the backport of 3f6741a770 from master
with the changes of cb06ecb9eb and
de27f4b08f too.
2015-04-17 13:36:04 +02:00
Vadim Zeitlin
feef92f3e2 Avoid warnings about not checking read() result in wxJoystick code.
Explicitly ignore errors if we can't read from the associated FD.

This is mostly done to avoid -Wunused-result warning about not checking read()
return value under Ubuntu.

This is the backport of a74d2faf3a from master.
2015-04-17 13:34:36 +02:00
Vadim Zeitlin
ce62dc893a Yet another wxStopWatch unit test fix for buildbot.
Relax the check in RestartBug() test too, the time can be slightly smaller
than expected (by ~2ms on disc-xp machine).

This is the backport of 7af8598903 from master.
2015-04-17 13:33:18 +02:00
Vadim Zeitlin
f3fb8fa7c6 Fix harmless warning in ownerdrw sample.
Don't define an unused variable.

Also don't use wxT() unnecessarily.

This is the backport of cd6fb7a9bd and
a1902c1456 from master.
2015-04-17 13:31:24 +02:00
Vadim Zeitlin
210040016e Fix harmless warning in wxCommandProcessor::IsDirty().
This fixes the warning for MSVC, which warned about "forcing value to bool
'true' or 'false'", without introducing one for gcc which would complain if we
compared the value, of compatibility_iterator type, with NULL.

This backports the changes of r75445 and r75653 from master.
2015-04-17 13:27:49 +02:00
Vadim Zeitlin
669c5cd64c Replace anonymous namespace with a named one in the test helpers.
This should avoid clang warnings about the function in anonymous namespace
being unused.

This is the backport of r76928 from master.
2015-04-17 13:26:20 +02:00
Stefan Csomor
b6c6afad93 Fix warning due to wrong use of NULL in wxOSX wxSound.
This is the backport of the old r76862 from trunk.
2015-04-17 13:20:47 +02:00
Vadim Zeitlin
4ed9b1e244 Relax another check in wxStopWatch unit test.
Increase the upper bound even further to avoid spurious failures in the
buildbot builds.
2015-04-13 15:56:46 +02:00