Commit Graph

60123 Commits

Author SHA1 Message Date
Vadim Zeitlin
aa62a65130 Brazilian Portuguese translations update from Philippe. 2015-06-23 18:09:31 +02:00
Catalin
28e17b005d Removed memory leak in the typetest sample.
Free the font allocated in DoVariantDemo().

Closes https://github.com/wxWidgets/wxWidgets/pull/42
2015-06-22 13:36:31 +02:00
Vadim Zeitlin
8741c2730b Make wxVSCROLL explicitly of int type.
Its value (0x80000000) is outside of the int type range on 32 bit platforms,
but we still want to allow using it as an initializer of int and/or long
variables for consistency with the other types, so cast it to int explicitly
to suppress -Wnarrowing warnings from recent g++ which were given when doing
this before.
2015-06-21 15:59:16 +02:00
Vadim Zeitlin
853a8ef76f Avoid warnings about narrowing casts in the long long tests.
Recent g++ versions give -Wnarrowing warning when a value outside of the type
range is used to initialize a variable of this type in { }. Avoid it in the
long long tests using explicit casts as we already cast between long long and
unsigned long long values here anyhow.
2015-06-21 15:56:06 +02:00
Vadim Zeitlin
bede8a3296 Ensure we never create empty bitmap in wxHtmlWindow::OnPaint().
Doing this resulted in an assert from wxBitmap ctor and was useless anyhow,
just skip the drawing code if the window is reduced to empty client area.
2015-06-21 15:38:31 +02:00
Vadim Zeitlin
d5fda9d69b Fix g++ version test in the previous commit.
sUse the correct __GNUC_MINOR__ instead of the wrongly autocompleted
__GLIBC_MINOR__.
2015-06-21 02:42:34 +02:00
Vadim Zeitlin
052e598d09 Avoid g++ 4.8.2 bug that resulted in infinite loops in the test suite.
g++ 4.8.2, shipped with Ubuntu 14.04, generates incorrect code for checking
the loop termination condition, resulting in never ending loops in
HashMapTest().

Disable the optimizations for this function for 4.8.[012] as the bug seems to
be fixed in 4.8.4 and several similar (but not really identical) bug reports
in gcc bugzilla have been fixed in 4.8.3.

This should allow the unit tests on Linux buildbots, using 4.8.2, to run to
completion again.
2015-06-21 02:24:50 +02:00
Vadim Zeitlin
3195a0e538 Document wxPrintData::SetPaperSize().
Also remove strange (probably out of date?) comment from this method in the
header.

Closes #17035.
2015-06-21 02:24:50 +02:00
Vadim Zeitlin
f72aa7b1c9 Fix reading beyond end of buffer in UTF-16 decoding code.
Verify that incrementing the input pointer doesn't take us outside the buffer.
Still accept a single trailing NUL as the string terminator.
2015-06-21 02:24:49 +02:00
Vadim Zeitlin
04c4e5f177 Avoid reading one char beyond the buffer end in UnicodeTestCase.
Valgrind complains about reading beyond the end of buffer when using glibc
std::string for wxString implementation under amd64 Linux. Don't suppose that
the buffer has one extra null word at its end to avoid this.
2015-06-19 20:22:11 +02:00
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