Commit Graph

60113 Commits

Author SHA1 Message Date
Vadim Zeitlin
893102b926 Fix mismatched new[]/delete in a test case.
Use wxDELETEA() as the comment said we did -- except that we didn't.
2015-06-19 16:32:14 +02:00
Vadim Zeitlin
6f2fdbae6a Fix typo in a comment.
s/minimzes/minimizes/
2015-06-19 13:40:41 +02:00
Nathan Ridge
ad21cc332a Relax the ABI compatibility requirements for GCC.
Allow a library and an application to differ in __GXX_ABI_VERSION
within the range 1002-1008. The ABI changes made in this range
do not affect wxWidgets.
2015-06-19 01:44:55 -04:00
Vadim Zeitlin
903b2eb61a Fix typo in a comment in the previous commit.
s/evreything/everything/
2015-06-17 15:16:52 +02:00
Catalin
57ec21dca5 Build child controls of config sample following UI rules.
When using absolute size and position, the text of m_text could be clipped at
the bottom.

Closes https://github.com/wxWidgets/wxWidgets/pull/39
2015-06-17 15:02:32 +02:00
Vadim Zeitlin
4fc26303b9 Fix restricting both min and max size of MDI children in wxMSW.
Calling SetMinSize() on wxMDIChildFrame in wxMSW prevented SetMaxSize() from
working as wxMDIChildFrame::HandleGetMinMaxInfo() didn't take the max size
into account and prevented the execution of the base class version of the same
method from taking place if min size was set.

Fix this simply by always delegating to the base class version after using
DefMDIChildProc() to compute the default max size values.

Closes #17029.
2015-06-15 17:43:41 +02:00
Vaclav Slavik
1f5a876d32 Really fix MinGW compilation of SetThreadUILanguage-using code
09e1fbe fixed compilation, but not linking. Just use the same code as on
the 3.0 branch, with dynamic loading of SetThreadUILanguage.
2015-06-15 13:56:35 +02:00
Vadim Zeitlin
6787d2268a Improve workaround for MinGW math.h bug in strict ANSI mode.
Declare _hypot() function globally, predefining __NO_INLINE__ in wx/math.h is
not enough as <math.h> is also included from some other standard headers, e.g.
<algorithm>, and including them results in the same bug as in wx/math.h
(i.e. https://sourceforge.net/p/mingw/bugs/2250/).
2015-06-15 02:21:58 +02:00
Vadim Zeitlin
095cf87eb6 Work around "missing" LLONG_MAX &c in MinGW strict ANSI mode.
Definitions of non-standard LLONG_MAX, LLONG_MIN and ULLONG_MAX constants are
excluded from MinGW limits.h when compiling in "strict ANSI" mode, so define
them ourselves.
2015-06-14 19:52:28 +02:00
Vadim Zeitlin
f5d2bfa880 Add better error checking and simplify wxWebViewIE::DoSetPage().
Don't ignore errors (this resulted in warnings in optimized builds because
variable "hr" containing the error code to was assigned but never used) and
don't leak memory in the (admittedly unlikely) case an error really occurs.

Also don't duplicate the code for creating a one element SAFEARRAY<VARIANT>,
extract it into a helper function.
2015-06-14 19:52:28 +02:00
Vadim Zeitlin
9fbb9f7e4e Fix harmless gcc -Wextra warning in wxStringTokenizer.
Explicitly use the base class ctor.
2015-06-14 19:52:27 +02:00
Vadim Zeitlin
b5a512c01e Fix harmless signed/unsigned comparison warning in wxMSW wxTreeCtrl.
Don't cast NMHDR::code field to int, this cast was added in the previous
millennium, probably to work around the wrong definition of NM_DBLCLK in some
ancient MinGW headers, but nowadays all MinGW distributions (tested with
MinGW 4.8.1, MinGW-64 4.9.1 and TDM-GCC 4.9.2) define it correctly and so
using this cast results in a warning -- just remove it to get rid of it.
2015-06-14 19:52:27 +02:00
Vadim Zeitlin
c8a3c01424 Work around a bug in MinGW math.h.
Including standard math.h header with both -O2 and -std=c++NN options results
in compilation error due to a bug in the header, see MinGW bug report at
https://sourceforge.net/p/mingw/bugs/2250/

Work around this to allow the library to compile in release build with
-std=c++11. This is ugly but better than failing to compile at all.
2015-06-14 19:52:26 +02:00
Vadim Zeitlin
cc774bb301 Fix building and using the library with MinGW -std=c++{98,11} options.
These options enable "strict ANSI" mode in MinGW which omits declarations of
POSIX functions from the standard headers. To allow the library and, possibly
even more importantly, the user code including our headers, to compile with
these options, declare the functions that we need ourselves.

