Commit Graph

58134 Commits

Author SHA1 Message Date
Vadim Zeitlin
90860e9444 Remove code maintaining last item from the treectrl sample.
The code was buggy (e.g. it didn't update the last item correctly after
executing "Append many items" menu command) and seems to be unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:53 +00:00
Vadim Zeitlin
b905bae91c Fix harmless warnings about unused global variables.
Don't define variables that we never use to fix clang warnings about them.

See #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:48 +00:00
Vadim Zeitlin
e0a255785f Fix Unix build using clang with g++ 4.8 headers.
Don't override HAVE_TR1_TYPE_TRAITS detected by configure with
HAVE_TYPE_TRAITS detected by clang __has_include() as the latter is less
reliable and can return true even when the header is not actually usable, as
it happens with g++ 4.8 <type_traits> in non C++11 mode.

Closes #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:43 +00:00
Vadim Zeitlin
fe93941fb2 Use settings in wx_vcN_local.props files if they exist.
Allow overriding the default build settings in local properties files for VC11
and VC12 builds.

See #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 19:45:49 +00:00
Vadim Zeitlin
a2a846e473 Allow customizing bitmap handling in wxSVGFileDC.
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.

And also allow to define custom handlers to make the behaviour even more
flexible.

Closes #15968.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 17:26:27 +00:00
Vadim Zeitlin
c59b815f2c Fix several rounding problems with float values in wxPropertyGrid.
Loss of precision when converting floating point numbers to text and back
could result in several problems, notably comparing a valid value with the
minimum could fail after a round trip through wxSpinCtrl.

Fix this by using a specialization of NumericValidation() handling floating
point values specially and correctly.

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:54 +00:00
Vadim Zeitlin
4ec4dcd3f5 Use symbolic attributes names in wxPropertyGrid code.
No real changes, just use constants instead of hardcoding their values.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:49 +00:00
Vadim Zeitlin
d183babc8d Allow retrieving wxPG_FLOAT_PRECISION and not just setting it.
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:44 +00:00
Vadim Zeitlin
876859fcb7 Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.
These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:39 +00:00
Vadim Zeitlin
0415f0ab05 Document interaction of wxSplitterWindow gravity with initial size.
Document the somewhat counter intuitive (but difficult to change) behaviour of
the splitter when both sash position and gravity are set.

See #15996.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:31 +00:00
Vadim Zeitlin
b1a92006b9 Fix memory leak when not finishing iteration started by wxFindFirstFile().
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.

Closes #4631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:24 +00:00
Vadim Zeitlin
1911811fe6 Fix wxOSX compilation error after r75956.
wxScopedArray::get() needs to be explicitly called to access the array
contents as a pointer.

Closes #16015.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:14:32 +00:00
Vadim Zeitlin
d479c2affa Chinese translations update for 3.0.1 from Jiawei Huang.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:09:51 +00:00
Vadim Zeitlin
92c5b8bba2 German translations update for 3.0.1 from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:06:50 +00:00
Vadim Zeitlin
918f777c5e Basque translations update for 3.0.1 from Xabier Aramendi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 21:47:28 +00:00
Stefan Csomor
633b5c691b make sure a frozen control calls a native 'thaw' on the tlw during destruction, otherwise tlws might end up unresponsive, see #16011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 19:05:22 +00:00
Vadim Zeitlin
b481d43235 Ukrainian translations update for 3.0.1 from Yuri Chornoivan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 17:15:56 +00:00
Vadim Zeitlin
ae3ffd0740 French translations update for 3.0.1 from Xavier Perrissoud.
Apply to the trunk as well.

See #16013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 16:28:03 +00:00
Vadim Zeitlin
dfdde1cd06 Regenerate all .po files in the trunk too.
Bring them (more) in sync with 3.0 branch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 16:27:57 +00:00
Vadim Zeitlin
5ac26f43bd Fix memory leak in wxRibbonToolBar in case of error.
Use wxScopedPtr to ensure the tool is not leaked, even if we fail to insert
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:58 +00:00
Vadim Zeitlin
5e204ab52e Fix uninitialized variable use in wxPropertyGrid code.
wxPGProperty::GetItemAtY() uses its input/output "nextItem" parameter, so it
must be initialized before calling it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:55 +00:00
Vadim Zeitlin
461e38f17c Ensure we don't read invalid memory in wxOSX wxDisplay code.
Replace wxASSERT() with wxCHECK_MSG() to ensure that we don't read beyond the
end of the array even if we are given an invalid index.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:52 +00:00
Vadim Zeitlin
563f41c686 Fix memory leak on error return in wxOSX wxDisplay code.
Use wxScopedArray to ensure that memory is freed, even if wxCHECK_MSG()
condition fails.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:49 +00:00
Vadim Zeitlin
3dd1d4d915 Fix memory leak in case of error in wxOSX graphics code.
Delete the pointer before returning from the function if we don't pass its
ownership to CGDataProviderCreateWithData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:46 +00:00
Vadim Zeitlin
a4cc201e76 Fix memory leak on error return from wxMsgCatalogFile::FillHash().
Use wxScopedPtr to make memory management simpler and to ensure that all
pointers allocated in this function are deleted: this wasn't the case when we
returned false earlier due to the MO file being invalid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:43 +00:00
Vadim Zeitlin
f5033eec65 No real changes, just use smart pointers in GIF decoding code.
Use wxScopedArray to make the code much shorter and guarantee that it doesn't
leak memory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:41 +00:00
Vadim Zeitlin
76d296d67d Fix socket leak in Accept() in case of error.o
We leaked a socket descriptor if creating the accepted socket object failed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:38 +00:00
Vadim Zeitlin
bebfa839da Fix fall back to default resolution in wxOSX printing code.
The code was written to use the default resolution if getting it from the
printer failed but only handled failure of PMPrinterGetOutputResolution() and
not of PMSessionGetCurrentPrinter() itself.