This might appear to go against the spirit of "strict ANSI" mode, but the only
alternative would be to not use such functions at all and silently cripple the
library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't
seem appealing neither.

Closes #16984.
2015-06-14 19:52:26 +02:00
Vadim Zeitlin
15d9067006 Suppress warnings about missing field initializers for wxKeyNames.
This warning is harmless but annoying, especially because it's given a couple
of dozens times in this file, so just suppress it.
2015-06-14 19:52:25 +02:00
Artur Wieczorek
147ae70623 Extend 'SetSplitterPosition' unit test in propgrid sample.
Added check if splitter position is retained when property grid is resized.
2015-06-14 17:13:21 +02:00
Artur Wieczorek
a1c888437d Use dedicated IncBy method to increase wxSize value in propgrid sample.
Use this method instead of modifying directly wxSize data members.
2015-06-14 17:10:28 +02:00
Artur Wieczorek
87f0b6fe80 Fix and refactor wxString wxPGProperty::GetFlagsAsString and SetFlagsAsString.
Fixes the bug which could be observed if string containing more then one flag entry was provided to wxPGProperty::SetFlagsFromString. In this case property flags were not set properly (were not set all) due to the error in splitting the string into tokens (whole string instead of its individual token was taken to compare).
Lookup table used to map between flag values and their names is redesigned in order to reduce the size and to make indexing simpler. There are no longer NULL entries in the table and every flag name is identified explicitly by the corresponding flag value and not by the index of the name entry in the table. Thanks to this the relation between flag value and flag name is more clear and the loops in wxPGProperty::GetFlagsAsString/SetFlagsAsString can be simplified.
2015-06-14 17:07:24 +02:00
Artur Wieczorek
2bc4357088 Added unit test of wxPGProperty::SetFlagsAsString/GetFlagsAsString methods in propgrid sample.
This unit test will be executed for fast and full test. For each property there are generated random flags which are set with wxPGProperty::SetFlagsAsString(). Verification whether flags were set properly is done using wxPGProperty::GetFlagsAsString() and wxPGProperty::HasFlag() methods.
2015-06-14 16:56:06 +02:00
Vadim Zeitlin
14425f990c Correctly deinitialize wxUxThemeEngine in wxMSW.
Set ms_isThemeEngineAvailable to -1, meaning that we need to reinitialize
themes, instead of false, meaning that themes are not available.

This fixes problems when the library is initialized, shut down and then
initialized again.

Closes #17023.
2015-06-14 14:01:55 +02:00
Artur Wieczorek
6d29584b48 Use wxLogDebug instead of wxLogMessage to log column resizing with splitter in propgrid sample.
wxLogMessage displays message in pop-up window what prevents dragging the splitter and hence resizing cannot be in practice done. wxLogDebug is sufficient for the logging purposes in this place.
2015-06-13 22:39:16 +02:00
Artur Wieczorek
5d763571b0 Use pre-increment operator to increment iterator in the loop (propgrid sample).
When the return value is ignored, the ++it is never less efficient than the it++.
2015-06-13 22:32:14 +02:00
Artur Wieczorek
dc3f451acb Use empty() member function to determine if arrays are empty in propgrid sample.
Use this dedicated function instead of checking if size()/GetCount() functions return zero/non-zero value.
2015-06-13 22:30:13 +02:00
Artur Wieczorek
8ff74b727a Fixed minor typos in comments and strings in propgrid sample. 2015-06-13 22:28:28 +02:00
Artur Wieczorek
e4023cccc1 Removed unused identifier from propgrid sample. 2015-06-13 22:25:48 +02:00
Artur Wieczorek
8e2f1b47aa Use wxS macro with string literals.
To make string literals notation consistent.
2015-06-12 23:39:00 +02:00
Artur Wieczorek
4d4ece53f1 Use wxEmptyString instead of wxString().
To keep uniform notation of empty strings.
2015-06-12 23:35:17 +02:00
Vaclav Slavik
09e1fbef70 Fix MinGW and VC8 compilation error
3a8ad952 introduced compilation failures with (some versions of) MinGW
and VC8 because their winnls.h apparently doesn't declare
SetThreadUILanguage(). Just declare the function ourselves to fix it.
2015-06-12 19:47:36 +02:00
Vadim Zeitlin
6037ce0e6f Disable unit test sporadically failing in wxGTK buildbot builds.
This failure seems to only happen on buildbot, at least it couldn't be
reproduced after 100 runs of the test locally, so it just doesn't seem
possible to debug it.