Use default resolution if obtaining it failed for any reason (alternative
could be to return error if obtaining it failed for any return...).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:34 +00:00
Vadim Zeitlin
356da1750d Correct wxDataViewColumn::AppendXXXColumn() return value in case of failure.
Don't return invalid column pointer if it was freed because actually appending
it to the control failed.

Fixes corresponding Coverity warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:30 +00:00
Vadim Zeitlin
e518e31acd Fix crash when using wxThreadSpecificInfo from global object ctor.
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.

Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.

Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).

Closes #16009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 15:13:36 +00:00
Vadim Zeitlin
d08b801d2c Use correct column type when adding columns to wxDataViewListCtrl.
Using base class methods such as AppendBitmapColumn() resulted in
wxDataViewListCtrl::AppendColumn() being called but this function always
assumed the column was of "string" variant type -- which was, of course, false
for bitmap columns and so resulted in heap corruption (thanks to the
wonderfully type unsafe code using wxVariant) and a crash.

Get the correct type to use from the column itself now to fix this.

Closes #16008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 13:06:33 +00:00
Vadim Zeitlin
5178d10df7 Don't show hidden MDI frames when maximizing them in wxMSW.
This is inconsistent with the other ports and rather unexpected.

Closes #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:58 +00:00
Vadim Zeitlin
0b4804594c Don't show the MDI children implicitly by default in wxMSW any more.
We kept doing it for compatibility with pre-2.5.3 versions but this was a long
time ago and we don't need this any longer.

See #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:54 +00:00
Vadim Zeitlin
41d5ebc86f Fix wxCmdLineParser::Found(name) for options with values.
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:47 +00:00
Vadim Zeitlin
3d20f8e534 Reduce code duplication in wxCmdLineParser implementation.
No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:44 +00:00
Vadim Zeitlin
ac7e40cde2 Don't use invalid pointer in file dialog hook procedure in wxMSW.
We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.

This fixes a crash when adding a "bare" extra control, see #16003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:39 +00:00
Vadim Zeitlin
81b62354dc Fix wxTextCtrl contents corruption with long strings in wxMSW.
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:34 +00:00
Stefan Csomor
43f960c9e1 misplaced the orderOut: , see #15998, #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 20:24:04 +00:00
Vadim Zeitlin
f74fcabb0f Set model pointer in wxDataViewEvents generated under wxOSX.
Add missing SetModel() calls.

Closes #16004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 14:52:18 +00:00
Vadim Zeitlin
b6be374d72 Move DSS_HIDEPREFIX fallback definition to the central header.
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.

This also fixes MinGW build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 23:36:34 +00:00
Vadim Zeitlin
8587e491f9 Add projects for MSVC 11 and 12 (MSVS 2012 and 2013).
Add manually created projects for now, as it looks that we are not going to
have bakefile-generated ones any time soon.

Closes #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:43:16 +00:00
Vadim Zeitlin
0181aaf822 Compilation fix for wxUSE_IMAGE==0 wxMSW build.
Declare the variable used in any case outside of wxUSE_IMAGE-only block.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:13:04 +00:00
Vadim Zeitlin
f1aac9d707 Don't delete child controls when deleting wxStaticBoxSizer.
This is an incompatible change compared to 2.8 which can make the existing
code crash and it also goes against the usual rule that the windows are never
owned by sizers, only other windows.

Closes #15698.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:08:49 +00:00
Vadim Zeitlin
0206eb6161 Add support for fixed spacers and labels to wxAuiToolBar XRC handler.
Allow specifying "width" and "proportion" attributes for the "space" elements
and add "label" element support.

Closes #15964.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:05:52 +00:00
Stefan Csomor
d64c74160b fixing nested modal sessions, part 2, see #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 10:09:33 +00:00
Vadim Zeitlin
9d2b9feeb1 Add "const" to the recently added wxRTC XPM.
This fixes half a page of warnings about converting string constants to
non-const char* from g++.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:43 +00:00
Vadim Zeitlin
b577f3d731 Add missing bounding box calculations in wxMSW wxDC code.
Update the bounding box when drawing bitmaps (in one of several possible ways)
and gradients.

Closes #2132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:38 +00:00
Vadim Zeitlin
fd743aad4b Improve disabled buttons appearance in wxMSW when not using themes.
Owner drawn buttons were not drawn in the same way as normal ones when they
were disabled, use Win32 DrawState() to do it now to achieve the correct
appearance.

Closes #11746.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:25 +00:00
Vadim Zeitlin
99d3a4f4d2 Speed up wxHtmlHelpWindow startup time by freezing font choices.
Appending the names of all fonts could take a significant amount of time if
there were a lot of them, freeze the controls while doing it to speed it up.

Closes #15978.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:20 +00:00
Vadim Zeitlin
8e828674c4 Set wxHtmlHelpFrame title format before creating it.
This ensures that it's always set before it can be used, fixing assert
introduced in r75748.

Closes #15977.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:15 +00:00