Disable it to allow detecting when other tests fail (which would be
unexpected, unlike this one).
2015-06-12 15:57:33 +02:00
Vadim Zeitlin
1c78ede551 Fix use of SetContainingSizer() in wxWrapSizer code.
Calling SetContainingSizer() on a window which had been contained in another
sizer previously asserts since efce9b2306, so
change wxWrapSizer to set the containing sizer to NULL before resetting it.
2015-06-12 14:34:26 +02:00
Catalin
6e72126894 Correctly map MAC_CHARSET to wxFONTENCODING_MACROMAN in wxMSW.
Recognize MAC_CHARSET when mapping MSW charsets to wx font encodings.
2015-06-12 13:41:33 +02:00
Vaclav Slavik
3a8ad95230 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-11 19:35:04 +02:00
Artur Wieczorek
6cc7811394 Fixed minor typos in comments.
Yet another iteration.
2015-06-09 20:04:27 +02:00
Artur Wieczorek
c9417c41f5 Fix PCH-less build after cb6efbd.
Add missing wx/settings.h inclusion.
2015-06-09 18:03:56 +02:00
Artur Wieczorek
aeed3322f2 Fixed minor typos in comments. 2015-06-08 21:49:38 +02:00
Artur Wieczorek
c8088e479a Fixed minor typos in the name of variables. 2015-06-08 21:48:08 +02:00
Artur Wieczorek
cb6efbd3c3 Lay out various wxPG dialogs based on the current system screen design.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
2015-06-08 21:46:03 +02:00
Vadim Zeitlin
8367c3c0ca Czech translations update from Zbyněk Schwarz . 2015-06-08 18:10:32 +02:00
IlyaBizyaev
f2132ac0f3 Fixed more typos in the STC sample.
Replaced all occurrences of "hilight" with "highlight".
2015-06-08 01:16:51 +02:00
orbitcowboy
2afddd5e22 Fix some typos in the samples.
Mostly in the comments, but also a couple in the user-visible strings.
2015-06-08 01:14:47 +02:00
Artur Wieczorek
d30c075a22 Use wxID_ANY symbol for controls in propgrid sample.
Don't use arbitrary control ID's.
2015-06-07 23:14:37 +02:00
Artur Wieczorek
1d9c1b35fd Use pre-increment operator to increment iterator in the loop.
When the return value is ignored, the ++it is never less efficient than the it++.
2015-06-07 23:05:42 +02:00
Artur Wieczorek
06013ea36f Reduce the scope of variables using to index single loop only.
And adjust their types if necessary.
2015-06-06 17:55:39 +02:00
Artur Wieczorek
213df7dd88 Use conditional operator instead of conditional statement in wxBoolProperty::ValueToString. 2015-06-06 17:48:59 +02:00
Roberto Perpuly
aa5dbad410 Use FSEvents in wxFileSystemWatcher on OS X
The FSEvents API allows for creating watches in entire trees of
directories in an efficient manner.

Closes #16969.
2015-06-06 02:37:35 +04:00
Roberto Perpuly
f0e098fa06 Re-enable running FS watcher test on OS X
Use a workaround to compensate for the differences between a non-GUI and
GUI event loop with wxOSX. This allows the FS watcher tests to pass
(previously it would hang) under OS X without having to move the tests
to the test GUI application (where the tests do pass on OS X already,
without needing this workaround).

See #16969.
2015-06-06 01:29:52 +04:00
Roberto Perpuly
bb14d8e131 Fix re-running aborted FS watcher test
If the test is interrupted and run again an assert is raised because the
temporary fswatcher_test dir has had no chance to be deleted and still
exists. Fix this by removing the dir before each test.
2015-06-06 01:29:52 +04:00
Artur Wieczorek
ccd98c6ad9 Refactor: use <<= bit shift assignment operator in wxPGProperty::GetFlagsAsString.
Use it instead of << operator which is used to just shift bits in one variable.
2015-06-05 22:49:49 +02:00
Artur Wieczorek
3e3aaa33db Refactor string manipulations in wxPropertyGrid::ExpandEscapeSequence and CreateEscapeSequences.
Share wxString::clear() method to initialize empty destination string.
2015-06-05 22:47:28 +02:00
Vadim Zeitlin
efce9b2306 Improve detection of attaching windows to more than one sizer.
It's not only an error to insert a window twice into the same sizer, it's
already an error, and even a more insidious one, to insert it twice into
different sizers, so guard against this as well as debugging it (much) later,
when the window and the sizer is destroyed is much less fun.
2015-06-05 01:36:42 +02:00